--- Begin Message ---
- To: submit@bugs.debian.org
- Subject: eglibc: ftbfs with binutils-gold: "These critical programs are missing or too old: ld"
- From: Jonathan Nieder <jrnieder@gmail.com>
- Date: Wed, 22 Jun 2011 02:06:46 -0500
- Message-id: <20110622070646.GA25341@elie>
Source: eglibc
Version: 2.13-7
Tags: upstream
Hi,
I believe this is already a well known problem and don't expect
anything to happen, but am filing it for reference. eglibc does not
build with ld.gold. There are multiple superficial reasons for
that[*] but when it comes down to it, it is because configure.in
expects "gcc -Wl,--verbose" to write a linker script and ld.gold
neither uses linker scripts internally[**] nor knows how to fake them.
Luckily, there is a simple workaround --- ld.bfd works fine.
Regards,
Jonathan
[*]
| $ debian/rules build
[...]
| checking version of as... 2.21.52.20110606, ok
| checking for ld... ld
| checking version of ld... v. ?.??, bad
[...]
| configure: error:
| *** These critical programs are missing or too old: ld
| *** Check the INSTALL file for required versions.
| make: *** [/home/jrn/src/glibc-work/stamp-dir/configure_libc] Error 1
Wha? glibc only wants ld 2.17 or later. This is just a mini-bug ---
the version check hardcodes ld.bfd-style's version string and gold
does not match.
| AC_CHECK_PROG_VER(LD, $LD, --version,
| [GNU ld.* \([0-9][0-9]*\.[0-9.]*\)],
| [2.1[7-9]*|2.1[0-9][0-9]*|2.[2-9][0-9]*|[3-9].*|[1-9][0-9]*], LD=: critic_missing="$critic_missing ld")
| $ ld --version | head -1
| GNU gold (GNU Binutils for Debian 2.21.52.20110606) 1.11
No problem --- loosen the pattern to match. Next:
| checking for -z initfirst option... yes
| checking for -z relro option... no
| configure: error: linker with -z relro support required
| make: *** [/home/jrn/src/glibc-work/stamp-dir/configure_libc] Error 1
But... ld.gold advertises relro support.
| $ ld --help | grep relro
| -z relro Where possible mark variables read-only after relocation
| -z norelro Don't mark variables read-only after relocation
Unfortunately, the configure script checks for it by reading the
linker script, and unlike ld.bfd, ld.gold does not write a linker
script when passed the --verbose option.
| if AC_TRY_COMMAND([${CC-cc} -v --help 2>&1|grep "z relro" 1>&AS_MESSAGE_LOG_FD])
| then
| if AC_TRY_COMMAND([${CC-cc} -Wl,--verbose 2>&1|grep DATA_SEGMENT_RELRO_END 1>&AS_MESSAGE_LOG_FD])
| then
| libc_cv_z_relro=yes
| $ ld --verbose
| ld: fatal error: no input files
With that hint, it's easy to find other places that read linker
scripts for other purposes.
[**] http://www.airs.com/blog/archives/138
--- End Message ---
--- Begin Message ---
- To: Jonathan Nieder <jrnieder@gmail.com>
- Cc: 631256-done@bugs.debian.org
- Subject: Re: eglibc: ftbfs with binutils-gold: "These critical programs are missing or too old: ld"
- From: Aurelien Jarno <aurelien@aurel32.net>
- Date: Tue, 1 Dec 2015 23:26:16 +0100
- Message-id: <20151201222616.GA10507@aurel32.net>
- In-reply-to: <20110823183411.GA24815@elie.gateway.2wire.net>
- References: <20110622070646.GA25341@elie> <20110707215356.GA15205@elie> <20110823183411.GA24815@elie.gateway.2wire.net>
Version: eglibc/2.16-0experimental0
On 2011-08-23 13:35, Jonathan Nieder wrote:
> tags 631256 + fixed-upstream
> quit
>
> Jonathan Nieder wrote:
>
> > with minor changes, it builds but the resulting ld.so
> > segfaults[*].
>
> Yes! A build with binutils-gold works now (no segfault). Using
> 25ad0df1 ("Bug fixes for ____longjmp_chk on sparc", 2011-08-22) with
> the "Make ld --version output matching grok gold's output" patch
> applied.
>
> git clone .../glibc.git
> git merge origin/roland/gold-vs-libc
> git apply <<-\EOF
This commit is available in Debian since version
eglibc/2.16-0experimental0. I am therefore closing the bug.
--
Aurelien Jarno GPG: 4096R/1DDD8C9B
aurelien@aurel32.net http://www.aurel32.net
--- End Message ---