| Summary: | binutils ld crashes with BFD 2.14.90.0.8 20040114 assertion fail elflink.h:4487 | ||
|---|---|---|---|
| Product: | Gentoo Linux | Reporter: | Martijn Koster <mak-gentoo-bugzilla> |
| Component: | [OLD] Development | Assignee: | Gentoo Toolchain Maintainers <toolchain> |
| Status: | RESOLVED FIXED | ||
| Severity: | minor | CC: | chutzpah |
| Priority: | High | ||
| Version: | unspecified | ||
| Hardware: | x86 | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Package list: | Runtime testing required: | --- | |
|
Description
Martijn Koster
2004-02-18 10:29:55 UTC
Can you try with distcc disabled? Same thing. export PATH=/bin:/usr/bin:/usr/local/bin:/usr/i686-pc-linux-gnu/gcc-bin/3.3 hash -r rm *.o *.a make ... collect2: ld terminated with signal 11 [Segmentation fault] /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.2/../../../../i686-pc-linux-gnu/bin/ld: BFD 2.14.90.0.8 20040114 assertion fail elflink.h:4505 Note that the assertion line number is different, that's because I updated binutils to 2.14.90.0.8-r1. Works fine here. What about if you merge the one in portage? By "the one in portage" you mean cdb? That works fine; portage applies a patch that fixes errno, so there is no error for ld to report (or in my case crash on). What versions of gcc/glibc/binutils/kernel are you running? Minimal reproduction:
$ echo "extern int errno; int main() { int x = errno; }" > s.c
$ /usr/bin/gcc -c s.c
$ /usr/bin/gcc -o s s.o
collect2: ld terminated with signal 11 [Segmentation fault]
/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.3/../../../../i686-pc-linux-gnu/bin/ld: BFD 2.14.90.0.8 20040114 assertion fail elflink.h:4505
I get (probably the same bug) trying to compile the 2.6.4 user-mode-linux sources. Bumping up the severity a bit, this is probably not a good thing to have around for too long. /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.3/../../../../i686-pc-linux-gnu/bin/ld: BFD 2.14.90.0.8 20040114 assertion fail elf.c:3465 Ran into this trying to compile a 2.6 UML kernel too. However, this seems to be gcc-related, rather than binutils/ld. I base this on the fact that the minimal example doesn't trigger the assertion on Fedora core 2 test 2, but when using the Fedora binutils on Gentoo, the same (ok, very similar, the line number reported is different) problem ensues. So I suspect gcc (I've tried Gentoo gcc-3.3.3-r3 and r4) is the culprit. Me too!
Basic problem is I cant load any modules as module-init-tools wont build so I had too build a monlithic kernel to boot - as this is my gateway machine I need to fix it. Any hints short of a reinstall welcome.
This machine was originally built as a a gentoo 1.1a a couple of years back, and is currently an up to date default-1.4 profile (upgraded each major change). I recently changed the cpu from a cyrix 686 to a k6-2, first recompiling the whole system down to a 586 before swapping MB/CPU. Worked fine, so I then changed to a 2.6.7 gentoo-dev-sources/udev with no problems. After changing the CFLAGS to k6-2, and building some 200 packages, this problem occurred which has stopped me dead. So far I have cleaned ccache out and recompiled glibc/binutils/gcc
gcc -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE=\"module-init-tools\" -DVERSION=\"
3.0\" -DCONFIG_USE_ZLIB=1 -I. -I. -march=k6-2 -O2 -pipe -fomit-frame-pointer -Wunused -Wall -c `test -f 'modinfo.c' || echo './'`modinfo.c
gcc -march=k6-2 -O2 -pipe -fomit-frame-pointer -Wunused -Wall -o insmod.static -static insmod.o
gcc -march=k6-2 -O2 -pipe -fomit-frame-pointer -Wunused -Wall -o lsmod lsmod.o -Wl,-Bstatic -lz -Wl,-Bdynamic
gcc -march=k6-2 -O2 -pipe -fomit-frame-pointer -Wunused -Wall -o insmod insmod.o -Wl,-Bstatic -lz -Wl,-Bdynamic
gcc -march=k6-2 -O2 -pipe -fomit-frame-pointer -Wunused -Wall -o modprobe modprobe.o zlibsupport.o -Wl,-Bstatic -lz -Wl,-Bdynamic
gcc -march=k6-2 -O2 -pipe -fomit-frame-pointer -Wunused -Wall -o rmmod rmmod.o -Wl,-Bstatic -lz -Wl,-Bdynamic
gcc -march=k6-2 -O2 -pipe -fomit-frame-pointer -Wunused -Wall -o depmod depmod.o moduleops.o tables.o zlibsupport.o -Wl,-Bstatic -lz -Wl,-Bdynamic
gcc -march=k6-2 -O2 -pipe -fomit-frame-pointer -Wunused -Wall -o modinfo modinfo.o zlibsupport.o -Wl,-Bstatic -lz -Wl,-Bdynamic
collect2: ld terminated with signal 11 [Segmentation fault]
/usr/lib/gcc-lib/i586-pc-linux-gnu/3.3.3/../../../../i586-pc-linux-gnu/bin/ld: BFD 2.14.90.0.8 20040114 assertion fail elflink.h:4505
distcc[4501] ERROR: compile on localhost failed
make: *** [modprobe] Error 1
make: *** Waiting for unfinished jobs....
collect2: ld terminated with signal 11 [Segmentation fault]
/usr/lib/gcc-lib/i586-pc-linux-gnu/3.3.3/../../../../i586-pc-linux-gnu/bin/ld: BFD 2.14.90.0.8 20040114 assertion fail elflink.h:4505
distcc[4514] ERROR: compile on localhost failed
make: *** [depmod] Error 1
collect2: ld terminated with signal 11 [Segmentation fault]
/usr/lib/gcc-lib/i586-pc-linux-gnu/3.3.3/../../../../i586-pc-linux-gnu/bin/ld: BFD 2.14.90.0.8 20040114 assertion fail elflink.h:4505
distcc[4521] ERROR: compile on localhost failed
make: *** [modinfo] Error 1
!!! ERROR: sys-apps/module-init-tools-3.0-r2 failed.
!!! Function src_compile, Line 89, Exitcode 2
!!! emake module-init-tools failed
moriah root # emerge info
Portage 2.0.50-r9 (default-x86-1.4, gcc-3.3.3, glibc-2.3.3.20040420-r0,2.2.5-r4, 2.6.7-gentoo-r11)
=================================================================
System uname: 2.6.7-gentoo-r11 i586 AMD-K6(tm) 3D processor
Gentoo Base System version 1.4.16
distcc 2.13 i586-pc-linux-gnu (protocols 1 and 2) (default port 3632) [enabled]
ccache version 2.3 [enabled]
Autoconf: sys-devel/autoconf-2.59-r3
Automake: sys-devel/automake-1.8.3
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CFLAGS="-march=k6-2 -O2 -pipe -fomit-frame-pointer"
CHOST="i586-pc-linux-gnu"
COMPILER="gcc3"
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3.1/share/config /usr/kde/3.2/share/config /usr/kde/3/share/config /usr/lib/mozilla/
defaults/pref /usr/share/config /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/
config/ /usr/share/texmf/xdvi/ /var/bind /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-march=k6-2 -O2 -pipe -fomit-frame-pointer"
DISTDIR="/home/distfiles"
FEATURES="autoaddcvs ccache distcc sandbox"
GENTOO_MIRRORS="rsync://rattus.localdomain/portage"
MAKEOPTS="-j5"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/home/portage-tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X apache2 apm atlas berkdb bonobo crypt cscope cups curl dga directfb dnd encode esd ethereal evo fam fastcgi foomaticdb gd gdbm gif gnome gnomedb gphoto2 g
pm gtk gtk2 gtkhtml guile imap imlib java jpeg libg++ libgda libwww linguas_en_AU maildir mdb mikmod mmx motif mozctl mozilla mozinterfaceinfo moznoirc moznomail
moznoxft mozp3p mozsvg mozxmlterm mpeg mpeg4 mplayer mysql ncurses nptl odbc oggvorbis opengl openssh oss pam pdflib perl php pic plotutils png pnp ppds python
readline samba sdl sis slang slp spell ssl svga tcltk tcpd tetex tiff transparent-proxy truetype trusted type1 usb uudeview wavelan wmf x86 xface xml xml2 xmms x
randr xv zlib"
seems to be fixed with newer binutils ... 2.15.94+ |