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

Bug 115603

Summary: ld (binutils-2.16.1-r1) returns internal error when using -Wl,--as-needed
Product: Gentoo Linux Reporter: David Pyke <gentoo-bugs>
Component: [OLD] DevelopmentAssignee: Gentoo Linux bug wranglers <bug-wranglers>
Status: RESOLVED UPSTREAM    
Severity: normal CC: azdruid, btj, bulliver, cedk, e.liubarskij, flameeyes, leio, mjsb, mohringarmin, schubert.seb, smrspam88, stator, thewolf86, toffanin.mauro, vapier
Priority: High    
Version: 2005.1   
Hardware: AMD64   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 129413    
Attachments: Log of the error

Description David Pyke 2005-12-14 16:08:53 UTC
An internal error (below) is generated with wxGTK when using --as-needed.

x86_64-pc-linux-gnu-g++ -shared -fPIC -o lib/libwx_gtk2_media-2.6.so.0.2.0 
mediadll_mediactrlcmn.o mediadll_mediactrl.o  -Llib -Llib -pthread -Wl,-O1
-Wl,--as-needed  -L/usr/X11R6/lib64    -Llib  
-Wl,-soname,libwx_gtk2_media-2.6.so.0          -pthread -Wl,-O1 -Wl,--as-needed
 -L/usr/X11R6/lib64 -Wl,--version-script,version-script -lz -ldl -lm  -pthread
-lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lm -lpango-1.0
-lgobject-2.0 -lgmodule-2.0 -ldl -lgthread-2.0 -lglib-2.0 -lXinerama -lXxf86vm
-lpng -lz -ljpeg -ltiff -lwx_gtk2_core-2.6 -lwx_base-2.6
/usr/lib/gcc/x86_64-pc-linux-gnu/3.4.4/../../../../x86_64-pc-linux-gnu/bin/ld:
BFD 2.16.1 assertion fail
/mnt/windows/tmp/portage/binutils-2.16.1-r1/work/binutils-2.16.1/bfd/elflink.c:2334
/usr/lib/gcc/x86_64-pc-linux-gnu/3.4.4/../../../../x86_64-pc-linux-gnu/bin/ld:
BFD 2.16.1 assertion fail
/mnt/windows/tmp/portage/binutils-2.16.1-r1/work/binutils-2.16.1/bfd/elflink.c:2335
/usr/lib/gcc/x86_64-pc-linux-gnu/3.4.4/../../../../x86_64-pc-linux-gnu/bin/ld:
BFD 2.16.1 assertion fail
/mnt/windows/tmp/portage/binutils-2.16.1-r1/work/binutils-2.16.1/bfd/elflink.c:2334
/usr/lib/gcc/x86_64-pc-linux-gnu/3.4.4/../../../../x86_64-pc-linux-gnu/bin/ld:
BFD 2.16.1 assertion fail
/mnt/windows/tmp/portage/binutils-2.16.1-r1/work/binutils-2.16.1/bfd/elflink.c:2335
/usr/lib/gcc/x86_64-pc-linux-gnu/3.4.4/../../../../x86_64-pc-linux-gnu/bin/ld:
BFD 2.16.1 assertion fail
/mnt/windows/tmp/portage/binutils-2.16.1-r1/work/binutils-2.16.1/bfd/elflink.c:2334
/usr/lib/gcc/x86_64-pc-linux-gnu/3.4.4/../../../../x86_64-pc-linux-gnu/bin/ld:
BFD 2.16.1 assertion fail
/mnt/windows/tmp/portage/binutils-2.16.1-r1/work/binutils-2.16.1/bfd/elflink.c:2335
/usr/lib/gcc/x86_64-pc-linux-gnu/3.4.4/../../../../x86_64-pc-linux-gnu/bin/ld:
BFD 2.16.1 internal error, aborting at
/mnt/windows/tmp/portage/binutils-2.16.1-r1/work/binutils-2.16.1/bfd/elflink.c
line 6518 in elf_link_output_extsym

/usr/lib/gcc/x86_64-pc-linux-gnu/3.4.4/../../../../x86_64-pc-linux-gnu/bin/ld:
Please report this bug.

collect2: ld returned 1 exit status

Portage 2.0.51.22-r3 (default-linux/amd64/2005.1, gcc-3.4.4, glibc-2.3.6-r1,
2.6.14-ck6 x86_64)
=================================================================
System uname: 2.6.14-ck6 x86_64 AMD Athlon(tm) 64 X2 Dual Core Processor 4200+
Gentoo Base System version 1.6.13
ccache version 2.4 [enabled]
dev-lang/python:     2.4.2
sys-apps/sandbox:    1.2.12
sys-devel/autoconf:  2.13, 2.59-r6
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1
sys-devel/binutils:  2.16.1-r1
sys-devel/libtool:   1.5.20
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="amd64"
AUTOCLEAN="yes"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O3 -march=athlon64 -pipe -msse3"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config
/usr/lib/X11/xkb /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O3 -march=athlon64 -pipe -msse3"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig ccache distlocks sandbox sfperms strict"
GENTOO_MIRRORS="http://gentoo.mirrored.ca/ http://gentoo.mirrors.tds.net/gentoo
http://gentoo.mirrors.pair.com/"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/mnt/windows/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="amd64 X aac acpi alsa apache2 audiofile avi berkdb bidi bitmap-fonts blas
bmp bonobo browserplugin bzip2 cdb cdparanoia cdr crypt cups curl dbus dlloader
dri dts dvd dvdr dvdread eds emboss emul-linux-x86 encode esd ethereal evo exif
expat fam fbcon ffmpeg firefox flac foomaticdb fortran ftp gd gdbm gif glut
gnome gpm gstreamer gtk gtk2 gtkhtml guile hal icq idn ieee1394 imagemagick
imlib ipv6 java jpeg lapack lcms libwww lm_sensors lzw lzw-tiff mad maildir mbox
mhash mime mng mp3 mpeg msn nas ncurses nls nptl nsplugin nvidia offensive ogg
oggvorbis openal opengl oscar pam pcre pda pdflib perl php plotutils png ppds
python qt quicktime readline recode samba sdl smp sndfile snmp soap sockets sox
speex spell ssl tcltk tcpd theora threads tidy tiff truetype truetype-fonts
type1-fonts udev usb userlocales v4l vcd videos vorbis wifi wxwindows xine xml
xml2 xmms xpm xv xvid zlib userland_GNU kernel_linux elibc_glibc"
Unset:  ASFLAGS, CTARGET, LANG, LC_ALL, LINGUAS
Comment 1 Jory A. Pratt 2005-12-14 16:33:05 UTC
could you please provide the log. A simple way of getting the log is 'emerge
wxGTK &> wxGTK.log'
Comment 2 David Pyke 2005-12-14 17:08:45 UTC
Created attachment 74769 [details]
Log of the error

This is the error.  It's strange but once the error happens, the emerge process
does a random thing...

Sometimes it does nothing, this time it rechecked the files...
Comment 3 SpanKY gentoo-dev 2006-02-28 21:31:48 UTC
personally, i'd just mark this as WONTFIX

using -Wl,--as-needed in global LDFLAGS is not supported
Comment 4 Diego Elio Pettenò (RETIRED) gentoo-dev 2006-03-01 00:50:31 UTC
I'm quite sure I've filtered out --as-needed from both wxGTK and the major wxGTK-using apps.
As I said on the as needed guide, when the problem is the linker, you either filter or go debugging it.

Feel free to debug it as you dropped the filtering.
Comment 5 Diego Elio Pettenò (RETIRED) gentoo-dev 2006-04-09 21:09:29 UTC
I suppose this problem can be brought upstream by anyone who has time to do that...
In the mean time this is no problem as both wxlib and wxwindows eclass filters the flag.
Comment 6 SpanKY gentoo-dev 2006-04-09 21:16:42 UTC
upstream binutils maintainers are already aware of issues with as-needed

pestering them more at this time wont help
Comment 7 Diego Elio Pettenò (RETIRED) gentoo-dev 2006-04-09 21:23:44 UTC
Hm I've seen a thread about --as-needed on binutils ML in the last days, asking for feedback.

Of course telling them again there's a problem doesn't help.. providing a testcase with a backtrace is more likely to be a good idea.

Anyway, for sure not something we can/have time to do.
Comment 8 Jakub Moc (RETIRED) gentoo-dev 2006-04-23 04:52:04 UTC
*** Bug 130954 has been marked as a duplicate of this bug. ***
Comment 9 Jakub Moc (RETIRED) gentoo-dev 2006-04-25 23:13:01 UTC
*** Bug 131286 has been marked as a duplicate of this bug. ***
Comment 10 Jakub Moc (RETIRED) gentoo-dev 2006-05-07 10:15:49 UTC
*** Bug 132592 has been marked as a duplicate of this bug. ***
Comment 11 Jakub Moc (RETIRED) gentoo-dev 2006-07-15 02:45:52 UTC
*** Bug 140450 has been marked as a duplicate of this bug. ***
Comment 12 Jakub Moc (RETIRED) gentoo-dev 2006-08-05 05:01:19 UTC
*** Bug 142870 has been marked as a duplicate of this bug. ***
Comment 13 Jakub Moc (RETIRED) gentoo-dev 2006-09-26 10:31:50 UTC
*** Bug 149181 has been marked as a duplicate of this bug. ***
Comment 14 Jakub Moc (RETIRED) gentoo-dev 2006-10-03 08:16:42 UTC
*** Bug 149962 has been marked as a duplicate of this bug. ***
Comment 15 Jakub Moc (RETIRED) gentoo-dev 2006-10-07 01:49:49 UTC
*** Bug 150345 has been marked as a duplicate of this bug. ***
Comment 16 Mart Raudsepp gentoo-dev 2006-10-07 07:00:30 UTC
Reopening to reassign away from wxwindows@ to bug-wranglers
Comment 17 Mart Raudsepp gentoo-dev 2006-10-07 07:02:55 UTC
And closing again with a forced-upon-me comment
Comment 18 Jakub Moc (RETIRED) gentoo-dev 2006-10-15 10:19:31 UTC
*** Bug 151478 has been marked as a duplicate of this bug. ***
Comment 19 Jakub Moc (RETIRED) gentoo-dev 2006-10-27 08:39:29 UTC
*** Bug 152987 has been marked as a duplicate of this bug. ***
Comment 20 Jakub Moc (RETIRED) gentoo-dev 2006-11-09 03:38:23 UTC
*** Bug 154549 has been marked as a duplicate of this bug. ***
Comment 21 Jakub Moc (RETIRED) gentoo-dev 2007-05-20 14:03:47 UTC
*** Bug 179212 has been marked as a duplicate of this bug. ***
Comment 22 Jakub Moc (RETIRED) gentoo-dev 2007-05-20 16:23:22 UTC
*** Bug 179212 has been marked as a duplicate of this bug. ***
Comment 23 Jakub Moc (RETIRED) gentoo-dev 2008-02-15 02:17:30 UTC
*** Bug 210194 has been marked as a duplicate of this bug. ***