Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 316429 - sys-devel/binutils-2.20.1 - ld intermittently dropping first character of referenced symbol
Summary: sys-devel/binutils-2.20.1 - ld intermittently dropping first character of ref...
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: AMD64 Linux
: High normal (vote)
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-04-20 21:53 UTC by James Brown
Modified: 2012-07-26 20:21 UTC (History)
0 users

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 James Brown 2010-04-20 21:53:39 UTC
I've had an intermittent and very annoying bug for the past couple of months on my ~amd64 system. Sometimes, when linking, ld will drop the first character of a referenced symbol. This leads to errors like the following:

/usr/lib/gcc/x86_64-pc-linux-gnu/4.4.3/../../../../lib64/libcairo.so: undefined reference to `litz_surface_set_filter'

Looking at /usr/lib64/libcairo.so shows that "glitz_surface_set_filter" is correctly listed (no dropped "g").

It seems to reproduce completely nondeterministically -- repeating the compile again immediately will often succeed.

This is anecdotal, but all of the instances I can remember have the first character as "g". That might just be because I build a lot of Gtk+/Glib-based packages, or it might be related to an actual bug somewhere...

I've rebuilt both binutils and gcc, and also built them with empty CFLAGS and LDFLAGS in case it's some optimization gone wrong. The problem continues after the rebuilds.

Reproducible: Sometimes

Steps to Reproduce:
Attempt to emerge a package
Actual Results:  
Build fails with nonsensical linking error

Expected Results:  
Build succeeds

% emerge --info
Portage 2.2_rc67 (default/linux/amd64/10.0/desktop, gcc-4.4.3, glibc-2.11-r1, 2.6.31-gentoo-r6 x86_64)
=================================================================
System uname: Linux-2.6.31-gentoo-r6-x86_64-AMD_Athlon-tm-_64_X2_Dual_Core_Processor_3800+-with-gentoo-2.0.1
Timestamp of tree: Tue, 20 Apr 2010 16:15:01 +0000
ccache version 2.4 [disabled]
app-shells/bash:     4.1_p2-r1
dev-java/java-config: 2.1.10
dev-lang/python:     2.5.4-r4, 2.6.5-r1, 3.1.2-r1
dev-python/pycrypto: 2.1.0
dev-util/ccache:     2.4-r8
dev-util/cmake:      2.8.0
sys-apps/baselayout: 2.0.1
sys-apps/openrc:     0.6.1-r1
sys-apps/sandbox:    2.2
sys-devel/autoconf:  2.13, 2.65
sys-devel/automake:  1.4_p6-r1, 1.5-r1, 1.6.3-r1, 1.7.9-r2, 1.8.5-r4, 1.9.6-r3, 1.10.3, 1.11.1
sys-devel/binutils:  2.20.1
sys-devel/gcc:       4.3.4, 4.4.3
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   1.3.5, 2.2.6b
virtual/os-headers:  2.6.33
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA dlj-1.1 FSF_APPROVED skype-eula"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=k8 -O2 -pipe -ggdb"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/X11/xkb /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /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"
CXXFLAGS="-march=k8 -O2 -pipe -ggdb"
DISTDIR="/mnt/portage/distfiles"
FEATURES="assume-digests distlocks fixpackages metadata-transfer news parallel-fetch preserve-libs protect-owned sandbox sfperms splitdebug strict unmerge-logs unmerge-orphans userfetch userpriv usersandbox"
GENTOO_MIRRORS="http://gentoo.osuosl.org/ http://gentoo.mirrors.tera-byte.com/ http://gentoo.netnitco.net http://osmirrors.cerias.purdue.edu/pub/gentoo/ http://gentoo.arcticnetwork.ca/source/"
LANG="en_US.UTF-8"
LC_ALL="en_US.UTF-8"
LDFLAGS="-Wl,-O1"
LINGUAS="en"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/mnt/portage/portage"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/portage/local/layman/sunrise /usr/portage/local/layman/clamz /usr/portage/local/layman/ruby /usr/local/portage"
SYNC="rsync://rsync.namerica.gentoo.org/gentoo-portage"
USE="3dnow 3dnowext 3ds 64bit 7zip R S3TC X X509 a52 aac aalib acl acpi aiglx aim alsa amazon amd64 amr amrnb amrwb animgif ansi ao apache2 apm applet archive artworkextra async auctex automount avahi bash-completion berkdb binary-drivers binfilter bittorrent blender-game bonjour bookmarks boost branding browserplugin bzip2 c++ cairo calendar cblas cdda cddb cdparanoia cdr cdrom cg cgi cli clisp compress config-file console consolekit cpio cpudetection cracklib crypt cscope css csv cups curl cursors cvs cxx d daap dbus depth32 deskbar devhelp device-mapper dhcp divx djvu dnd dnotify dns dts dvd dvdnav dvdr dvi ecc effects elf elisp emacs emerald emoticon emul-linux-x86 encode epiphany erandom ethereal excel exif exo extensions extra extra-algorithms extraicons extramodules extras faac fam fat fbcon fbdev festival ffi ffmpeg fftw fix-connected-rt flac flash fltk fontconfig foomaticdb fortran fortran95 freetype ftp fts3 fuse gajim galago games gcc-libffi gcj gcl gconf gd gdb gdbm gdm gdu gecko gedit geoip gif gimp gimpprint glade glep glib glitz glsa glut gmail gmedia gnome-print gnuplot gnustep gnutella gnutls gpg gpgme gphoto2 gpm graphics graphviz grub gs gsf gstreamer gtk gtkspell guile gzip h323 hal hash haskell hbci hddtemp hfs highlight hinotify howl-compat hpn html http http-forms http-server humanities ical icecast icons iconv icq id3 idea ilbc imagemagick imap imlib imlib2 inherit-graph inkjar innodb inotify ipod ipv6 iso14755 jabber java java-external java5 java6 javascript jfs jikes jingle joystick jpeg jpeg2k kcal kdrive keyring keyscrub kpathsea kqemu kvm lame lapack latex latin1 lcms ldap libnotify libsamplerate libsexy libssh2 libwww llvm lm_sensors logitech-mouse logrotate lua lucene lyrics lzo mad math maya-shaderlibrary mbrola md5sum mdb mdnsresponder-compat mikmod ming mmap mmx mmxext mng mod_python models modules mono moonlight mouse mozbranding mozcalendar mozdevelop mozdom moznoroaming mp3 mp4 mp4live mpd mpeg mpeg2 mplayer mppe-mppc mschap msn mudflap multilib music musicbrainz mysql mysqli nautilus ncurses neon net network network-cron networking nforce2 nfs nfsexport nls nptl nptlonly nsplugin ntfs ntp numarray numeric nvidia nvtv objc objc++ objc-gc ocaml octave odbc offensive ofx ogg ogg123 ogm ole on-the-fly-crypt openal openbabel openexr opengl openmp openssl optimisememory oscar pam pango pcntl pcre pdf perl php pidgin pipe pipechan pixmaps planner player plotutils plugins pmount png pnp policykit pop pop3d poppler-data posix postscript ppds pppd prediction print ps pstricks publishers pulseaudio python qemu qt3support qt4 quotes rar rdesktop readline realmedia reflection regex regexp reiser4 reiserfs replaygain rhythmbox rss rsvg rtsp ruby samba samplerate sasl scanner science screen sdl sdl-sound sensord server session sftp shared shorten shout silc sip smime smp sms smtp sockets socks5 sound sourceview speex spell spl spreadsheet sql sqlite sqlite3 srt sse sse2 ssl startup-notification stencil-buffer stream subtitles subversion svg svgz swig sysfs syslog t1lib tabs taglib tagwriting tcl tcltk tcpd tex textures tga themes theora thesaurus threads threadsafe thumbnail thumbnailing thunar-vfs thunderbird tidy tiff timidity tk toolkit-scroll-bars tools totem transcode transparency trayicon truetype type1 unac unicode unzip upnp ups urandom usb uudeview uuencode v4l v4l2 valgrind vhosts videos vim vim-syntax vim-with-x vnc vncviewer voice vorbis wav weather webdav webdav-neon wireshark wma wmp wordperfect wxwindows x264 xanim xattr xcb xcf xchat xcomposite xetex xext xfce xforms xfs xft xhtml xml xmldoclet xmlreader xmlrpc xmlwriter xmp xorg xosd xplanet xpm xrandr xscreensaver xterm-color xulrunner xv xvid yahoo zeroconf zip zlib zsh-completion zvbi" 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 auth_digest authn_anon authn_dbd authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock dbd deflate dir disk_cache env expires ext_filter file_cache filter headers ident imagemap include info log_config logio mem_cache mime mime_magic negotiation proxy proxy_ajp proxy_balancer proxy_connect proxy_http rewrite setenvif so speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="evdev wacom" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="nv nvidia vesa" 
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 James Brown 2010-05-10 22:00:49 UTC
Just had this happen four times in a row with nautilus, all on different symbols. The fifth build succeeded.
Comment 2 SpanKY gentoo-dev 2010-05-11 02:45:11 UTC
unfortunately, since you're the only reporter and no one else can reproduce, you might have to do some digging on your side.  what might be useful is to find the smallest package that you've seen fail.  then put it into a loop:
while ! emerge -q <pkg> ; do :; done

once that fails, go into the build dir and run the link command that failed:
while ! <link command> ; do :; done

if you can get that to fail, then it'd be easier to throw a debugger at the issue.  if it doesnt, go back to the emerge step and try disabling some FEATURES:
export FEATURES="-sandbox -userpriv -usersandbox"
while ! emerge -q <pkg> ; do :; done
Comment 3 SpanKY gentoo-dev 2010-12-09 11:22:20 UTC
2.21 is in the tree if you want to give that a spin
Comment 4 SpanKY gentoo-dev 2012-07-26 20:21:28 UTC
2.21 is stable, and we're stabilizing 2.22, so re-open if still a problem