Hi everyone,
libmicrohttpd-0.9.26 has a build problem. doc/examples/sessions.c makes
calls to MHD_destroy_post_processor and friends, but it is not bracketed
by if HAVE_POSTPROCESSOR ... endif in doc/examples/Makefile.am leading
the the following link time error when --disable-postprocessor.
libtool: link: x86_64-pc-linux-gnu-gcc -fno-strict-aliasing -O2 -pipe
-Wl,-O1 -Wl,--as-needed -o .libs/sessions sessions.o
../../src/daemon/.libs/libmicrohttpd.so -lrt -lpthread
sessions.o: In function `request_completed_callback':
sessions.c:(.text+0x33): undefined reference to `MHD_destroy_post_processor'
sessions.o: In function `create_response':
sessions.c:(.text+0x29e): undefined reference to `MHD_post_process'
sessions.c:(.text+0x2cd): undefined reference to
`MHD_destroy_post_processor'
sessions.c:(.text+0x3ea): undefined reference to `MHD_create_post_processor'
collect2: ld returned 1 exit status
Its fixed by the following patch. Sorry for inlining it, but its pretty
obvious:
diff -Naur libmicrohttpd-0.9.26.orig/doc/examples/Makefile.am
libmicrohttpd-0.9.26/doc/examples/Makefile.am
--- libmicrohttpd-0.9.26.orig/doc/examples/Makefile.am 2013-03-29
12:21:07.000000000 -0400
+++ libmicrohttpd-0.9.26/doc/examples/Makefile.am 2013-03-30
17:04:34.000000000 -0400
@@ -18,15 +18,16 @@
basicauthentication \
hellobrowser \
logging \
- responseheaders \
- sessions
+ responseheaders
if ENABLE_HTTPS
noinst_PROGRAMS += \
tlsauthentication
endif
if HAVE_POSTPROCESSOR
-noinst_PROGRAMS += simplepost largepost
+noinst_PROGRAMS += \
+ simplepost largepost \
+ sessions
endif
if HAVE_W32
--
Anthony G. Basile, Ph. D.
Chair of Information Technology
D'Youville College
Buffalo, NY 14201
(716) 829-8197