diff options
author | Christian Grothoff <christian@grothoff.org> | 2018-12-14 15:58:14 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2018-12-14 15:58:14 +0100 |
commit | 700f23d5d7153ce5de8617ac8d257828899d6f66 (patch) | |
tree | ee81804cf0beeb3e244c93342c5072d1f4f20c65 | |
parent | 29cd7b735de89d3ba32371aa15cbeda9cd3a9f9a (diff) | |
download | libmicrohttpd-700f23d5d7153ce5de8617ac8d257828899d6f66.tar.gz libmicrohttpd-700f23d5d7153ce5de8617ac8d257828899d6f66.zip |
Fixes build issue of testcase for some configurations.
Lasa Martxel <mlasa@ikerlan.es> wrote:
I was getting an error when running make check, when building test_upgrade. I have followed the following steps to build the library (tried both on master an v0.9.62, same result):
git clone https://gnunet.org/git/libmicrohttpd.git
cd libmicrohttpd
./bootstrap
./configure --enable-curl
make
make check
The error message I was getting is the following one:
gcc -DHAVE_CONFIG_H -I. -I../.. -I../../src/include -I../../src/microhttpd -fvisibility=hidden -pthread -g -O2 -fno-strict-aliasing -MT test_upgrade-test_upgrade.o -MD -MP -MF .deps/test_upgrade-test_upgrade.Tpo -c -o test_upgrade-test_upgrade.o `test -f 'test_upgrade.c' || echo './'`test_upgrade.c
mv -f .deps/test_upgrade-test_upgrade.Tpo .deps/test_upgrade-test_upgrade.Po
/bin/bash ../../libtool --tag=CC --mode=link gcc -fvisibility=hidden -pthread -g -O2 -fno-strict-aliasing -o test_upgrade test_upgrade-test_upgrade.o ../../src/microhttpd/libmicrohttpd.la
libtool: link: gcc -fvisibility=hidden -pthread -g -O2 -fno-strict-aliasing -o .libs/test_upgrade test_upgrade-test_upgrade.o ../../src/microhttpd/.libs/libmicrohttpd.so -pthread
/usr/bin/ld: test_upgrade-test_upgrade.o: undefined reference to symbol 'gnutls_handshake@@GNUTLS_3_4'
//usr/lib/x86_64-linux-gnu/libgnutls.so.30: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
Makefile:1139: recipe for target 'test_upgrade' failed
I had to add $(MHD_TLS_LIB_LDFLAGS) and $(MHD_TLS_LIBDEPS) to test_upgrade_LDADD and test_upgrade_tls_LDADD to the Makefile.am:
diff --git a/src/microhttpd/Makefile.am b/src/microhttpd/Makefile.am
index 22b6100d..1f4ffca3 100644
--- a/src/microhttpd/Makefile.am
+++ b/src/microhttpd/Makefile.am
@@ -224,6 +224,7 @@ test_upgrade_LDFLAGS = \
$(MHD_TLS_LIB_LDFLAGS)
test_upgrade_LDADD = \
$(top_builddir)/src/microhttpd/libmicrohttpd.la \
+ $(MHD_TLS_LIB_LDFLAGS) $(MHD_TLS_LIBDEPS) \
$(PTHREAD_LIBS)
test_upgrade_tls_SOURCES = \
@@ -236,6 +237,7 @@ test_upgrade_tls_LDFLAGS = \
$(MHD_TLS_LIB_LDFLAGS)
test_upgrade_tls_LDADD = \
$(top_builddir)/src/microhttpd/libmicrohttpd.la \
+ $(MHD_TLS_LIB_LDFLAGS) $(MHD_TLS_LIBDEPS) \
$(PTHREAD_LIBS)
test_postprocessor_SOURCES = \
With that change, I’m able to correctly build, run and pass al the tests.
Regards,
Martxel
-> patched as suggested
-rw-r--r-- | src/microhttpd/Makefile.am | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/microhttpd/Makefile.am b/src/microhttpd/Makefile.am index 22b6100d..1f4ffca3 100644 --- a/src/microhttpd/Makefile.am +++ b/src/microhttpd/Makefile.am | |||
@@ -224,6 +224,7 @@ test_upgrade_LDFLAGS = \ | |||
224 | $(MHD_TLS_LIB_LDFLAGS) | 224 | $(MHD_TLS_LIB_LDFLAGS) |
225 | test_upgrade_LDADD = \ | 225 | test_upgrade_LDADD = \ |
226 | $(top_builddir)/src/microhttpd/libmicrohttpd.la \ | 226 | $(top_builddir)/src/microhttpd/libmicrohttpd.la \ |
227 | $(MHD_TLS_LIB_LDFLAGS) $(MHD_TLS_LIBDEPS) \ | ||
227 | $(PTHREAD_LIBS) | 228 | $(PTHREAD_LIBS) |
228 | 229 | ||
229 | test_upgrade_tls_SOURCES = \ | 230 | test_upgrade_tls_SOURCES = \ |
@@ -236,6 +237,7 @@ test_upgrade_tls_LDFLAGS = \ | |||
236 | $(MHD_TLS_LIB_LDFLAGS) | 237 | $(MHD_TLS_LIB_LDFLAGS) |
237 | test_upgrade_tls_LDADD = \ | 238 | test_upgrade_tls_LDADD = \ |
238 | $(top_builddir)/src/microhttpd/libmicrohttpd.la \ | 239 | $(top_builddir)/src/microhttpd/libmicrohttpd.la \ |
240 | $(MHD_TLS_LIB_LDFLAGS) $(MHD_TLS_LIBDEPS) \ | ||
239 | $(PTHREAD_LIBS) | 241 | $(PTHREAD_LIBS) |
240 | 242 | ||
241 | test_postprocessor_SOURCES = \ | 243 | test_postprocessor_SOURCES = \ |