GNU bug report logs - #20102
Problem with ld.so RUNPATH on armhf

Previous Next

Package: guix;

Reported by: Mark H Weaver <mhw <at> netris.org>

Date: Fri, 13 Mar 2015 18:57:02 UTC

Severity: normal

Done: ludo <at> gnu.org (Ludovic Courtès)

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Mark H Weaver <mhw <at> netris.org>
To: ludo <at> gnu.org (Ludovic Courtès)
Cc: 20102 <at> debbugs.gnu.org
Subject: bug#20102: Problem with ld.so RUNPATH on armhf
Date: Thu, 09 Apr 2015 02:04:58 -0400
ludo <at> gnu.org (Ludovic Courtès) writes:

> With a bit of additional debug, I can print the value of ‘libs’ in the
> ‘ld-wrapper’ procedure:
>
> ;;; (libs ("/gnu/store/fbdjazgwy3zyx8qc5z4ag0j78k2d7raw-glibc-2.21/lib/ld-linux-armhf.so.3"))
>
> This one comes from the -dynamic-linker flag, which is not passed on
> x86_64.
>
> I believe this extra -dynamic-linker flag comes from a bogus ‘link’ spec
> on ARM, solved by this:
>
> --- gcc-4.8.4/gcc/config/arm/linux-elf.h.orig	2015-04-08 20:31:20.376900478 +0200
> +++ gcc-4.8.4/gcc/config/arm/linux-elf.h	2015-04-08 20:31:36.437014437 +0200
> @@ -65,7 +65,7 @@
>     %{symbolic:-Bsymbolic} \
>     %{!static: \
>       %{rdynamic:-export-dynamic} \
> -     -dynamic-linker " GNU_USER_DYNAMIC_LINKER "} \
> +     %{!shared:-dynamic-linker " GNU_USER_DYNAMIC_LINKER "}} \
>     -X \
>     %{mbig-endian:-EB} %{mlittle-endian:-EL}" \
>     SUBTARGET_EXTRA_LINK_SPEC
>
> That way it would match GNU_USER_TARGET_LINK_SPEC in i386/gnu-user.h,
> where -dynamic-linker appears within %{!static ... %{!shared ...}}.
>
> So, could you do:
>
>   (define patched-gcc
>     (package
>       (inherit gcc-4.8)
>       (sources (origin (inherit (package-source gcc-4.8))
>                  (patches ...)))))
>
> build it, and then use it in the failed glibc build tree to rebuild
> ld.so?

Yes, this fixed the problem.  I went ahead and pushed 1421afa94a to
core-updates to apply this patch to gcc-4.8, gcc-4.9, and cross-gcc.

I started both Hydra and my Novena building the new core-updates.

     Thanks!
       Mark




This bug report was last modified 10 years and 8 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.