[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#631256: marked as done (eglibc: ftbfs with binutils-gold: "These critical programs are missing or too old: ld")



Your message dated Tue, 1 Dec 2015 23:26:16 +0100
with message-id <20151201222616.GA10507@aurel32.net>
and subject line Re: eglibc: ftbfs with binutils-gold: "These critical programs are missing or too old: ld"
has caused the Debian Bug report #631256,
regarding eglibc: ftbfs with binutils-gold: "These critical programs are missing or too old: ld"
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
631256: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=631256
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
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 ---
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 ---

Reply to: