compile-time error in argv_testdriver
Hi,
for whatever reason my local FreeBSD build system never did cmocka tests - now it does, and fails
cc -DHAVE_CONFIG_H -I. -I../../../../openvpn/tests/unit_tests/openvpn -I../../.. -I../../../include -I../../../../openvpn/include -I/home/gert/src/openvpn-maint/test-build-master-fbsd/vendor/dist/include -I../../../../openvpn/src/openvpn -I../../../../openvpn/src/compat -Wall -Wno-unused-parameter -Wno-unused-function -g -O2 -std=c99 -MT argv_testdriver-argv.o -MD -MP -MF .deps/argv_testdriver-argv.Tpo -c -o argv_testdriver-argv.o test -f '../../../../openvpn/src/openvpn/argv.c' || echo '../../../../openvpn/tests/unit_tests/openvpn/'../../../../openvpn/src/openvpn/argv.c
In file included from ../../../../openvpn/src/openvpn/argv.c:41:
In file included from ../../../../openvpn/src/openvpn/options.h:41:
In file included from ../../../../openvpn/src/openvpn/comp.h:122:../../../../openvpn/src/openvpn/lzo.h:42:10: fatal error: 'lzo/lzoutil.h' file not found #include <lzo/lzoutil.h>
on FreeBSD, this is in -I/usr/local/include, which is properly configured (so OpenVPN builds nicely) and these include flags do not make it over to the cmocka builds.
So, whoever understands this stuff :-) - it would be nice to see a patch here.
Reproduction should be fairly easy - put lzo into a user-installed path, remove it from the system, and build openvpn including cmocka...
gert
Signature · 6 lines
"If was one thing all people took for granted, was conviction that if you
feed honest figures into a computer, honest figures come out. Never doubted
it myself till I met a computer with a sense of humor."
Robert A. Heinlein, The Moon is a Harsh Mistress
Gert Doering - Munich, Germany [email protected]...PATCH 1/1 configure.ac: add lzo CFLAGS/LIBS to the test flags
This fixes "make check" builds on systems with lzo on a non-standard location.
--- configure.ac | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-)
configure.ac +7 -2
@@ -1353,8 +1353,13 @@ AC_SUBST([sampledir]) AC_SUBST([systemdunitdir]) AC_SUBST([tmpfilesdir]) -TEST_LDFLAGS="${OPTIONAL_CRYPTO_LIBS} ${OPTIONAL_PKCS11_HELPER_LIBS} -lcmocka -L\$(top_builddir)/vendor/dist/lib -Wl,-rpath,\$(top_builddir)/vendor/dist/lib" -TEST_CFLAGS="${OPTIONAL_CRYPTO_CFLAGS} ${OPTIONAL_PKCS11_HELPER_CFLAGS} -I\$(top_srcdir)/include -I\$(top_builddir)/vendor/dist/include" +TEST_LDFLAGS="${OPTIONAL_CRYPTO_LIBS} ${OPTIONAL_PKCS11_HELPER_LIBS}" +TEST_LDFLAGS="${TEST_LDFLAGS} ${OPTIONAL_LZO_LIBS}" +TEST_LDFLAGS="${TEST_LDFLAGS} -lcmocka -L\$(top_builddir)/vendor/dist/lib" +TEST_LDFLAGS="${TEST_LDFLAGS} -Wl,-rpath,\$(top_builddir)/vendor/dist/lib" +TEST_CFLAGS="${OPTIONAL_CRYPTO_CFLAGS} ${OPTIONAL_PKCS11_HELPER_CFLAGS}" +TEST_CFLAGS="${TEST_CFLAGS} ${OPTIONAL_LZO_CFLAGS}" +TEST_CFLAGS="${TEST_CFLAGS} -I\$(top_srcdir)/include -I\$(top_builddir)/vendor/dist/include" AC_SUBST([TEST_LDFLAGS]) AC_SUBST([TEST_CFLAGS])
Signature · 1 line
2.17.1
Re: [Openvpn-devel] [PATCH] configure.ac: add lzo CFLAGS/LIBS to the test flags
Am 02.06.19 um 12:18 schrieb Steffan Karger:
Quoted 2 lines
This fixes "make check" builds on systems with lzo on a non-standard location.
Does what it says and does not break on my system.
[Openvpn-devel] [PATCH applied] Re: configure.ac: add lzo CFLAGS/LIBS to the test flags
In reply to Steffan KargerYour patch has been applied to the master branch.
(Unfortunately, this sabotages my just-sent v2 of the cmocka cleanup patch, so I'll send a v3 right away)
commit 7473f326366fbceb4094d43d3c21fa6d5d0782e6
Author: Steffan Karger Date: Sun Jun 2 12:18:31 2019 +0200
configure.ac: add lzo CFLAGS/LIBS to the test flags
Signed-off-by: Steffan Karger <[email protected]...>
Acked-by: David Sommerseth <[email protected]...>
Message-Id: <[email protected]...>
URL: https://www.mail-archive.com/[email protected]/msg18482.html
Signed-off-by: Gert Doering <[email protected]...>--
kind regards,
Gert Doering
Re: [Openvpn-devel] [PATCH applied] Re: configure.ac: add lzo CFLAGS/LIBS to the test flags
Hi,
Quoted 8 lines · Gert Doering
commit
7473f326366fbceb4094d43d3c21fa6d5d0782e6Author: Steffan Karger Date: Sun Jun 2 12:18:31 2019 +0200configure.ac: add lzo CFLAGS/LIBS to the test flags Signed-off-by: Steffan Karger <[email protected]...> Acked-by: David Sommerseth <[email protected]...>
Oops. Misattributed - the ACK was from Arne.
Just for the sake of the archives, cannot change the already-pushed commit message.
gert
Signature · 6 lines
"If was one thing all people took for granted, was conviction that if you
feed honest figures into a computer, honest figures come out. Never doubted
it myself till I met a computer with a sense of humor."
Robert A. Heinlein, The Moon is a Harsh Mistress
Gert Doering - Munich, Germany [email protected]...