Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 258072 - sys-libs/glibc-2.9_p20081201-r1 compilation fails with sys-devel/binutils-2.19.51.0.2
Summary: sys-libs/glibc-2.9_p20081201-r1 compilation fails with sys-devel/binutils-2.1...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: AMD64 Linux
: High normal with 2 votes (vote)
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
: 258555 259295 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-02-07 21:08 UTC by BedOS_Gui
Modified: 2009-02-21 21:46 UTC (History)
5 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge --info (emerge--info,11.29 KB, text/plain)
2009-02-07 21:09 UTC, BedOS_Gui
Details
paludis --info (paludis_info.txt,12.45 KB, text/plain)
2009-02-09 18:07 UTC, Marc O'Connor
Details
build.log (glibc-2.9_p20081201-r2_build.log.lzma,90.67 KB, application/octet-stream)
2009-02-17 08:08 UTC, Philipp Psurek
Details

Note You need to log in before you can comment on or make changes to this bug.
Description BedOS_Gui 2009-02-07 21:08:34 UTC
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
Comment 1 BedOS_Gui 2009-02-07 21:09:19 UTC
Created attachment 181283 [details]
emerge --info
Comment 2 Marc O'Connor 2009-02-09 18:05:39 UTC
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'



Comment 3 Marc O'Connor 2009-02-09 18:07:17 UTC
Created attachment 181465 [details]
paludis --info
Comment 4 SpanKY gentoo-dev 2009-02-11 00:13:19 UTC
try again with sane build flags (those LDFLAGS are pretty frickin ridiculous), and with binutils version that is KEYWORD-ed ...
Comment 5 Marc O'Connor 2009-02-11 06:17:44 UTC
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
Comment 6 SpanKY gentoo-dev 2009-02-11 06:33:20 UTC
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.
Comment 7 Marc O'Connor 2009-02-11 16:07:15 UTC
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'

Comment 8 SpanKY gentoo-dev 2009-02-11 23:15:42 UTC
*** Bug 258555 has been marked as a duplicate of this bug. ***
Comment 9 Philipp Psurek 2009-02-12 05:30:50 UTC
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 ;-)
Comment 10 SpanKY gentoo-dev 2009-02-12 05:49:41 UTC
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.
Comment 11 Philipp Psurek 2009-02-12 11:11:10 UTC
thanx for explaining
Comment 12 SpanKY gentoo-dev 2009-02-17 03:28:45 UTC
*** Bug 259295 has been marked as a duplicate of this bug. ***
Comment 13 Philipp Psurek 2009-02-17 08:08:01 UTC
Created attachment 182309 [details]
build.log

The same error with the new release of glibc
Comment 15 Duncan 2009-02-21 18:13:48 UTC
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.