You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[BUG] linking libhttpserver might fail depending on configuration of libmicrohttpd #232
When linking libhttpserver from an application, linker errors might pop up depending on how libmicrohttpd was configured.
We discovered this when building a custom application in a custom embedded board support package based on ptxdist using the distributed (backported) package rules for libmicrohttpd.
Steps to Reproduce
configure libmicrohttpd with --disable-dauth, build and install it
build libhttpserver against that libmicrohttpd
link your application against libhttpserver only, but not against libmicrohttpd
Expected behavior:
The application should not need to link libmicrohttpd by itself, because it's only a private dependency of libhttpserver.
Actual behavior:
Link errors happen, when building the application, like this:
…/sysroot-target/usr/lib/libhttpserver.so: undefined reference to `MHD_digest_auth_get_username'
…/sysroot-target/usr/lib/libhttpserver.so: undefined reference to `MHD_queue_auth_fail_response'
…/sysroot-target/usr/lib/libhttpserver.so: undefined reference to `MHD_digest_auth_check'
Reproduces how often: always
Versions
custom embedded linux build with ptxdist 2018.05.0, kernel 4.9, gcc 4.9, glibc 2.20 (oselas toolchain 2014.12.x)
libhttpserver version 0.18.1, compiled with custom ptxdist package
libmicrohttpd version 0.9.66, compiled with backported package from ptxdist master
If you have problems during build:
cross compiling toolchain
OSELAS.Toolchain-2014.12.2
arm-v5te-linux-gnueabi
gcc-4.9.2-glibc-2.20-binutils-2.24-kernel-3.16
autotools version
autoconf-2.69
automake-1.15.1
Additional Information
I know it's hard to get our exact build environment, but I assume the bug description good enough to see what's going on.
Linking libhttpserver from the application works, if libmicrohttpd is configured with --enable-dauth. However if libhttpserver unconditionally uses symbols which are optional in libmicrohttpd, it should check on that.
Activity
BlueGradientHorizon commentedon May 9, 2022
bump, same errors while linking using msys2
but i use the precompiled libraries from unofficial repo of libmicrohttpd
Make digest auth support conditional (issue #232)
Make digest_authentication example conditional (issue #232)
Guard digest auth MHD options with HAVE_DAUTH (issue #232)
Make digest auth support conditional (issue #232) (#357)