From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) Subject: bug#20102: Problem with ld.so RUNPATH on armhf Date: Thu, 09 Apr 2015 08:57:39 +0200 Message-ID: <878ue1vlek.fsf@gnu.org> References: <87y4n0ybdd.fsf@netris.org> <87pp7jh7y8.fsf@gnu.org> <87384f5goy.fsf@netris.org> <87oan16m4z.fsf@gnu.org> <87d23hynqe.fsf@netris.org> <87fv8b0wwx.fsf@gnu.org> <87bniyy7au.fsf@netris.org> <87twwqv50y.fsf@gnu.org> <87mw2hx2et.fsf@netris.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:51912) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yg6Pe-0007BW-22 for bug-guix@gnu.org; Thu, 09 Apr 2015 02:58:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Yg6Pc-0000xr-2v for bug-guix@gnu.org; Thu, 09 Apr 2015 02:58:06 -0400 Received: from debbugs.gnu.org ([140.186.70.43]:60167) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yg6Pb-0000xn-Vu for bug-guix@gnu.org; Thu, 09 Apr 2015 02:58:04 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1Yg6Pb-0005Vg-90 for bug-guix@gnu.org; Thu, 09 Apr 2015 02:58:03 -0400 Sender: "Debbugs-submit" Resent-To: bug-guix@gnu.org Resent-Message-ID: In-Reply-To: <87mw2hx2et.fsf@netris.org> (Mark H. Weaver's message of "Thu, 09 Apr 2015 02:04:58 -0400") List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org To: Mark H Weaver Cc: 20102-done@debbugs.gnu.org Mark H Weaver skribis: > ludo@gnu.org (Ludovic Court=C3=A8s) writes: > >> With a bit of additional debug, I can print the value of =E2=80=98libs= =E2=80=99 in the >> =E2=80=98ld-wrapper=E2=80=99 procedure: >> >> ;;; (libs ("/gnu/store/fbdjazgwy3zyx8qc5z4ag0j78k2d7raw-glibc-2.21/lib/l= d-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 =E2=80=98li= nk=E2=80=99 spec >> on ARM, solved by this: >> >> --- gcc-4.8.4/gcc/config/arm/linux-elf.h.orig 2015-04-08 20:31:20.376900= 478 +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. Cool, thanks! (There=E2=80=99s a small typo in the comment in the patch: it should be =E2= =80=9CDon=E2=80=99t pass -dynamic-linker when shared.=E2=80=9D) I will push the ld-wrapper fix in the next core-updates cycle then. Ludo=E2=80=99.