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

Bug 136499

Summary: binutils-2.17.50.0.2 ld assertion error in elflink.c building glibc-2.4-r3
Product: Gentoo Linux Reporter: Ryan Hill (RETIRED) <rhill>
Component: [OLD] Core systemAssignee: Gentoo Toolchain Maintainers <toolchain>
Status: RESOLVED FIXED    
Severity: normal CC: gad.kadosh, gpp666_999, hanno
Priority: High    
Version: unspecified   
Hardware: x86   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: 66_all_binutils-2.17.50.0.2-warn-textrel.patch

Description Ryan Hill (RETIRED) gentoo-dev 2006-06-11 17:45:01 UTC
i686-pc-linux-gnu-gcc -nostdlib -nostartfiles -static -o /var/tmp/portage/glibc-2.4-r3/work/build-default-i686-pc-linux-gnu-nptl/elf/sln    /var/tmp/portage/glibc-2.4-r3/work/build-default-i686-pc-linux-gnu-nptl/csu/crt1.o /var/tmp/portage/glibc-2.4-r3/work/build-default-i686-pc-linux-gnu-nptl/csu/crti.o `i686-pc-linux-gnu-gcc --print-file-name=crtbegin.o` /var/tmp/portage/glibc-2.4-r3/work/build-default-i686-pc-linux-gnu-nptl/elf/sln.o  /var/tmp/portage/glibc-2.4-r3/work/build-default-i686-pc-linux-gnu-nptl/libc.a -lgcc -lgcc_eh   /var/tmp/portage/glibc-2.4-r3/work/build-default-i686-pc-linux-gnu-nptl/libc.a `i686-pc-linux-gnu-gcc --print-file-name=crtend.o` /var/tmp/portage/glibc-2.4-r3/work/build-default-i686-pc-linux-gnu-nptl/csu/crtn.o
collect2: ld terminated with signal 11 [Segmentation fault]
/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/../../../../i686-pc-linux-gnu/bin/ld: BFD 2.17.50.0.2 20060526 assertion fail /var/tmp/portage/binutils-2.17.50.0.2/work/binutils-2.17.50.0.2/bfd/elflink.c:8692
make[2]: *** [/var/tmp/portage/glibc-2.4-r3/work/build-default-i686-pc-linux-gnu-nptl/elf/sln] Error 1


# emerge --info
Portage 2.1 (default-linux/x86/2006.0, gcc-4.1.1/vanilla, glibc-2.4-r3, 2.6.17-rc6-ck1 i686)
=================================================================
System uname: 2.6.17-rc6-ck1 i686 Genuine Intel(R) CPU           T2300  @ 1.66GHz
Gentoo Base System version 1.12.1
ccache version 2.4 [enabled]
dev-lang/python:     2.4.3-r1
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     2.4-r2
dev-util/confcache:  0.4.2-r1
sys-apps/sandbox:    1.2.18.1
sys-devel/autoconf:  2.13, 2.59-r7
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2
sys-devel/binutils:  2.16.1-r2, 2.16.93, 2.17.50.0.2
sys-devel/gcc-config: 2.0.0_rc1
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.11-r5
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=prescott -fomit-frame-pointer -pipe -fno-ident -g"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config"
CONFIG_PROTECT_MASK="/etc/env.d /etc/eselect/compiler /etc/gconf /etc/revdep-rebuild /etc/terminfo"
CXXFLAGS="-O2 -march=prescott -fomit-frame-pointer -pipe -fno-ident -g -fvisibility-inlines-hidden"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig ccache digest distlocks fixpackages metadata-transfer parallel-fetch sandbox sfperms splitdebug strict"
GENTOO_MIRRORS=" http://gentoo.chem.wisc.edu/gentoo/ http://gentoo.osuosl.org/ ftp://cs.ubishops.ca/pub/gentoo http://prometheus.cs.wmich.edu/gentoo"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude='/distfiles' --exclude='/local' --exclude='/packages'"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/home/dirtyepic/overlay"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="x86 X a52 aac acpi alsa berkdb bzip2 caps cdparanoia crypt cscope curl dri dts dvd dvdr dvdread encode expat fam ffmpeg flac gdbm gif gmp gnutls gtk hal imap java jikes jpeg kde kdeenablefinal kdehiddenvisibility lm_sensors mad mbox mmap mmx mp3 mpeg ncurses nptl nsplugin ogg opengl pam perl pic png python qt quicktime readline ruby sdl session sqlite sse sse2 ssl startup-notification tcpd threads truetype vcd vorbis win32codecs xml xml2 xv xvid zlib elibc_glibc input_devices_joystick input_devices_mouse input_devices_keyboard input_devices_synaptics kernel_linux userland_GNU video_cards_fglrx video_cards_radeon"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTAGE_RSYNC_EXTRA_OPTS

also fails during the build-x86 stage of building glibc on amd64.
Comment 1 Thomas S. Howard 2006-06-14 14:50:04 UTC
I'm seeing something similar with the kernel, on amd64:

  LD      init/built-in.o
  LD      .tmp_vmlinux1
ld: BFD 2.17.50.0.2 20060526 assertion fail /var/tmp/portage/binutils-2.17.50.0.2/work/binutils-2.17.50.0.2/bfd/elflink.c:8692
/bin/sh: line 1:  8073 Segmentation fault      ld -m elf_x86_64 -o .tmp_vmlinux1 -T arch/x86_64/kernel/vmlinux.lds arch/x86_64/kernel/head.o arch/x86_64/kernel/head64.o arch/x86_64/kernel/init_task.o init/built-in.o --start-group usr/built-in.o arch/x86_64/kernel/built-in.o arch/x86_64/mm/built-in.o arch/x86_64/crypto/built-in.o arch/x86_64/ia32/built-in.o kernel/built-in.o mm/built-in.o fs/built-in.o ipc/built-in.o security/built-in.o crypto/built-in.o block/built-in.o lib/lib.a arch/x86_64/lib/lib.a lib/built-in.o arch/x86_64/lib/built-in.o drivers/built-in.o sound/built-in.o arch/x86_64/pci/built-in.o net/built-in.o --end-group
make: *** [.tmp_vmlinux1] Error 139
Comment 2 Thomas S. Howard 2006-06-16 16:15:40 UTC
As you can see, this is now appearing with 2.16.94. The only difference is the line number in elflink.c:

ld: BFD 2.16.94 20060612 assertion fail /var/tmp/portage/binutils-2.16.94/work/binutils-2.16.94/bfd/elflink.c:8679
/bin/sh: line 1: 15229 Segmentation fault      ld -m elf_x86_64 -o .tmp_vmlinux1 -T arch/x86_64/kernel/vmlinux.lds arch/x86_64/kernel/head.o arch/x86_64/kernel/head64.o arch/x86_64/kernel/init_task.o init/built-in.o --start-group usr/built-in.o arch/x86_64/kernel/built-in.o arch/x86_64/mm/built-in.o arch/x86_64/crypto/built-in.o arch/x86_64/ia32/built-in.o kernel/built-in.o mm/built-in.o fs/built-in.o ipc/built-in.o security/built-in.o crypto/built-in.o block/built-in.o lib/lib.a arch/x86_64/lib/lib.a lib/built-in.o arch/x86_64/lib/built-in.o drivers/built-in.o sound/built-in.o arch/x86_64/pci/built-in.o net/built-in.o --end-group
make: *** [.tmp_vmlinux1] Error 139
Comment 3 Gergan Penkov 2006-06-17 07:19:00 UTC
this is probably because of 66-all-binutils-xxx-warn-textrel.patch
I have this problem with wine compilation, it seems that the patch removes the check for shared object && info->shared which results in the assestion afterwards. As the problems are with objects, which are not shared or so it seems.
Comment 4 Gergan Penkov 2006-06-17 09:03:12 UTC
Created attachment 89397 [details, diff]
66_all_binutils-2.17.50.0.2-warn-textrel.patch

What about patching it this way, it uses the 2.16.93 of checking for text-relocations for non-shared objects and leave the new upstream check in peace.  Well I'm not sure how correct this will check for relocations (which is what this patch does), although the logic is the same as earlier and it adds a ignore line for the upstream message, but at least I could compile wine now. 
it is for 2.16.94 I haven't tested it with 2.17.xx ebuild
Comment 5 SpanKY gentoo-dev 2006-06-17 14:10:50 UTC
thanks ... ive fixed the patch in a slightly different way though ;)