Hello,

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

Reply via email to