Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 289756 - sys-devel/binutils-2.20 doesn't build when USE=multitarget - fails to link with libdl
Summary: sys-devel/binutils-2.20 doesn't build when USE=multitarget - fails to link wi...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Toolchain Maintainers
URL: http://thread.gmane.org/gmane.comp.gn...
Whiteboard:
Keywords:
: 289869 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-10-19 17:27 UTC by Rafał Mużyło
Modified: 2009-11-14 04:17 UTC (History)
8 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Rafał Mużyło 2009-10-19 17:27:07 UTC
... at least not with binutils 2.19.1-r1.
Effect is linking errors about libdl:
/bin/sh ./libtool --tag=CC   --mode=link i686-pc-linux-gnu-gcc -W -Wall -Wstrict-prototypes -Wmissing-prototypes -O2 -march=athlon -mtune=athlon -pipe  -Wl,-O1 -Wl,--as-needed -Wl,--sort-common -Wl,-z,relro -o size size.o bucomm.o version.o filemode.o ../bfd/libbfd.la ../libiberty/libiberty.a  -lz 
libtool: link: i686-pc-linux-gnu-gcc -W -Wall -Wstrict-prototypes -Wmissing-prototypes -O2 -march=athlon -mtune=athlon -pipe -Wl,-O1 -Wl,--sort-common -Wl,-z -Wl,relro -o .libs/size size.o bucomm.o version.o filemode.o  -Wl,--as-needed ../bfd/.libs/libbfd.so -L/var/tmp/portage/sys-devel/binutils-2.20/work/build/bfd/../libiberty/pic -liberty ../libiberty/libiberty.a -lz -Wl,-rpath -Wl,/usr/lib/binutils/i686-pc-linux-gnu/2.20
../bfd/.libs/libbfd.so: undefined reference to `dlsym'
../bfd/.libs/libbfd.so: undefined reference to `dlerror'
../bfd/.libs/libbfd.so: undefined reference to `dlopen'
collect2: ld returned 1 exit status

I think adding '--enable-plugins' may help,
I'm about to test it.
Comment 1 Rafał Mużyło 2009-10-19 17:46:14 UTC
OK, '--enable-plugins' did work.

As a sidenote, just what is it with multislot useflag,
that it make packages complain:
* QA Notice: Expected SLOT='0', got 'i686-pc-linux-gnu-2.20'
IIRC, it actually breaks something with gcc ebuild
(fix_libtool_files phase, I think).
And should it prepend CHOST ?
Comment 2 Rafał Mużyło 2009-10-20 16:59:21 UTC
*** Bug 289869 has been marked as a duplicate of this bug. ***
Comment 3 Rafał Mużyło 2009-10-20 17:00:44 UTC
As I said, bug 289869 suggests it's not '--as-needed' only
problem.
Comment 4 Maarten Maathuis 2009-10-21 19:22:12 UTC
I have this problem as well, amd64 with "--as-needed" enabled. If further information is needed, then please ask.
Comment 5 peteru 2009-10-23 03:25:41 UTC
I don't think --as-needed is the culprit here. I don't use that flag and still get the same build errors:

libtool: link: i686-pc-linux-gnu-gcc -W -Wall -Wstrict-prototypes -Wmissing-prototypes -march=pentium4 -O2 -pipe -Wl,-O1 -o .libs/ld-new ldgram.o ldlex.o lexsup.o ldlang.o mri.o ldctor.o ldmain.o ldwrite.o ldexp.o ldemul.o ldver.o ldmisc.o ldfile.o ldcref.o eaixppc.o eaixrs6.o ealpha.o earcelf.o earm_epoc_pe.o earm_wince_pe.o earmaoutb.o earmaoutl.o earmcoff.o earmelf.o earmelfb.o earmelf_fbsd.o earmelf_linux.o earmelf_linux_eabi.o earmelfb_linux.o earmelfb_linux_eabi.o earmelf_nbsd.o earmelfb_nbsd.o earmelf_vxworks.o earmnto.o earmnbsd.o earmpe.o earmsymbian.o eavr2.o eavr1.o eavr25.o eavr3.o eavr31.o eavr35.o eavr4.o eavr5.o eavr51.o eavr6.o ecoff_i860.o ecoff_sparc.o eelf32_spu.o ecrisaout.o ecriself.o ecrislinux.o ed10velf.o ed30v_e.o ed30v_o.o ed30velf.o edelta68.o eelf32_dlx.o eelf32_i960.o eelf32_i860.o eelf32_sparc.o eelf32_sparc_vxworks.o eelf32b4300.o eelf32bfin.o eelf32bfinfd.o eelf32cr16.o eelf32cr16c.o eelf32bmip.o eelf32bmipn32.o eelf32btsmip.o eelf32crx.o eelf32btsmipn32.o eelf32ltsmip.o eelf32ltsmipn32.o eelf32ebmip.o eelf32ebmipvxworks.o eelf32elmip.o eelf32elmipvxworks.o eelf32fr30.o eelf32frv.o eelf32moxie.o eelf32i370.o eelf32ip2k.o eelf32iq2000.o eelf32iq10.o eelf32lm32.o eelf32lm32fd.o eelf32l4300.o eelf32lmip.o eelf32lppc.o eelf32lppcnto.o eelf32lppcsim.o eelf32m32c.o eelf32mcore.o eelf32mep.o eelf32mb_linux.o eelf32microblaze.o eelf32mipswindiss.o eelf32mt.o eelf32openrisc.o eelf32ppc.o eelf32ppc_fbsd.o eelf32ppclinux.o eelf32ppcnto.o eelf32ppcsim.o eelf32ppcwindiss.o eelf32ppcvxworks.o eelf32vax.o eelf32xc16x.o eelf32xc16xl.o eelf32xc16xs.o eelf32xstormy16.o eelf32xtensa.o eelf_i386.o eelf_i386_be.o eelf_i386_chaos.o eelf_i386_fbsd.o eelf_i386_ldso.o eelf_i386_vxworks.o eelf_s390.o egld960.o egld960coff.o eh8300.o eh8300h.o eh8300s.o eh8300elf.o eh8300hn.o eh8300sn.o eh8300sx.o eh8300helf.o eh8300self.o eh8300hnelf.o eh8300snelf.o eh8300sxelf.o eh8300sxn.o eh8300sxnelf.o eh8500.o eh8500b.o eh8500c.o eh8500m.o eh8500s.o ehp300bsd.o ehp3hpux.o ehppaelf.o ehppalinux.o ehppanbsd.o ehppaobsd.o ei386aout.o ei386beos.o ei386bsd.o ei386coff.o ei386go32.o ei386linux.o ei386lynx.o ei386mach.o ei386moss.o ei386msdos.o ei386nbsd.o ei386nto.o ei386nw.o ei386pe.o ei386pe_posix.o ei386pep.o elnk960.o em32relf.o em32rlelf.o em32relf_linux.o em32rlelf_linux.o em68hc11elf.o em68hc11elfb.o em68hc12elf.o em68hc12elfb.o em68k4knbsd.o em68kaout.o em68kaux.o em68kcoff.o em68kelf.o em68kelfnbsd.o em68klinux.o em68knbsd.o em68kpsos.o em88kbcs.o emaxqcoff.o emcorepe.o emipsbig.o emipsbsd.o emipsidt.o emipsidtl.o emipslit.o emipslnews.o emipspe.o emsp430x110.o emsp430x112.o emsp430x1101.o emsp430x1111.o emsp430x1121.o emsp430x1122.o emsp430x1132.o emsp430x122.o emsp430x123.o emsp430x1222.o emsp430x1232.o emsp430x133.o emsp430x135.o emsp430x1331.o emsp430x1351.o emsp430x147.o emsp430x148.o emsp430x149.o emsp430x155.o emsp430x156.o emsp430x157.o emsp430x167.o emsp430x168.o emsp430x169.o emsp430x1610.o emsp430x1611.o emsp430x1612.o emsp430x2101.o emsp430x2111.o emsp430x2121.o emsp430x2131.o emsp430x311.o emsp430x312.o emsp430x313.o emsp430x314.o emsp430x315.o emsp430x323.o emsp430x325.o emsp430x336.o emsp430x337.o emsp430x412.o emsp430x413.o emsp430x415.o emsp430x417.o emsp430xE423.o emsp430xE425.o emsp430xE427.o emsp430xW423.o emsp430xW425.o emsp430xW427.o emsp430xG437.o emsp430xG438.o emsp430xG439.o emsp430x435.o emsp430x436.o emsp430x437.o emsp430x447.o emsp430x448.o emsp430x449.o enews.o ens32knbsd.o eor32.o eor32elf.o epc532macha.o epdp11.o epjelf.o epjlelf.o eppcmacos.o eppcnw.o eppcpe.o eppclynx.o eriscix.o escore3_elf.o escore7_elf.o esh.o eshelf32.o eshlelf32.o eshelf32_linux.o eshlelf32_linux.o eshelf32_nbsd.o eshlelf32_nbsd.o eshelf.o eshelf_linux.o eshlelf_linux.o eshelf_nbsd.o eshlelf_nbsd.o eshelf_nto.o eshlelf_nto.o eshelf_uclinux.o eshelf_vxworks.o eshlelf_vxworks.o eshl.o eshlelf.o eshlsymbian.o eshpe.o esparcaout.o esparclinux.o esparcnbsd.o est2000.o esun3.o esun4.o etic30aout.o etic30coff.o etic3xcoff.o etic3xcoff_onchip.o etic4xcoff.o etic54xcoff.o etic80coff.o evanilla.o evax.o evaxnbsd.o evsta.o ew65.o ez8001.o eelf32frvfd.o ez80.o ez8002.o eelf64_aix.o eelf64_ia64.o eelf64_ia64_fbsd.o eshelf64.o eshlelf64.o eshelf64_nbsd.o eshlelf64_nbsd.o eelf_x86_64.o eelf_x86_64_fbsd.o eelf_l1om.o eelf_l1om_fbsd.o eelf64_s390.o eelf64_sparc.o eelf64_sparc_fbsd.o eelf64alpha.o eelf64alpha_fbsd.o eelf64alpha_nbsd.o eelf64bmip.o eelf64btsmip.o eelf64ltsmip.o eelf64hppa.o eelf64mmix.o emmo.o eelf64ppc.o eelf64lppc.o ehppa64linux.o deffilep.o pe-dll.o pep-dll.o  ../bfd/.libs/libbfd.so -L/var/tmp/portage/sys-devel/binutils-2.20/work/build/bfd/../libiberty/pic -liberty ../libiberty/libiberty.a -lz -Wl,-rpath -Wl,/usr/lib/binutils/i686-pc-linux-gnu/2.20
../bfd/.libs/libbfd.so: undefined reference to `dlsym'
../bfd/.libs/libbfd.so: undefined reference to `dlerror'
../bfd/.libs/libbfd.so: undefined reference to `dlopen'
collect2: ld returned 1 exit status
make[4]: *** [ld-new] Error 1
make[4]: Leaving directory `/var/tmp/portage/sys-devel/binutils-2.20/work/build/ld'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/var/tmp/portage/sys-devel/binutils-2.20/work/build/ld'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/var/tmp/portage/sys-devel/binutils-2.20/work/build/ld'
make[1]: *** [all-ld] Error 2
make[1]: Leaving directory `/var/tmp/portage/sys-devel/binutils-2.20/work/build'
make: *** [all] Error 2
Comment 6 KaZeR 2009-10-28 13:15:00 UTC
Same here, with "multitarget nls -gold -multislot -test -vanilla".
2.19.1-r1 compiles successfully.

Comment 7 Sergey Kondakov 2009-10-28 18:53:38 UTC
summary is misleading - it not builds with any LDFLAGS, the only thing helped me is adding '--enable-plugins' into configuration phase
Comment 8 Rafał Mużyło 2009-10-28 20:23:31 UTC
(In reply to comment #7)
> summary is misleading - it not builds with any LDFLAGS, the only thing helped
> me is adding '--enable-plugins' into configuration phase
> 

Of course, it is.
When I opened this bug, I was not sure, if '--as-needed'
is the reason of this bug. Since then, that mailing list discussion proves,
it's not.
Comment 9 Peter Joanes 2009-10-29 13:14:49 UTC
I came across this while upgrading my system, so in case it is a common problem it may be worth mentioning how to easily add "--enable-plugins", so that the package installs.
I used:
        # EXTRA_ECONF="--enable-plugins" emerge binutils
Comment 10 Denis Kaganovich 2009-11-02 12:38:27 UTC
I got this bug with "multitarget" only.
Comment 11 Yu Yuwei 2009-11-03 12:06:36 UTC
(In reply to comment #9)
> I came across this while upgrading my system, so in case it is a common problem
> it may be worth mentioning how to easily add "--enable-plugins", so that the
> package installs.
> I used:
>         # EXTRA_ECONF="--enable-plugins" emerge binutils
> 

thanks very much, with EXTRA_ECONF="--enable-plugins", the binutils can be emerged with multitargest USE :)
Comment 12 SpanKY gentoo-dev 2009-11-14 04:17:06 UTC
added the fix merged upstream