Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 421069 - sys-devel/binutils-2.22-r1 - ld: ../bfd/.libs/libbfd.so: error: undefined reference to 'dlopen'
Summary: sys-devel/binutils-2.22-r1 - ld: ../bfd/.libs/libbfd.so: error: undefined ref...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: AMD64 Linux
: Normal major (vote)
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords: Bug, REGRESSION
: 421261 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-06-14 08:41 UTC by Benjamin Schindler
Modified: 2012-06-18 15:15 UTC (History)
6 users (show)

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


Attachments
build log (output,401.89 KB, text/plain)
2012-06-14 08:44 UTC, Benjamin Schindler
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Benjamin Schindler 2012-06-14 08:41:50 UTC
Somewhere in the middle of the build, it aborts with undefined references to symbols within libdl, I guess libbfd needs to link against dl. 

I'll attach a full build log shortly

Reproducible: Always




Portage 2.1.10.65 (default/linux/amd64/10.0, gcc-4.6.3, glibc-2.14.1-r3, 3.2.12-gentoo x86_64)
=================================================================
System uname: Linux-3.2.12-gentoo-x86_64-Intel-R-_Xeon-R-_CPU_E5430_@_2.66GHz-with-gentoo-2.1
Timestamp of tree: Thu, 14 Jun 2012 06:45:01 +0000
distcc 3.1 x86_64-pc-linux-gnu [disabled]
app-shells/bash:          4.2_p20
dev-java/java-config:     2.1.11-r3
dev-lang/python:          2.6.6-r2, 2.7.3-r2, 3.1.4-r3, 3.2.3
dev-util/cmake:           2.8.8-r2
dev-util/pkgconfig:       0.26
sys-apps/baselayout:      2.1-r1
sys-apps/openrc:          0.9.8.4
sys-apps/sandbox:         2.5
sys-devel/autoconf:       2.13, 2.68
sys-devel/automake:       1.9.6-r3, 1.10.3, 1.11.1
sys-devel/binutils:       2.21.1-r1
sys-devel/gcc:            4.4.5, 4.5.3-r2, 4.6.3
sys-devel/gcc-config:     1.6
sys-devel/libtool:        2.4.2
sys-devel/make:           3.82-r1
sys-kernel/linux-headers: 3.1 (virtual/os-headers)
sys-libs/glibc:           2.14.1-r3
Repositories: gentoo wdzierzan local
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA dlj-1.1 skype-eula googleearth AdobeFlash-10.1 Oracle-BCLA-JavaSE AdobeFlash-10.3"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -march=native"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt /var/lib/hsqldb /var/lib/redmine/config"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c /var/lib/redmine/config/locales /var/lib/redmine/config/settings.yml"
CXXFLAGS="-O2 -pipe -march=native"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles news parallel-fetch parse-eapi-ebuild-head protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch xattr"
FFLAGS=""
GENTOO_MIRRORS="ftp://mirror.switch.ch/mirror/gentoo/ "
LANG="en_US.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="en"
MAKEOPTS="-j16"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/var/lib/layman/wdzierzan /usr/local/portage"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="X aac accessibility acl alsa amd64 bash-completion berkdb bzip2 cairo chm cleartype cli cmake consolekit cracklib crypt cups cupsddk curl cxx dbus dri dvd encode exif expat fam ffmpeg fontconfig fortran gdbm gif git gnome gold gphoto2 gpm gtk iconv imagemagick inotify ipv6 jpeg jpeg2k kde kdrive kerberos kpathsea latex ldap libnotify lm_sensors mad mercurial mmx mng modules mp3 msn mudflap multilib mysql ncurses nls nptl ogg opencl opengl openmp oscar pam pch pcre pdf perl plasma png policykit ppds pppd pulseaudio python qt3support qt4 raw rdp readline samba sasl sdl semantic-desktop session snmp sound spell sql sse sse2 ssl startup-notification subversion svg taglib tcpd theora threads tiff truetype udev unicode upnp valgrind vim-syntax vorbis webkit x264 xattr xcb xcomposite xinerama xmp xorg xvid zeroconf zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en" PHP_TARGETS="php5-3" PYTHON_TARGETS="python3_2 python2_7" RUBY_TARGETS="ruby18 ruby19" USERLAND="GNU" VIDEO_CARDS="nvidia" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
Comment 1 Benjamin Schindler 2012-06-14 08:44:10 UTC
Created attachment 315255 [details]
build log

The error happens a bit earlier than an the end, which is why I'm posting the full build log: 


/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.3/../../../../x86_64-pc-linux-gnu/bin/ld: ../bfd/.libs/libbfd.so: error: undefined reference to 'dlopen'
/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.3/../../../../x86_64-pc-linux-gnu/bin/ld: ../bfd/.libs/libbfd.so: error: undefined reference to 'dlsym'
/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.3/../../../../x86_64-pc-linux-gnu/bin/ld: ../bfd/.libs/libbfd.so: error: undefined reference to 'dlerror'
Comment 2 Lukas Elsner 2012-06-14 12:55:58 UTC
same problem here.

gcc-4.5 working
gcc-4.6 not working
Comment 3 Benjamin Schindler 2012-06-14 13:17:10 UTC
Just tested here:

gcc-4.5: not working
gcc-4.6: not working
Comment 4 Peter Gantner (a.k.a. nephros) 2012-06-14 16:09:12 UTC
Not sure if that is the right place to fix it, but adding "-ldl" to the LIBS variable in the Makefile makes it compile.

This is necessary for the Makefiles in:
  <builddir>/binutils (LIBS=-lz ->  LIBS=-lz -ldl)
  <builddir>/gas      (LIBS=-lz ->  LIBS=-lz -ldl)
  <builddir>/gprof    (LIBS=-lm ->  LIBS=-lm -ldl)
Comment 5 Justin Lecher (RETIRED) gentoo-dev 2012-06-15 07:48:42 UTC
For me it was fine, all the way till gcc-4.7.0, then I switched to 4.7.1, rebuilt glibc and then binutils fails to build. Going back to gcc470 and rebuilding glibc with that version, doesn't help.
Comment 6 Justin Lecher (RETIRED) gentoo-dev 2012-06-15 08:00:15 UTC
@ryao
Your patch (1.3) broke it for me. It contains a couple of removals of libdl.so linking references.
Comment 7 Billy DeVincentis 2012-06-15 10:46:51 UTC
I hit this too with  gcc 4.6.3
Comment 8 Richard Yao (RETIRED) gentoo-dev 2012-06-15 13:43:17 UTC
The patch I added to the patchset to solve bug #347931 lacked a ./configure script update. The ./configure script is not regenerated, which caused this.

I have committed a fix to CVS. After a few hours, people who sync the portage tree should receive the fix. Sorry for the trouble.
Comment 9 sorin 2012-06-16 06:33:24 UTC
*** Bug 421261 has been marked as a duplicate of this bug. ***
Comment 10 Stefan de Konink 2012-06-18 09:33:51 UTC
In the latest portage this is still broken...
Comment 11 Justin Lecher (RETIRED) gentoo-dev 2012-06-18 10:40:55 UTC
(In reply to comment #10)
> In the latest portage this is still broken...

Please show a build.log. It is fine here
Comment 12 Richard Yao (RETIRED) gentoo-dev 2012-06-18 15:15:10 UTC
(In reply to comment #10)
> In the latest portage this is still broken...

Have you done `emerge --sync`? Would you post the contents of /usr/portage/sys-devel/binutils/binutils-2.22-r1.ebuild and the output of `emerge --info binutils`? Also, the build.log from the failure would be helpful.