[...] x86_64-pc-linux-gnu-gcc -march=core2 -O2 -pipe -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -Wall -D_GNU_SOURCE -DNDEBUG -I/var/tmp/paludis/net-dialup-freeradius-2.0.4/work/freeradius-server-2.0.4/src -DHOSTINFO=\"x86_64-pc-linux-gnu\" -DRADIUSD_VERSION=\"2.0.4\" -DOPENSSL_NO_KRB5 -c evaluate.c -o evaluate.o >/dev/null 2>&1 /var/tmp/paludis/net-dialup-freeradius-2.0.4/work/freeradius-server-2.0.4/libtool --mode=compile x86_64-pc-linux-gnu-gcc -march=core2 -O2 -pipe -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -Wall -D_GNU_SOURCE -DNDEBUG -I/var/tmp/paludis/net-dialup-freeradius-2.0.4/work/freeradius-server-2.0.4/src -DHOSTINFO=\"x86_64-pc-linux-gnu\" -DRADIUSD_VERSION=\"2.0.4\" -DOPENSSL_NO_KRB5 -c vmps.c x86_64-pc-linux-gnu-gcc -march=core2 -O2 -pipe -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -Wall -D_GNU_SOURCE -DNDEBUG -I/var/tmp/paludis/net-dialup-freeradius-2.0.4/work/freeradius-server-2.0.4/src -DHOSTINFO=\"x86_64-pc-linux-gnu\" -DRADIUSD_VERSION=\"2.0.4\" -DOPENSSL_NO_KRB5 -c vmps.c -fPIC -DPIC -o .libs/vmps.o x86_64-pc-linux-gnu-gcc -march=core2 -O2 -pipe -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -Wall -D_GNU_SOURCE -DNDEBUG -I/var/tmp/paludis/net-dialup-freeradius-2.0.4/work/freeradius-server-2.0.4/src -DHOSTINFO=\"x86_64-pc-linux-gnu\" -DRADIUSD_VERSION=\"2.0.4\" -DOPENSSL_NO_KRB5 -c vmps.c -o vmps.o >/dev/null 2>&1 /var/tmp/paludis/net-dialup-freeradius-2.0.4/work/freeradius-server-2.0.4/libtool --mode=compile x86_64-pc-linux-gnu-gcc -march=core2 -O2 -pipe -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -Wall -D_GNU_SOURCE -DNDEBUG -I/var/tmp/paludis/net-dialup-freeradius-2.0.4/work/freeradius-server-2.0.4/src -DHOSTINFO=\"x86_64-pc-linux-gnu\" -DRADIUSD_VERSION=\"2.0.4\" -DOPENSSL_NO_KRB5 -c detail.c x86_64-pc-linux-gnu-gcc -march=core2 -O2 -pipe -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -Wall -D_GNU_SOURCE -DNDEBUG -I/var/tmp/paludis/net-dialup-freeradius-2.0.4/work/freeradius-server-2.0.4/src -DHOSTINFO=\"x86_64-pc-linux-gnu\" -DRADIUSD_VERSION=\"2.0.4\" -DOPENSSL_NO_KRB5 -c detail.c -fPIC -DPIC -o .libs/detail.o x86_64-pc-linux-gnu-gcc -march=core2 -O2 -pipe -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -Wall -D_GNU_SOURCE -DNDEBUG -I/var/tmp/paludis/net-dialup-freeradius-2.0.4/work/freeradius-server-2.0.4/src -DHOSTINFO=\"x86_64-pc-linux-gnu\" -DRADIUSD_VERSION=\"2.0.4\" -DOPENSSL_NO_KRB5 -c detail.c -o detail.o >/dev/null 2>&1 /var/tmp/paludis/net-dialup-freeradius-2.0.4/work/freeradius-server-2.0.4/libtool --mode=link x86_64-pc-linux-gnu-gcc -export-dynamic -dlopen self \ -Wl,--as-needed -o radiusd acct.lo auth.lo client.lo conffile.lo crypt.lo exec.lo files.lo listen.lo log.lo mainconfig.lo modules.lo modcall.lo radiusd.lo radius_snmp.lo session.lo smux.lo threads.lo util.lo valuepair.lo version.lo xlat.lo event.lo realms.lo evaluate.lo vmps.lo detail.lo \ /var/tmp/paludis/net-dialup-freeradius-2.0.4/work/freeradius-server-2.0.4/src/lib/libfreeradius-radius.la -lnsl -lresolv -lpthread \ -lcrypt -lltdl -lcrypto -lssl -lcrypto rm -f .libs/radiusd.nm .libs/radiusd.nmS .libs/radiusd.nmT creating .libs/radiusdS.c (cd .libs && x86_64-pc-linux-gnu-gcc -march=core2 -O2 -pipe -c -fno-builtin "radiusdS.c") rm -f .libs/radiusdS.c .libs/radiusd.nm .libs/radiusd.nmS .libs/radiusd.nmT x86_64-pc-linux-gnu-gcc .libs/radiusdS.o -Wl,--as-needed -o .libs/radiusd .libs/acct.o .libs/auth.o .libs/client.o .libs/conffile.o .libs/crypt.o .libs/exec.o .libs/files.o .libs/listen.o .libs/log.o .libs/mainconfig.o .libs/modules.o .libs/modcall.o .libs/radiusd.o .libs/radius_snmp.o .libs/session.o .libs/smux.o .libs/threads.o .libs/util.o .libs/valuepair.o .libs/version.o .libs/xlat.o .libs/event.o .libs/realms.o .libs/evaluate.o .libs/vmps.o .libs/detail.o -Wl,--export-dynamic /var/tmp/paludis/net-dialup-freeradius-2.0.4/work/freeradius-server-2.0.4/src/lib/.libs/libfreeradius-radius.so -lnsl -lresolv -lpthread -lcrypt /usr/lib64/libltdl.so -ldl -lssl -lcrypto .libs/modules.o: In function `setup_modules': modules.c:(.text+0x12ed): undefined reference to `lt__PROGRAM__LTX_preloaded_symbols' collect2: ld returned 1 exit status gmake[4]: *** [radiusd] Error 1 gmake[4]: Leaving directory `/var/tmp/paludis/net-dialup-freeradius-2.0.4/work/freeradius-server-2.0.4/src/main' gmake[3]: *** [common] Error 2 gmake[3]: Leaving directory `/var/tmp/paludis/net-dialup-freeradius-2.0.4/work/freeradius-server-2.0.4/src' gmake[2]: *** [all] Error 2 gmake[2]: Leaving directory `/var/tmp/paludis/net-dialup-freeradius-2.0.4/work/freeradius-server-2.0.4/src' gmake[1]: *** [common] Error 2 gmake[1]: Leaving directory `/var/tmp/paludis/net-dialup-freeradius-2.0.4/work/freeradius-server-2.0.4' make: *** [all] Error 2 !!! ERROR in net-dialup/freeradius-2.0.4: !!! In src_compile at line 3952 !!! make failed ... and contains a bundled libltdl which is no good.
This is not related to --as-needed, it happens anyhow you setup your ldflags. Seems related to libtool-2.2.4 (build fails since upgrade to libtool-2.2.4)
hmm, interesting. Well, unbundling libltdl will then probably solve the issue.
(In reply to comment #2) > hmm, interesting. Well, unbundling libltdl will then probably solve the issue. > Done. configure script's got a --with-system-libtool option, unset by default. I attach an ebuild fixing this bug and bug #225937 (by append-flags'ing -D_GNU_SOURCE)
Created attachment 156607 [details] Ebuild fixing 225725 and 225937
Right solution for the libtool-dep. Wrong solution for the _GNU_SOURCE: Upstream must fix it, so a patch is more likely the way to go.
(In reply to comment #5) > Right solution for the libtool-dep. Wrong solution for the _GNU_SOURCE: > Upstream must fix it, so a patch is more likely the way to go. yep, I too guess so. But I only followed what was done for some other bugs added to #225459 :). Will upload a patch soon. Thanks.
(In reply to comment #6) > (In reply to comment #5) > > Right solution for the libtool-dep. Wrong solution for the _GNU_SOURCE: > > Upstream must fix it, so a patch is more likely the way to go. > > yep, I too guess so. But I only followed what was done for some other bugs > added to #225459 :). > Will upload a patch soon. Thanks. > New ebuild with freeradius-2.0.4-define-gnu-source.patch. I added a call to eautoheader to have src/include/autoconf.h.in regenerated.
Created attachment 156613 [details, diff] Fix to define _GNU_SOURCE in C sources.
Created attachment 156615 [details] New ebuild fixing both bugs.
Fixed in -r1. Thanks for the solution! However, I had to make some changes: - the patch should be applied only if elibc_glibc USE flag is enabled - the right way to define it is AC_DEFINE(_GNU_SOURCE, 1, [some comment])