When emerging glibc-2.9_p20081201-r1 with new binutils-2.19.51.0.2, this error occurs : x86_64-pc-linux-gnu-gcc -Wl,-O1 -Wl,--enable-new-dtags -Wl,--as-needed -Wl,--hash-style=gnu -Wl,-zdynsort,-z,--sort-common -s -nostdlib -nostartfiles -shared -o /var/tmp/portage/sys-libs/glibc-2.9_p20081201-r1/work/build-amd64-x86_64-pc-linux-gnu-nptl/elf/ld.so \ -Wl,-z,combreloc -Wl,-z,relro -Wl,--hash-style=both -Wl,-z,defs -Wl,-z,now \ /var/tmp/portage/sys-libs/glibc-2.9_p20081201-r1/work/build-amd64-x86_64-pc-linux-gnu-nptl/elf/librtld.os -Wl,--version-script=/var/tmp/portage/sys-libs/glibc-2.9_p20081201-r1/work/build-amd64-x86_64-pc-linux-gnu-nptl/ld.map \ -Wl,-soname=ld-linux-x86-64.so.2 -T /var/tmp/portage/sys-libs/glibc-2.9_p20081201-r1/work/build-amd64-x86_64-pc-linux-gnu-nptl/elf/ld.so.lds /var/tmp/portage/sys-libs/glibc-2.9_p20081201-r1/work/build-amd64-x86_64-pc-linux-gnu-nptl/elf/librtld.os: In function `_dl_initial_error_catch_tsd': (.text+0x8fc): undefined reference to `_begin' /usr/lib/gcc/x86_64-pc-linux-gnu/4.3.3/../../../../x86_64-pc-linux-gnu/bin/ld: /var/tmp/portage/sys-libs/glibc-2.9_p20081201-r1/work/build-amd64-x86_64-pc-linux-gnu-nptl/elf/librtld.os: relocation R_X86_64_PC32 against undefined hidden symbol `_begin' can not be used when making a shared object /usr/lib/gcc/x86_64-pc-linux-gnu/4.3.3/../../../../x86_64-pc-linux-gnu/bin/ld: final link failed: Bad value collect2: ld returned 1 exit status make[2]: *** [/var/tmp/portage/sys-libs/glibc-2.9_p20081201-r1/work/build-amd64-x86_64-pc-linux-gnu-nptl/elf/ld.so] Error 1 make[2]: Leaving directory `/var/tmp/portage/sys-libs/glibc-2.9_p20081201-r1/work/glibc-2.9-20081201/elf' make[1]: *** [elf/subdir_lib] Error 2 make[1]: Leaving directory `/var/tmp/portage/sys-libs/glibc-2.9_p20081201-r1/work/glibc-2.9-20081201' make: *** [all] Error 2 My USE flag :debug gd glibc-compat20 glibc-omitfp nls profile (-hardened) (-multilib) (-selinux) -vanilla Emerge --info follows as attachment. Reproducible: Always
Created attachment 181283 [details] emerge --info
im getting the same issue using paludis. GCC 4.3.3 binutils 2.19.51.0.2 rtld.c:(.text+0x9cd): undefined reference to `_begin' /usr/lib/gcc/x86_64-pc-linux-gnu/4.3.3/../../../../x86_64-pc-linux-gnu/bin/ld: /var/tmp/paludis/sys-libs-glibc-2.9_p20081201-r1/work/build-x86-x86_64-pc-linux-gnu-nptl/elf/librtld.os: relocation R_386_GOTOFF against undefined hidden symbol `_begin' can not be used when making a shared object /usr/lib/gcc/x86_64-pc-linux-gnu/4.3.3/../../../../x86_64-pc-linux-gnu/bin/ld: final link failed: Bad value collect2: ld returned 1 exit status make[2]: *** [/var/tmp/paludis/sys-libs-glibc-2.9_p20081201-r1/work/build-x86-x86_64-pc-linux-gnu-nptl/elf/ld.so] Error 1 make[2]: Leaving directory `/var/tmp/paludis/sys-libs-glibc-2.9_p20081201-r1/work/glibc-2.9-20081201/elf' make[1]: *** [elf/subdir_lib] Error 2 make[1]: Leaving directory `/var/tmp/paludis/sys-libs-glibc-2.9_p20081201-r1/work/glibc-2.9-20081201' make: *** [all] Error 2 !!! ERROR in sys-libs/glibc-2.9_p20081201-r1: !!! In toolchain-glibc_src_compile at line 122 !!! make for x86 failed !!! Call stack: !!! * toolchain-glibc_src_compile (/var/paludis/repositories/gentoo/sys-libs/glibc/files/eblits/src_compile.eblit:122) !!! * eblit-glibc-src_compile (/var/paludis/repositories/gentoo/sys-libs/glibc/files/eblits/src_compile.eblit:187) !!! * eblit-run (/var/tmp/paludis/sys-libs-glibc-2.9_p20081201-r1/temp/loadsaveenv:1587) !!! * src_compile (/var/tmp/paludis/sys-libs-glibc-2.9_p20081201-r1/temp/loadsaveenv:4742) !!! * eblit-glibc-src_compile (/var/paludis/repositories/gentoo/sys-libs/glibc/files/eblits/src_compile.eblit:179) !!! * eblit-run (/var/tmp/paludis/sys-libs-glibc-2.9_p20081201-r1/temp/loadsaveenv:1587) !!! * src_compile (/var/tmp/paludis/sys-libs-glibc-2.9_p20081201-r1/temp/loadsaveenv:4742) !!! * ebuild_f_compile (/usr/libexec/paludis/0/src_compile.bash:49) !!! * ebuild_main (/usr/libexec/paludis/ebuild.bash:482) !!! * main (/usr/libexec/paludis/ebuild.bash:498) diefunc: making ebuild PID 30457 exit with error die trap: exiting with error. Install error: * In program paludis -i glibc: * When performing install action from command line: * When executing install task: * When installing 'sys-libs/glibc-2.9_p20081201-r1:2.2::gentoo': * When running an ebuild command on 'sys-libs/glibc-2.9_p20081201-r1:2.2::gentoo': * Install error: Install failed for 'sys-libs/glibc-2.9_p20081201-r1:2.2::gentoo'
Created attachment 181465 [details] paludis --info
try again with sane build flags (those LDFLAGS are pretty frickin ridiculous), and with binutils version that is KEYWORD-ed ...
Downgrading to sys-devel/binutils-2.19.51.0.1 allows it to compile cleanly. Masking >sys-devel/binutils-2.19.51.0.1 solves the issue for me
thanks for testing. guess next steps would be to try building binutils with USE=vanilla and/or comparing glibc configure output between the two runs.
I built binutils-2.19.51.0.2 w/ +vanilla and then tried to recompile glibc-2.9_p20081201-r1. The compiles dies in the same place: : In function `_dl_start': rtld.c:(.text+0x9cd): undefined reference to `_begin' /usr/lib/gcc/x86_64-pc-linux-gnu/4.3.3/../../../../x86_64-pc-linux-gnu/bin/ld: /var/tmp/paludis/sys-libs-glibc-2.9_p20081201-r1/work/build-x86-x86_64-pc-linux-gnu-nptl/elf/librtld.os: relocation R_386_GOTOFF against undefined hidden symbol `_begin' can not be used when making a shared object /usr/lib/gcc/x86_64-pc-linux-gnu/4.3.3/../../../../x86_64-pc-linux-gnu/bin/ld: final link failed: Bad value collect2: ld returned 1 exit status make[2]: *** [/var/tmp/paludis/sys-libs-glibc-2.9_p20081201-r1/work/build-x86-x86_64-pc-linux-gnu-nptl/elf/ld.so] Error 1 make[2]: Leaving directory `/var/tmp/paludis/sys-libs-glibc-2.9_p20081201-r1/work/glibc-2.9-20081201/elf' make[1]: *** [elf/subdir_lib] Error 2 make[1]: Leaving directory `/var/tmp/paludis/sys-libs-glibc-2.9_p20081201-r1/work/glibc-2.9-20081201' make: *** [all] Error 2 !!! ERROR in sys-libs/glibc-2.9_p20081201-r1: !!! In toolchain-glibc_src_compile at line 122 !!! make for x86 failed !!! Call stack: !!! * toolchain-glibc_src_compile (/var/paludis/repositories/gentoo/sys-libs/glibc/files/eblits/src_compile.eblit:122) !!! * eblit-glibc-src_compile (/var/paludis/repositories/gentoo/sys-libs/glibc/files/eblits/src_compile.eblit:187) !!! * eblit-run (/var/tmp/paludis/sys-libs-glibc-2.9_p20081201-r1/temp/loadsaveenv:1587) !!! * src_compile (/var/tmp/paludis/sys-libs-glibc-2.9_p20081201-r1/temp/loadsaveenv:4742) !!! * eblit-glibc-src_compile (/var/paludis/repositories/gentoo/sys-libs/glibc/files/eblits/src_compile.eblit:179) !!! * eblit-run (/var/tmp/paludis/sys-libs-glibc-2.9_p20081201-r1/temp/loadsaveenv:1587) !!! * src_compile (/var/tmp/paludis/sys-libs-glibc-2.9_p20081201-r1/temp/loadsaveenv:4742) !!! * ebuild_f_compile (/usr/libexec/paludis/0/src_compile.bash:49) !!! * ebuild_main (/usr/libexec/paludis/ebuild.bash:482) !!! * main (/usr/libexec/paludis/ebuild.bash:498) diefunc: making ebuild PID 28460 exit with error die trap: exiting with error. Install error: * In program paludis -i glibc: * When performing install action from command line: * When executing install task: * When installing 'sys-libs/glibc-2.9_p20081201-r1:2.2::gentoo': * When running an ebuild command on 'sys-libs/glibc-2.9_p20081201-r1:2.2::gentoo': * Install error: Install failed for 'sys-libs/glibc-2.9_p20081201-r1:2.2::gentoo'
*** Bug 258555 has been marked as a duplicate of this bug. ***
confirm: # binutils-config x86_64-pc-linux-gnu-2.19.51.0.1 sys-libs/glibc-2.9_p20081201-r1 compiles without errors with gcc 4.3.3 //by the way: why does emerging glibc overwrite "/etc/locale.gen"? why ignores locale-gen MAKEOPTS in make.conf during glibc emerge? generating the whole locale-archive only with one job is not funny ;-)
locale.gen is overwritten only if you tell it do so i thought the tool would explain why it falls back to -j1, but i guess i forgot to note that. if building a locale archive file, locales cannot be done in parallel. it takes longer to build locales, but locale handling at runtime is faster. clearly this is preferred.
thanx for explaining
*** Bug 259295 has been marked as a duplicate of this bug. ***
Created attachment 182309 [details] build.log The same error with the new release of glibc
http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/elf/Makefile?r1=1.331&cvsroot=glibc http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/elf/Makefile.diff?r1=1.330&r2=1.331&cvsroot=glibc
I can confirm binutils 2.19.51.0.1 works fine here as well, while ..51.0.2 fails. Helpful note for anyone with this problem: You can emerge binutils with USE=multislot (I set it in package.use some time ago) and portage will keep old versions around. You can then use eselect binutils to switch between installed versions. Just remember to remove some of the old ones once in awhile. =:^) In practice here, since I have FEATURES=buildpkg set and thus have older binpkgs in case I need them, I usually unmerge all but the newest version anyway, and just remerge -K an old one and eselect it if I run into a problem with the newer version, as here. Either with just USE=multislot or using the binpkgs, it's much less hassle than having to remerge old versions from scratch.
added to patchset, thanks for the links http://sources.gentoo.org/gentoo/src/patchsets/glibc/2.9/0008_all_glibc-2.9-linker-scripts.patch?rev=1.1