View Issue Details

IDProjectCategoryView StatusLast Update
0002968libmicrohttpdotherpublic2021-09-02 15:54
Reporterblueness Assigned ToChristian Grothoff Due Date
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
PlatformAllOSAllOS VersionAll
Product Version0.9.28 
Target Version0.9.29Fixed in Version0.9.29 
Summary0002968: libmicrohttpd-0.9.28: fails to build when ./configure --disable-messages
DescriptionWhen libmicrohttpd-0.9.28 (latest release as of today) is configured wit messages disable, the build fails with:

libtool: link: gcc -DDATA_DIR=\"../../src/datadir/\" -fno-strict-aliasing -g -O2 -o .libs/spdy_event_loop spdy_event_loop.o ../../src/microspdy/.libs/libmicrospdy.so -lssl -lcrypto -lz -ldl -lrt -lpthread
../../src/microhttpd/.libs/libmicrohttpd.so: undefined reference to `MHD_DLOG'
collect2: error: ld returned 1 exit status
make[4]: *** [minimal_example_comet] Error 1
../../src/microhttpd/.libs/libmicrohttpd.so: undefined reference to `MHD_DLOG'
collect2: error: ld returned 1 exit status
make[4]: *** [fileserver_example_external_select] Error 1
../../src/microhttpd/.libs/libmicrohttpd.so: undefined reference to `MHD_DLOG'
collect2: error: ld returned 1 exit status
make[4]: *** [fileserver_example_dirs] Error 1
../../src/microhttpd/.libs/libmicrohttpd.so: undefined reference to `MHD_DLOG'
collect2: error: ld returned 1 exit status
make[4]: *** [minimal_example] Error 1
../../src/microhttpd/.libs/libmicrohttpd.so: undefined reference to `MHD_DLOG'
collect2: error: ld returned 1 exit status
make[4]: *** [refuse_post_example] Error 1
make[4]: Leaving directory `/var/tmp/portage/net-libs/libmicrohttpd-0.9.28/work/libmicrohttpd-0.9.28/src/examples'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/var/tmp/portage/net-libs/libmicrohttpd-0.9.28/work/libmicrohttpd-0.9.28/src/examples'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/var/tmp/portage/net-libs/libmicrohttpd-0.9.28/work/libmicrohttpd-0.9.28/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/var/tmp/portage/net-libs/libmicrohttpd-0.9.28/work/libmicrohttpd-0.9.28'
make: *** [all] Error 2


This is because of a missing #if HAVE_MESSAGES in src/microhttpd/daemon.c
Steps To Reproduce1. ./configure --disable-messages
2. make
3. boom!
TagsNo tags attached.
Attached Files
libmicrohttpd-0.9.28-fix-no-messages.patch (666 bytes)   
diff -Naur libmicrohttpd-0.9.28.orig/src/microhttpd/daemon.c libmicrohttpd-0.9.28/src/microhttpd/daemon.c
--- libmicrohttpd-0.9.28.orig/src/microhttpd/daemon.c	2013-07-23 21:10:14.000000000 -0400
+++ libmicrohttpd-0.9.28/src/microhttpd/daemon.c	2013-07-23 21:11:32.000000000 -0400
@@ -3112,9 +3112,11 @@
 	  int sk_flags = fcntl (socket_fd, F_GETFL);
 	  if (0 != fcntl (socket_fd, F_SETFL, sk_flags | O_NONBLOCK))
 	    {
+#if HAVE_MESSAGES
 	      MHD_DLOG (daemon,
 			"Failed to make listen socket non-blocking: %s\n", 
 			STRERROR (errno));
+#endif
 	      if (0 != CLOSE (socket_fd))
 		MHD_PANIC ("close failed\n");	      
 	      goto free_and_fail;	      

Activities

blueness

2013-07-24 01:33

reporter   ~0007292

This patch adds the missing #if HAVE_MESSAGES ... #endif

Christian Grothoff

2013-07-28 14:42

manager   ~0007296

Fixed as suggested in SVN 28330.

Christian Grothoff

2021-09-02 15:54

manager   ~0018210

Fix committed to master branch.

Issue History

Date ModifiedUsernameFieldChange
2013-07-24 01:31bluenessNew Issue
2013-07-24 01:33bluenessNote Added: 0007292
2013-07-24 01:33bluenessFile Added: libmicrohttpd-0.9.28-fix-no-messages.patch
2013-07-28 14:42Christian GrothoffNote Added: 0007296
2013-07-28 14:42Christian GrothoffStatusnew => resolved
2013-07-28 14:42Christian GrothoffFixed in Version => 0.9.29
2013-07-28 14:42Christian GrothoffResolutionopen => fixed
2013-07-28 14:42Christian GrothoffAssigned To => Christian Grothoff
2013-07-28 14:42Christian GrothoffProduct Version => 0.9.28
2013-07-28 14:42Christian GrothoffTarget Version => 0.9.29
2013-08-23 12:33Christian GrothoffStatusresolved => closed
2021-09-02 15:54Christian Grothoff
2021-09-02 15:54Christian GrothoffNote Added: 0018210