Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 276928

Summary: net-p2p/dbhub needs DynaLoader.a file from dev-lang/perl, which is missing in 5.10.1
Product: Gentoo Linux Reporter: Diego Elio Pettenò (RETIRED) <flameeyes>
Component: New packagesAssignee: Gentoo Perl team <perl>
Status: RESOLVED FIXED    
Severity: normal CC: esigra, net-p2p
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
URL: http://www.gentoo.org/proj/en/qa/asneeded.xml
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 280724, 319801    
Attachments: Build log
Updated -gentoo.patch to files/

Description Diego Elio Pettenò (RETIRED) gentoo-dev 2009-07-07 15:07:47 UTC
I'm reporting this bug because the package in summary fails to build when forcing --as-needed on through spec files (check out http://blog.flameeyes.eu/2008/11/14/problems-and-mitigation-strategies-for-as-needed for details).

Please note that this bug _might_ apply to -Wl,--as-needed in LDFLAGS as well; in both cases it should be fixed. Also, if this is due to the package in question not respecting user-defined LDFLAGS, you should get to fix that too.

Check the attached build log.

Thanks,
Diego
Comment 1 Diego Elio Pettenò (RETIRED) gentoo-dev 2009-07-07 15:08:12 UTC
Created attachment 197078 [details]
Build log
Comment 2 Markos Chandras (RETIRED) gentoo-dev 2010-06-28 09:46:54 UTC
I cant reproduce it with
x86_64-pc-linux-gnu-4.5.0-asneeded
Comment 3 Diego Elio Pettenò (RETIRED) gentoo-dev 2010-06-28 09:52:34 UTC
Make sure to have USE=perl.
Comment 4 Kevin Pyle 2010-06-29 02:56:29 UTC
The missing symbols named on lines 129 and later come from libdl, which is linked via -ldl.  Due to the forced --as-needed, -ldl is discarded since it occurs well before the reference to DynaLoader.a.  Moving all the -l switches to the end of the line should fix the problem.

   127	i686-pc-linux-gnu-gcc  -O2 -pipe -D_GNU_SOURCE  -Wl,-O1  -rdynamic -L/usr/local/lib -L/usr/lib/perl5/5.8.8/i686-linux/CORE -lperl -lpthread -lnsl -ldl -lm -lcrypt -lutil -lc -o dbhub  commands.o fileio.o main.o network.o userlist.o utils.o langvars.o logger.o motd.o semops.o  perl_utils.o xs_functions.o lang.o /usr/lib/perl5/5.8.8/i686-linux/auto/DynaLoader/DynaLoader.a -lperl -lcrypt 
   128	/usr/lib/perl5/5.8.8/i686-linux/auto/DynaLoader/DynaLoader.a(DynaLoader.o): In function `XS_DynaLoader_dl_find_symbol':
   129	(.text+0x6f5): undefined reference to `dlsym'
   130	/usr/lib/perl5/5.8.8/i686-linux/auto/DynaLoader/DynaLoader.a(DynaLoader.o): In function `XS_DynaLoader_dl_find_symbol':
   131	(.text+0x781): undefined reference to `dlerror'

As a secondary point, why are there two -lperl and -lcrypt?  Why is there a -lc at all?
Comment 5 Samuli Suominen (RETIRED) gentoo-dev 2010-06-29 19:39:53 UTC
(In reply to comment #3)
> Make sure to have USE=perl.
> 

The perl support needs you to have file called DynaLoader.a, but that file doesn't exist in Gentoo's perl-5.10.1 for some reason... Your log shows it's there still with 5.8.8.

Obviously it's impossible to hit to this bug with that file missing -> and configure disabling perl support
Comment 6 Samuli Suominen (RETIRED) gentoo-dev 2010-06-29 19:52:13 UTC
Created attachment 236967 [details, diff]
Updated -gentoo.patch to files/

Overwrite the current -gentoo.patch in files/ directory with this, and run eautoreconf on the package.

It should solve the issue... that is, if you got the DynaLoader.a file installed. I have no idea howto get that file.
Comment 7 Samuli Suominen (RETIRED) gentoo-dev 2010-06-29 19:54:35 UTC
applied the patch to portage -> this bug is now for the missing file in perl
Comment 8 David Abbott (RETIRED) gentoo-dev 2010-06-29 20:15:52 UTC
Packages embedding Perl and not using ExtUtils::Embed::ldopts will look for DynaLoader.a in vain.
http://wiki.debian.org/Perl5.10Transition
Here they just create a dummy DynaLoader.a
http://www.dbhub.org/forum/perl-510-and-dynaloadera-vt644.htm
Comment 9 Torsten Veller (RETIRED) gentoo-dev 2010-08-15 13:46:51 UTC
If uptream doesn't care, do we?
Comment 10 Samuli Suominen (RETIRED) gentoo-dev 2010-10-24 18:40:06 UTC
meh, it was easy...

+  24 Oct 2010; Samuli Suominen <ssuominen@gentoo.org> dbhub-0.451.ebuild,
+  +files/dbhub-no-dynaloader.patch:
+  Don't check DynaLoader library for compability with recent perl wrt
+  #276928 by Diego E. Pettenò.