Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 225725 - net-dialup/freeradius-2.0.4 fails with --as-needed and contains a bundled libltdl
Summary: net-dialup/freeradius-2.0.4 fails with --as-needed and contains a bundled lib...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Alin Năstac (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-06-10 10:13 UTC by Tiziano Müller (RETIRED)
Modified: 2008-06-14 11:14 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Ebuild fixing 225725 and 225937 (freeradius-2.0.4.ebuild,3.85 KB, text/plain)
2008-06-13 11:17 UTC, Mathieu Segaud
Details
Fix to define _GNU_SOURCE in C sources. (freeradius-2.0.4-define-gnu-source.patch,396 bytes, patch)
2008-06-13 12:39 UTC, Mathieu Segaud
Details | Diff
New ebuild fixing both bugs. (freeradius-2.0.4.ebuild,3.91 KB, text/plain)
2008-06-13 12:40 UTC, Mathieu Segaud
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tiziano Müller (RETIRED) gentoo-dev 2008-06-10 10:13:36 UTC
[...]
 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.
Comment 1 Mathieu Segaud 2008-06-11 10:28:12 UTC
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)
Comment 2 Tiziano Müller (RETIRED) gentoo-dev 2008-06-11 12:02:31 UTC
hmm, interesting. Well, unbundling libltdl will then probably solve the issue.
Comment 3 Mathieu Segaud 2008-06-13 11:16:45 UTC
(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)
Comment 4 Mathieu Segaud 2008-06-13 11:17:32 UTC
Created attachment 156607 [details]
Ebuild fixing 225725 and 225937
Comment 5 Tiziano Müller (RETIRED) gentoo-dev 2008-06-13 11:26:05 UTC
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.
Comment 6 Mathieu Segaud 2008-06-13 12:10:17 UTC
(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.
Comment 7 Mathieu Segaud 2008-06-13 12:38:17 UTC
(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.

Comment 8 Mathieu Segaud 2008-06-13 12:39:44 UTC
Created attachment 156613 [details, diff]
Fix to define _GNU_SOURCE in C sources.
Comment 9 Mathieu Segaud 2008-06-13 12:40:36 UTC
Created attachment 156615 [details]
New ebuild fixing both bugs.
Comment 10 Alin Năstac (RETIRED) gentoo-dev 2008-06-14 11:14:47 UTC
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])