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.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 20102 in the body.
You can then email your comments to 20102 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
View this report as an mbox folder, status mbox, maintainer mbox
bug-guix <at> gnu.org
:bug#20102
; Package guix
.
(Fri, 13 Mar 2015 18:57:02 GMT) Full text and rfc822 format available.Mark H Weaver <mhw <at> netris.org>
:bug-guix <at> gnu.org
.
(Fri, 13 Mar 2015 18:57:02 GMT) Full text and rfc822 format available.Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
From: Mark H Weaver <mhw <at> netris.org> To: bug-guix <at> gnu.org Subject: Problem with ld.so RUNPATH on armhf Date: Fri, 13 Mar 2015 14:56:46 -0400
I recently tried rebuilding Guix on armhf, specifically master since the recent core-updates merge, and have run into a snag. I'm able to build a lot of stuff, including our full 'emacs' package (with Gtk+), but I'm unable to build 'glibc-utf8-locales', which means I can't build any profiles at all, because the ca-certificates-bundle uses glibc-utf8-locales. Here's what happens when I try to build 'glibc-utf8-locales' manually: --8<---------------cut here---------------start------------->8--- mhw <at> novena:~$ guix build -K glibc-utf8-locales The following derivation will be built: /gnu/store/14kf28i9qkzrdjn5m150zk6dxijssk2k-glibc-utf8-locales-2.21.drv warning: failed to install locale: Invalid argument @ build-started /gnu/store/14kf28i9qkzrdjn5m150zk6dxijssk2k-glibc-utf8-locales-2.21.drv - armhf-linux /var/log/guix/drvs/14//kf28i9qkzrdjn5m150zk6dxijssk2k-glibc-utf8-locales-2.21.drv.bz2 Inconsistency detected by ld.so: get-dynamic-info.h: 142: elf_get_dynamic_info: Assertion `info[29] == ((void *)0)' failed! note: keeping build directory `/tmp/nix-build-glibc-utf8-locales-2.21.drv-0' builder for `/gnu/store/14kf28i9qkzrdjn5m150zk6dxijssk2k-glibc-utf8-locales-2.21.drv' failed with exit code 1 @ build-failed /gnu/store/14kf28i9qkzrdjn5m150zk6dxijssk2k-glibc-utf8-locales-2.21.drv - 1 builder for `/gnu/store/14kf28i9qkzrdjn5m150zk6dxijssk2k-glibc-utf8-locales-2.21.drv' failed with exit code 1 killing process 1498 guix build: error: build failed: build of `/gnu/store/14kf28i9qkzrdjn5m150zk6dxijssk2k-glibc-utf8-locales-2.21.drv' failed --8<---------------cut here---------------end--------------->8--- The key line being: Inconsistency detected by ld.so: get-dynamic-info.h: 142: elf_get_dynamic_info: Assertion `info[29] == ((void *)0)' failed! Here's the relevant bit of code from glibc-2.21/elf/get-dynamic-info.h: --8<---------------cut here---------------start------------->8--- #ifdef RTLD_BOOTSTRAP /* Only the bind now flags are allowed. */ assert (info[VERSYMIDX (DT_FLAGS_1)] == NULL || (info[VERSYMIDX (DT_FLAGS_1)]->d_un.d_val & ~DF_1_NOW) == 0); assert (info[DT_FLAGS] == NULL || (info[DT_FLAGS]->d_un.d_val & ~DF_BIND_NOW) == 0); /* Flags must not be set for ld.so. */ assert (info[DT_RUNPATH] == NULL); assert (info[DT_RPATH] == NULL); --8<---------------cut here---------------end--------------->8--- "assert (info[DT_RUNPATH] == NULL)" is the assertion that fails here. This happens while trying to run 'localedef' from the 'glibc' that's an input to 'glibc-utf8-locales'. Interestingly, 'bash' works from the same store item: --8<---------------cut here---------------start------------->8--- mhw <at> novena:/gnu/store/l2bkyclkm0lph48mfs6jbndj9p0y41g8-glibc-2.21/bin$ ./bash I have no name!@novena:/gnu/store/l2bkyclkm0lph48mfs6jbndj9p0y41g8-glibc-2.21/bin$ exit mhw <at> novena:/gnu/store/l2bkyclkm0lph48mfs6jbndj9p0y41g8-glibc-2.21/bin$ ./localedef Inconsistency detected by ld.so: get-dynamic-info.h: 142: elf_get_dynamic_info: Assertion `info[29] == ((void *)0)' failed! --8<---------------cut here---------------end--------------->8--- readelf reveals that indeed, the ld.so used by localedef, /gnu/store/l2bkyclkm0lph48mfs6jbndj9p0y41g8-glibc-2.21/lib/ld-linux-armhf.so.3 does have RUNPATH set: (excerpt of "readelf -a" output) --8<---------------cut here---------------start------------->8--- Program Headers: Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align EXIDX 0x01681c 0x0001681c 0x0001681c 0x00098 0x00098 R 0x4 LOAD 0x000000 0x00000000 0x00000000 0x168b4 0x168b4 R E 0x10000 LOAD 0x016c80 0x00026c80 0x00026c80 0x00c00 0x00cc8 RW 0x10000 DYNAMIC 0x016f3c 0x00026f3c 0x00026f3c 0x000c0 0x000c0 RW 0x4 GNU_STACK 0x000000 0x00000000 0x00000000 0x00000 0x00000 RW 0x10 GNU_RELRO 0x016c80 0x00026c80 0x00026c80 0x00380 0x00380 R 0x1 Section to Segment mapping: Segment Sections... 00 .ARM.exidx 01 .hash .gnu.hash .dynsym .dynstr .gnu.version .gnu.version_d .rel.dyn .rel.plt .plt .text .rodata .ARM.extab .ARM.exidx 02 .data.rel.ro .dynamic .got .data .bss 03 .dynamic 04 05 .data.rel.ro .dynamic Dynamic section at offset 0x16f3c contains 20 entries: Tag Type Name/Value 0x0000000e (SONAME) Library soname: [ld-linux-armhf.so.3] 0x0000001d (RUNPATH) Library runpath: [/gnu/store/fbdjazgwy3zyx8qc5z4ag0j78k2d7raw-glibc-2.21/lib] --8<---------------cut here---------------end--------------->8--- Any ideas what went wrong here? Mark
bug-guix <at> gnu.org
:bug#20102
; Package guix
.
(Sat, 04 Apr 2015 21:59:01 GMT) Full text and rfc822 format available.Message #8 received at 20102 <at> debbugs.gnu.org (full text, mbox):
From: ludo <at> gnu.org (Ludovic Courtès) To: Mark H Weaver <mhw <at> netris.org> Cc: 20102 <at> debbugs.gnu.org Subject: Re: bug#20102: Problem with ld.so RUNPATH on armhf Date: Sat, 04 Apr 2015 23:58:23 +0200
Mark H Weaver <mhw <at> netris.org> skribis: > readelf reveals that indeed, the ld.so used by localedef, > > /gnu/store/l2bkyclkm0lph48mfs6jbndj9p0y41g8-glibc-2.21/lib/ld-linux-armhf.so.3 > > does have RUNPATH set: (excerpt of "readelf -a" output) Could you post the libc build log? Use: guix build --log-file /gnu/store/l2bkyclkm0lph48mfs6jbndj9p0y41g8-glibc-2.21 Thanks, Ludo’.
bug-guix <at> gnu.org
:bug#20102
; Package guix
.
(Sun, 05 Apr 2015 04:43:02 GMT) Full text and rfc822 format available.Message #11 received at 20102 <at> debbugs.gnu.org (full text, mbox):
From: Mark H Weaver <mhw <at> netris.org> To: ludo <at> gnu.org (Ludovic Courtès) Cc: 20102 <at> debbugs.gnu.org Subject: Re: bug#20102: Problem with ld.so RUNPATH on armhf Date: Sun, 05 Apr 2015 00:42:37 -0400
[Message part 1 (text/plain, inline)]
ludo <at> gnu.org (Ludovic Courtès) writes: > Mark H Weaver <mhw <at> netris.org> skribis: > >> readelf reveals that indeed, the ld.so used by localedef, >> >> /gnu/store/l2bkyclkm0lph48mfs6jbndj9p0y41g8-glibc-2.21/lib/ld-linux-armhf.so.3 >> >> does have RUNPATH set: (excerpt of "readelf -a" output) > > Could you post the libc build log? See attached. Mark
[56m27nwf3cjs2llpnx0wb4rv2ld8539v-glibc-2.21.drv.bz2 (application/x-bzip2, attachment)]
bug-guix <at> gnu.org
:bug#20102
; Package guix
.
(Mon, 06 Apr 2015 20:25:02 GMT) Full text and rfc822 format available.Message #14 received at 20102 <at> debbugs.gnu.org (full text, mbox):
From: ludo <at> gnu.org (Ludovic Courtès) To: Mark H Weaver <mhw <at> netris.org> Cc: 20102 <at> debbugs.gnu.org Subject: Re: bug#20102: Problem with ld.so RUNPATH on armhf Date: Mon, 06 Apr 2015 22:24:12 +0200
Mark H Weaver <mhw <at> netris.org> skribis: > ludo <at> gnu.org (Ludovic Courtès) writes: > >> Mark H Weaver <mhw <at> netris.org> skribis: >> >>> readelf reveals that indeed, the ld.so used by localedef, >>> >>> /gnu/store/l2bkyclkm0lph48mfs6jbndj9p0y41g8-glibc-2.21/lib/ld-linux-armhf.so.3 >>> >>> does have RUNPATH set: (excerpt of "readelf -a" output) >> >> Could you post the libc build log? > > See attached. Thanks. Could you send the output of: $(guix build -e '(@ (gnu packages commencement) gcc-final)' | grep -ve -lib)/bin/gcc -dumpspecs It could be that the patching of config/gnu-user*.h ends up adding -rpath in the wrong place. Thanks, Ludo’.
bug-guix <at> gnu.org
:bug#20102
; Package guix
.
(Mon, 06 Apr 2015 21:02:02 GMT) Full text and rfc822 format available.Message #17 received at 20102 <at> debbugs.gnu.org (full text, mbox):
From: Mark H Weaver <mhw <at> netris.org> To: ludo <at> gnu.org (Ludovic Courtès) Cc: 20102 <at> debbugs.gnu.org Subject: Re: bug#20102: Problem with ld.so RUNPATH on armhf Date: Mon, 06 Apr 2015 17:02:17 -0400
ludo <at> gnu.org (Ludovic Courtès) writes: > Could you send the output of: > > $(guix build -e '(@ (gnu packages commencement) gcc-final)' | grep -ve -lib)/bin/gcc -dumpspecs > > It could be that the patching of config/gnu-user*.h ends up adding > -rpath in the wrong place. Here it is: --8<---------------cut here---------------start------------->8--- mhw <at> novena:~$ $(guix build -e '(@ (gnu packages commencement) gcc-final)' | grep -ve -lib)/bin/gcc -dumpspecs *asm: %{mbig-endian:-EB} %{mlittle-endian:-EL} %(asm_cpu_spec) %{mapcs-*:-mapcs-%*} %(subtarget_asm_float_spec) %{mthumb-interwork:-mthumb-interwork} %{mfloat-abi=*} %{mfpu=*} %(subtarget_extra_asm_spec) *asm_debug: %{!g0:%{gstabs*:--gstabs}%{!gstabs*:%{g*:--gdwarf2}}} %{fdebug-prefix-map=*:--debug-prefix-map %*} *asm_final: %{gsplit-dwarf: objcopy --extract-dwo %{c:%{o*:%*}%{!o*:%b%O}}%{!c:%U%O} %{c:%{o*:%:replace-extension(%{o*:%*} .dwo)}%{!o*:%b.dwo}}%{!c:%b.dwo} objcopy --strip-dwo %{c:%{o*:%*}%{!o*:%b%O}}%{!c:%U%O} } *asm_options: %{-target-help:%:print-asm-header()} %{v} %{w:-W} %{I*} %a %Y %{c:%W{o*}%{!o*:-o %w%b%O}}%{!c:-o %d%w%u%O} *invoke_as: %{!fwpa: %{fcompare-debug=*|fdump-final-insns=*:%:compare-debug-dump-opt()} %{!S:-o %|.s | as %(asm_options) %m.s %A } } *cpp: %(subtarget_cpp_spec) %{mfloat-abi=soft:%{mfloat-abi=hard: %e-mfloat-abi=soft and -mfloat-abi=hard may not be used together}} %{mbig-endian:%{mlittle-endian: %e-mbig-endian and -mlittle-endian may not be used together}} *cpp_options: %(cpp_unique_options) %1 %{m*} %{std*&ansi&trigraphs} %{W*&pedantic*} %{w} %{f*} %{g*:%{!g0:%{g*} %{!fno-working-directory:-fworking-directory}}} %{O*} %{undef} %{save-temps*:-fpch-preprocess} *cpp_debug_options: %{d*} *cpp_unique_options: %{!Q:-quiet} %{nostdinc*} %{C} %{CC} %{v} %{I*&F*} %{P} %I %{MD:-MD %{!o:%b.d}%{o*:%.d%*}} %{MMD:-MMD %{!o:%b.d}%{o*:%.d%*}} %{M} %{MM} %{MF*} %{MG} %{MP} %{MQ*} %{MT*} %{!E:%{!M:%{!MM:%{!MT:%{!MQ:%{MD|MMD:%{o*:-MQ %*}}}}}}} %{remap} %{g3|ggdb3|gstabs3|gcoff3|gxcoff3|gvms3:-dD} %{!iplugindir*:%{fplugin*:%:find-plugindir()}} %{H} %C %{D*&U*&A*} %{i*} %Z %i %{fmudflap:-D_MUDFLAP -include mf-runtime.h} %{fmudflapth:-D_MUDFLAP -D_MUDFLAPTH -include mf-runtime.h} %{E|M|MM:%W{o*}} *trad_capable_cpp: cc1 -E %{traditional|traditional-cpp:-traditional-cpp} *cc1: %{!mandroid|tno-android-cc:%{profile:-p};:%{profile:-p} %{!mglibc:%{!muclibc:%{!mbionic: -mbionic}}} %{!fno-pic:%{!fno-PIC:%{!fpic:%{!fPIC: -fPIC}}}}} *cc1_options: %{pg:%{fomit-frame-pointer:%e-pg and -fomit-frame-pointer are incompatible}} %{!iplugindir*:%{fplugin*:%:find-plugindir()}} %1 %{!Q:-quiet} %{!dumpbase:-dumpbase %B} %{d*} %{m*} %{aux-info*} %{fcompare-debug-second:%:compare-debug-auxbase-opt(%b)} %{!fcompare-debug-second:%{c|S:%{o*:-auxbase-strip %*}%{!o*:-auxbase %b}}}%{!c:%{!S:-auxbase %b}} %{g*} %{O*} %{W*&pedantic*} %{w} %{std*&ansi&trigraphs} %{v:-version} %{pg:-p} %{p} %{f*} %{undef} %{Qn:-fno-ident} %{Qy:} %{-help:--help} %{-target-help:--target-help} %{-version:--version} %{-help=*:--help=%*} %{!fsyntax-only:%{S:%W{o*}%{!o*:-o %b.s}}} %{fsyntax-only:-o %j} %{-param*} %{fmudflap|fmudflapth:-fno-builtin -fno-merge-constants} %{coverage:-fprofile-arcs -ftest-coverage} *cc1plus: %{!mandroid|tno-android-cc:;:%{!fexceptions:%{!fno-exceptions: -fno-exceptions}} %{!frtti:%{!fno-rtti: -fno-rtti}}} *link_gcc_c_sequence: %{static:--start-group} %G %L %{static:--end-group}%{!static:%G} *link_ssp: %{fstack-protector:} *endfile: %{!mandroid|tno-android-ld:%{shared|pie:crtendS.o%s;:crtend.o%s} crtn.o%s;:%{shared: crtend_so%O%s;: crtend_android%O%s}} *link: %{!static:--eh-frame-hdr} %{mbig-endian:%{march=armv7-a|mcpu=cortex-a5 |mcpu=cortex-a7 |mcpu=cortex-a8|mcpu=cortex-a9|mcpu=cortex-a15 |mcpu=marvell-pj4 |mcpu=generic-armv7-a |march=armv7-m|mcpu=cortex-m3 |march=armv7e-m|mcpu=cortex-m4 |march=armv6-m|mcpu=cortex-m0 |march=armv8-a :%{!r:--be8}}}%{!mandroid|tno-android-ld:%{h*} %{static:-Bstatic} %{shared:-shared} %{symbolic:-Bsymbolic} %{!static: %{rdynamic:-export-dynamic} -dynamic-linker %{muclibc:/lib/ld-uClibc.so.0;:%{mbionic:/system/bin/linker;:/gnu/store/fbdjazgwy3zyx8qc5z4ag0j78k2d7raw-glibc-2.21/lib/ld-linux-armhf.so.3}}} -X %{mbig-endian:-EB} %{mlittle-endian:-EL} -m armelf_linux_eabi;:%{h*} %{static:-Bstatic} %{shared:-shared} %{symbolic:-Bsymbolic} %{!static: %{rdynamic:-export-dynamic} -dynamic-linker %{muclibc:/lib/ld-uClibc.so.0;:%{mbionic:/system/bin/linker;:/gnu/store/fbdjazgwy3zyx8qc5z4ag0j78k2d7raw-glibc-2.21/lib/ld-linux-armhf.so.3}}} -X %{mbig-endian:-EB} %{mlittle-endian:-EL} -m armelf_linux_eabi %{shared: -Bsymbolic}} *lib: %{!mandroid|tno-android-ld:-L/gnu/store/fbdjazgwy3zyx8qc5z4ag0j78k2d7raw-glibc-2.21/lib %{!static:-rpath=/gnu/store/fbdjazgwy3zyx8qc5z4ag0j78k2d7raw-glibc-2.21/lib %{!static-libgcc:-rpath=/gnu/store/fc8kqk3dazn6mcgcjxd931752b2pf3wj-gcc-4.8.4-lib/lib64 -rpath=/gnu/store/fc8kqk3dazn6mcgcjxd931752b2pf3wj-gcc-4.8.4-lib/lib -lgcc_s}} %{pthread:-lpthread} %{shared:-lc} %{!shared:%{mieee-fp:-lieee} %{profile:-lc_p}%{!profile:-lc}};:-L/gnu/store/fbdjazgwy3zyx8qc5z4ag0j78k2d7raw-glibc-2.21/lib %{!static:-rpath=/gnu/store/fbdjazgwy3zyx8qc5z4ag0j78k2d7raw-glibc-2.21/lib %{!static-libgcc:-rpath=/gnu/store/fc8kqk3dazn6mcgcjxd931752b2pf3wj-gcc-4.8.4-lib/lib64 -rpath=/gnu/store/fc8kqk3dazn6mcgcjxd931752b2pf3wj-gcc-4.8.4-lib/lib -lgcc_s}} %{pthread:-lpthread} %{shared:-lc} %{!shared:%{mieee-fp:-lieee} %{profile:-lc_p}%{!profile:-lc}} %{!static: -ldl}} *mfwrap: %{static: %{fmudflap|fmudflapth: --wrap=malloc --wrap=free --wrap=calloc --wrap=realloc --wrap=mmap --wrap=mmap64 --wrap=munmap --wrap=alloca} %{fmudflapth: --wrap=pthread_create}} %{fmudflap|fmudflapth: --wrap=main} *mflib: %{fmudflap|fmudflapth: -export-dynamic} *link_gomp: *libgcc: %{static|static-libgcc:-lgcc -lgcc_eh}%{!static:%{!static-libgcc:%{!shared-libgcc:-lgcc --as-needed -lgcc_s --no-as-needed}%{shared-libgcc:-lgcc_s%{!shared: -lgcc}}}} *startfile: %{!mandroid|tno-android-ld:%{!shared: %{pg|p|profile:gcrt1.o%s;pie:Scrt1.o%s;:crt1.o%s}} crti.o%s %{static:crtbeginT.o%s;shared|pie:crtbeginS.o%s;:crtbegin.o%s};:%{shared: crtbegin_so%O%s;: %{static: crtbegin_static%O%s;: crtbegin_dynamic%O%s}}} *cross_compile: 0 *version: 4.8.4 *multilib: . ; *multilib_defaults: marm mlittle-endian mfloat-abi=hard mno-thumb-interwork *multilib_extra: *multilib_matches: *multilib_exclusions: *multilib_options: *multilib_reuse: *linker: collect2 *linker_plugin_file: *lto_wrapper: *lto_gcc: *link_libgcc: %D *md_exec_prefix: *md_startfile_prefix: *md_startfile_prefix_1: *startfile_prefix_spec: *sysroot_spec: --sysroot=%R *sysroot_suffix_spec: *sysroot_hdrs_suffix_spec: *self_spec: *subtarget_cpp_spec: %{posix:-D_POSIX_SOURCE} %{pthread:-D_REENTRANT} *asm_cpu_spec: %{mcpu=generic-*:-march=%*; :%{mcpu=*:-mcpu=%*} %{march=*:-march=%*}} *subtarget_extra_asm_spec: %{mabi=apcs-gnu|mabi=atpcs:-meabi=gnu;:-meabi=5} %{mcpu=arm8|mcpu=arm810|mcpu=strongarm*|march=armv4|mcpu=fa526|mcpu=fa626:--fix-v4bx} *subtarget_asm_float_spec: %{mapcs-float:-mfloat} *link_command: %{!fsyntax-only:%{!c:%{!M:%{!MM:%{!E:%{!S: %(linker) %{!fno-use-linker-plugin:%{flto|flto=*|fuse-linker-plugin: -plugin %(linker_plugin_file) -plugin-opt=%(lto_wrapper) -plugin-opt=-fresolution=%u.res %{!nostdlib:%{!nodefaultlibs:%:pass-through-libs(%(link_gcc_c_sequence))}} }}%{flto|flto=*:%<fcompare-debug*} %{flto} %{flto=*} %l %{pie:-pie} %{fuse-ld=*:-fuse-ld=%*} %X %{o*} %{e*} %{N} %{n} %{r} %{s} %{t} %{u*} %{z} %{Z} %{!nostdlib:%{!nostartfiles:%S}} %{static:} %{L*} %(mfwrap) %(link_libgcc) %{!nostdlib:%{!nodefaultlibs:%{fsanitize=address:%{!shared:libasan_preinit%O%s} %{static-libasan:%{!shared:-Bstatic --whole-archive -lasan --no-whole-archive -Bdynamic}}%{!static-libasan:-lasan}} %{fsanitize=thread:%{static-libtsan:%{!shared:-Bstatic --whole-archive -ltsan --no-whole-archive -Bdynamic}}%{!static-libtsan:-ltsan}}}} %o %{fopenmp|ftree-parallelize-loops=*:%:include(libgomp.spec)%(link_gomp)} %{fgnu-tm:%:include(libitm.spec)%(link_itm)} %(mflib) %{fsplit-stack: --wrap=pthread_create} %{fprofile-arcs|fprofile-generate*|coverage:-lgcov} %{!nostdlib:%{!nodefaultlibs:%{fsanitize=address: %{static-libasan:-ldl -lpthread} %{static:%ecannot specify -static with -fsanitize=address} %{fsanitize=thread:%e-fsanitize=address is incompatible with -fsanitize=thread}} %{fsanitize=thread: %{static-libtsan:-ldl -lpthread} %{!pie:%{!shared:%e-fsanitize=thread linking must be done with -pie or -shared}}}}} %{!nostdlib:%{!nodefaultlibs:%(link_ssp) %(link_gcc_c_sequence)}} %{!nostdlib:%{!nostartfiles:%E}} %{T*} }}}}}} mhw <at> novena:~$ --8<---------------cut here---------------end--------------->8---
bug-guix <at> gnu.org
:bug#20102
; Package guix
.
(Wed, 08 Apr 2015 09:53:01 GMT) Full text and rfc822 format available.Message #20 received at 20102 <at> debbugs.gnu.org (full text, mbox):
From: ludo <at> gnu.org (Ludovic Courtès) To: Mark H Weaver <mhw <at> netris.org> Cc: 20102 <at> debbugs.gnu.org Subject: Re: bug#20102: Problem with ld.so RUNPATH on armhf Date: Wed, 08 Apr 2015 11:52:30 +0200
Mark H Weaver <mhw <at> netris.org> skribis: > *lib: > %{!mandroid|tno-android-ld:-L/gnu/store/fbdjazgwy3zyx8qc5z4ag0j78k2d7raw-glibc-2.21/lib %{!static:-rpath=/gnu/store/fbdjazgwy3zyx8qc5z4ag0j78k2d7raw-glibc-2.21/lib %{!static-libgcc:-rpath=/gnu/store/fc8kqk3dazn6mcgcjxd931752b2pf3wj-gcc-4.8.4-lib/lib64 -rpath=/gnu/store/fc8kqk3dazn6mcgcjxd931752b2pf3wj-gcc-4.8.4-lib/lib -lgcc_s}} %{pthread:-lpthread} %{shared:-lc} %{!shared:%{mieee-fp:-lieee} %{profile:-lc_p}%{!profile:-lc}};:-L/gnu/store/fbdjazgwy3zyx8qc5z4ag0j78k2d7raw-glibc-2.21/lib %{!static:-rpath=/gnu/store/fbdjazgwy3zyx8qc5z4ag0j78k2d7raw-glibc-2.21/lib %{!static-libgcc:-rpath=/gnu/store/fc8kqk3dazn6mcgcjxd931752b2pf3wj-gcc-4.8.4-lib/lib64 -rpath=/gnu/store/fc8kqk3dazn6mcgcjxd931752b2pf3wj-gcc-4.8.4-lib/lib -lgcc_s}} %{pthread:-lpthread} %{shared:-lc} %{!shared:%{mieee-fp:-lieee} %{profile:-lc_p}%{!profile:-lc}} %{!static: -ldl}} On x86_64 I have pretty much the same: --8<---------------cut here---------------start------------->8--- *lib: %{!mandroid|tno-android-ld:-L/gnu/store/wiqbxcvzj3r35hd55yxzz919b1dv1hnv-glibc-2.21/lib %{!static:-rpath=/gnu/store/wiqbxcvzj3r35hd55yxzz919b1dv1hnv-glibc-2.21/lib %{!static-libgcc:-rpath=/gnu/store/h132igxl2lkj3sbfcbknn2rd493j7d1l-gcc-4.8.4-lib/lib64 -rpath=/gnu/store/h132igxl2lkj3sbfcbknn2rd493j7d1l-gcc-4.8.4-lib/lib -lgcc_s}} %{pthread:-lpthread} %{shared:-lc} %{!shared:%{mieee-fp:-lieee} %{profile:-lc_p}%{!profile:-lc}};:-L/gnu/store/wiqbxcvzj3r35hd55yxzz919b1dv1hnv-glibc-2.21/lib %{!static:-rpath=/gnu/store/wiqbxcvzj3r35hd55yxzz919b1dv1hnv-glibc-2.21/lib %{!static-libgcc:-rpath=/gnu/store/h132igxl2lkj3sbfcbknn2rd493j7d1l-gcc-4.8.4-lib/lib64 -rpath=/gnu/store/h132igxl2lkj3sbfcbknn2rd493j7d1l-gcc-4.8.4-lib/lib -lgcc_s}} %{pthread:-lpthread} %{shared:-lc} %{!shared:%{mieee-fp:-lieee} %{profile:-lc_p}%{!profile:-lc}} %{!static: -ldl}} --8<---------------cut here---------------end--------------->8--- ‘link_command’ is also identical. The difference between ‘glibc-final’ and (@ (gnu packages base) glibc) (used to build glibc-utf8-locales) is that the latter is built with ‘gcc-final’, and ‘gcc-final’ always passes “-rpath $libc/lib” when linking a shared object, as seen above. However, when linking ld.so, -nostdlib is used, so IIUC the “lib” spec is ignored, so the -rpath flag isn’t passed. At least that’s what happens on x86_64: I interrupted the (@ (gnu packages base) glibc) build on x86_64 and ran the command manually: --8<---------------cut here---------------start------------->8--- ludo <at> pluto /tmp/nix-build-glibc-2.21.drv-0/build/elf$ strace -s 345 -f -o ,,s gcc --verbose -nostdlib -nostartfiles -shared -o /tmp/nix-build-glibc-2.21.drv-0/build/elf/ld.so.new \ -Wl,-z,combreloc -Wl,-z,relro -Wl,--hash-style=both -Wl,-z,defs \ /tmp/nix-build-glibc-2.21.drv-0/build/elf/librtld.os -Wl,--version-script=/tmp/nix-build-glibc-2.21.drv-0/build/ld.map \ -Wl,-soname=ld-linux-x86-64.so.2 \ -Wl,-defsym=_begin=0 > > > > Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/gnu/store/4sqgnc9bc1kmn058yp4xnj4vpydmfzpq-gcc-4.8.4/libexec/gcc/x86_64-unknown-linux-gnu/4.8.4/lto-wrapper Target: x86_64-unknown-linux-gnu Configured with: Thread model: posix gcc version 4.8.4 (GCC) COMPILER_PATH=/gnu/store/4sqgnc9bc1kmn058yp4xnj4vpydmfzpq-gcc-4.8.4/libexec/gcc/x86_64-unknown-linux-gnu/4.8.4/:/gnu/store/4sqgnc9bc1kmn058yp4xnj4vpydmfzpq-gcc-4.8.4/libexec/gcc/x86_64-unknown-linux-gnu/4.8.4/:/gnu/store/4sqgnc9bc1kmn058yp4xnj4vpydmfzpq-gcc-4.8.4/libexec/gcc/x86_64-unknown-linux-gnu/:/gnu/store/h132igxl2lkj3sbfcbknn2rd493j7d1l-gcc-4.8.4-lib/lib/gcc/x86_64-unknown-linux-gnu/4.8.4/:/gnu/store/h132igxl2lkj3sbfcbknn2rd493j7d1l-gcc-4.8.4-lib/lib/gcc/x86_64-unknown-linux-gnu/ LIBRARY_PATH=/gnu/store/xxjla3x9lv9djgszi9g2i7sp3zdh2fhz-perl-5.16.1/lib/:/gnu/store/zf0lrd865zxwkx30zmmv2s9pm3cbnyq9-bzip2-1.0.6/lib/:/gnu/store/yc75pismby9n46pimi7l9ifjwmj2ybix-xz-5.0.4/lib/:/gnu/store/ip9ydlmc7kwb1q472rh8539rkplx8xgl-file-5.22/lib/:/gnu/store/vmlwh55kmsjk7mmrw5qi8n71f02l4w0p-gawk-4.1.1/lib/:/gnu/store/z9d24s2wkri1z0ix5r7qqyp7zy3dklb4-binutils-2.25/lib/:/gnu/store/wiqbxcvzj3r35hd55yxzz919b1dv1hnv-glibc-2.21/lib/:/gnu/store/43mpxdd1qwmlsfgnl79jy1zkkx25nz6r-glibc-utf8-locales-2.21/lib/:/gnu/store/h132igxl2lkj3sbfcbknn2rd493j7d1l-gcc-4.8.4-lib/lib/gcc/x86_64-unknown-linux-gnu/4.8.4/:/gnu/store/h132igxl2lkj3sbfcbknn2rd493j7d1l-gcc-4.8.4-lib/lib/gcc/x86_64-unknown-linux-gnu/4.8.4/../../../:/gnu/store/wiqbxcvzj3r35hd55yxzz919b1dv1hnv-glibc-2.21/lib COLLECT_GCC_OPTIONS='-v' '-nostdlib' '-nostartfiles' '-shared' '-o' '/tmp/nix-build-glibc-2.21.drv-0/build/elf/ld.so.new' '-mtune=generic' '-march=x86-64' /gnu/store/4sqgnc9bc1kmn058yp4xnj4vpydmfzpq-gcc-4.8.4/libexec/gcc/x86_64-unknown-linux-gnu/4.8.4/collect2 --eh-frame-hdr -m elf_x86_64 -shared -o /tmp/nix-build-glibc-2.21.drv-0/build/elf/ld.so.new -L/gnu/store/xxjla3x9lv9djgszi9g2i7sp3zdh2fhz-perl-5.16.1/lib -L/gnu/store/zf0lrd865zxwkx30zmmv2s9pm3cbnyq9-bzip2-1.0.6/lib -L/gnu/store/yc75pismby9n46pimi7l9ifjwmj2ybix-xz-5.0.4/lib -L/gnu/store/ip9ydlmc7kwb1q472rh8539rkplx8xgl-file-5.22/lib -L/gnu/store/vmlwh55kmsjk7mmrw5qi8n71f02l4w0p-gawk-4.1.1/lib -L/gnu/store/z9d24s2wkri1z0ix5r7qqyp7zy3dklb4-binutils-2.25/lib -L/gnu/store/wiqbxcvzj3r35hd55yxzz919b1dv1hnv-glibc-2.21/lib -L/gnu/store/43mpxdd1qwmlsfgnl79jy1zkkx25nz6r-glibc-utf8-locales-2.21/lib -L/gnu/store/h132igxl2lkj3sbfcbknn2rd493j7d1l-gcc-4.8.4-lib/lib/gcc/x86_64-unknown-linux-gnu/4.8.4 -L/gnu/store/h132igxl2lkj3sbfcbknn2rd493j7d1l-gcc-4.8.4-lib/lib/gcc/x86_64-unknown-linux-gnu/4.8.4/../../.. -L/gnu/store/wiqbxcvzj3r35hd55yxzz919b1dv1hnv-glibc-2.21/lib -z combreloc -z relro --hash-style=both -z defs /tmp/nix-build-glibc-2.21.drv-0/build/elf/librtld.os --version-script=/tmp/nix-build-glibc-2.21.drv-0/build/ld.map -soname=ld-linux-x86-64.so.2 -defsym=_begin=0 --8<---------------cut here---------------end--------------->8--- The strace log shows that ld is not passed the -rpath flags that appear in the “lib” spec: --8<---------------cut here---------------start------------->8--- 13261 execve("/gnu/store/crfqrvj1g3ldyhfqq8wpwqx3sd6qn4k7-ld-wrapper-0/bin/ld", ["/gnu/store/crfqrvj1g3ldyhfqq8wpwqx3sd6qn4k7-ld-wrapper-0/bin/ld", "--eh-frame-hdr", "-m", "elf_x86_64", "-shared", "-o", "/tmp/nix-build-glibc-2.21.drv-0/build/elf/ld.so.new", "-L/gnu/store/xxjla3x9lv9djgszi9g2i7sp3zdh2fhz-perl-5.16.1/lib", "-L/gnu/store/zf0lrd865zxwkx30zmmv2s9pm3cbnyq9-bzip2-1.0.6/lib", "-L/gnu/store/yc75pismby9n46pimi7l9ifjwmj2ybix-xz-5.0.4/lib", "-L/gnu/store/ip9ydlmc7kwb1q472rh8539rkplx8xgl-file-5.22/lib", "-L/gnu/store/vmlwh55kmsjk7mmrw5qi8n71f02l4w0p-gawk-4.1.1/lib", "-L/gnu/store/z9d24s2wkri1z0ix5r7qqyp7zy3dklb4-binutils-2.25/lib", "-L/gnu/store/wiqbxcvzj3r35hd55yxzz919b1dv1hnv-glibc-2.21/lib", "-L/gnu/store/43mpxdd1qwmlsfgnl79jy1zkkx25nz6r-glibc-utf8-locales-2.21/lib", "-L/gnu/store/h132igxl2lkj3sbfcbknn2rd493j7d1l-gcc-4.8.4-lib/lib/gcc/x86_64-unknown-linux-gnu/4.8.4", "-L/gnu/store/h132igxl2lkj3sbfcbknn2rd493j7d1l-gcc-4.8.4-lib/lib/gcc/x86_64-unknown-linux-gnu/4.8.4/../../..", "-L/gnu/store/wiqbxcvzj3r35hd55yxzz919b1dv1hnv-glibc-2.21/lib", "-z", "combreloc", "-z", "relro", "--hash-style=both", "-z", "defs", "/tmp/nix-build-glibc-2.21.drv-0/build/elf/librtld.os", "--version-script=/tmp/nix-build-glibc-2.21.drv-0/build/ld.map", "-soname=ld-linux-x86-64.so.2", "-defsym=_begin=0"], [/* 73 vars */] --8<---------------cut here---------------end--------------->8--- Could you try the same on armhf? TIA, Ludo’.
bug-guix <at> gnu.org
:bug#20102
; Package guix
.
(Wed, 08 Apr 2015 15:22:02 GMT) Full text and rfc822 format available.Message #23 received at 20102 <at> debbugs.gnu.org (full text, mbox):
From: Mark H Weaver <mhw <at> netris.org> To: ludo <at> gnu.org (Ludovic Courtès) Cc: 20102 <at> debbugs.gnu.org Subject: Re: bug#20102: Problem with ld.so RUNPATH on armhf Date: Wed, 08 Apr 2015 11:21:45 -0400
ludo <at> gnu.org (Ludovic Courtès) writes: > Mark H Weaver <mhw <at> netris.org> skribis: > > The difference between ‘glibc-final’ and (@ (gnu packages base) glibc) > (used to build glibc-utf8-locales) is that the latter is built with > ‘gcc-final’, and ‘gcc-final’ always passes “-rpath $libc/lib” when > linking a shared object, as seen above. > > However, when linking ld.so, -nostdlib is used, so IIUC the “lib” spec > is ignored, so the -rpath flag isn’t passed. > > At least that’s what happens on x86_64: I interrupted the (@ (gnu > packages base) glibc) build on x86_64 and ran the command manually: > > ludo <at> pluto /tmp/nix-build-glibc-2.21.drv-0/build/elf$ strace -s 345 -f -o ,,s gcc --verbose -nostdlib -nostartfiles -shared -o /tmp/nix-build-glibc-2.21.drv-0/build/elf/ld.so.new \ > -Wl,-z,combreloc -Wl,-z,relro -Wl,--hash-style=both -Wl,-z,defs \ > /tmp/nix-build-glibc-2.21.drv-0/build/elf/librtld.os -Wl,--version-script=/tmp/nix-build-glibc-2.21.drv-0/build/ld.map \ > -Wl,-soname=ld-linux-x86-64.so.2 \ > -Wl,-defsym=_begin=0 > >> > > > Using built-in specs. > COLLECT_GCC=gcc > COLLECT_LTO_WRAPPER=/gnu/store/4sqgnc9bc1kmn058yp4xnj4vpydmfzpq-gcc-4.8.4/libexec/gcc/x86_64-unknown-linux-gnu/4.8.4/lto-wrapper > Target: x86_64-unknown-linux-gnu > Configured with: > Thread model: posix > gcc version 4.8.4 (GCC) > COMPILER_PATH=/gnu/store/4sqgnc9bc1kmn058yp4xnj4vpydmfzpq-gcc-4.8.4/libexec/gcc/x86_64-unknown-linux-gnu/4.8.4/:/gnu/store/4sqgnc9bc1kmn058yp4xnj4vpydmfzpq-gcc-4.8.4/libexec/gcc/x86_64-unknown-linux-gnu/4.8.4/:/gnu/store/4sqgnc9bc1kmn058yp4xnj4vpydmfzpq-gcc-4.8.4/libexec/gcc/x86_64-unknown-linux-gnu/:/gnu/store/h132igxl2lkj3sbfcbknn2rd493j7d1l-gcc-4.8.4-lib/lib/gcc/x86_64-unknown-linux-gnu/4.8.4/:/gnu/store/h132igxl2lkj3sbfcbknn2rd493j7d1l-gcc-4.8.4-lib/lib/gcc/x86_64-unknown-linux-gnu/ > LIBRARY_PATH=/gnu/store/xxjla3x9lv9djgszi9g2i7sp3zdh2fhz-perl-5.16.1/lib/:/gnu/store/zf0lrd865zxwkx30zmmv2s9pm3cbnyq9-bzip2-1.0.6/lib/:/gnu/store/yc75pismby9n46pimi7l9ifjwmj2ybix-xz-5.0.4/lib/:/gnu/store/ip9ydlmc7kwb1q472rh8539rkplx8xgl-file-5.22/lib/:/gnu/store/vmlwh55kmsjk7mmrw5qi8n71f02l4w0p-gawk-4.1.1/lib/:/gnu/store/z9d24s2wkri1z0ix5r7qqyp7zy3dklb4-binutils-2.25/lib/:/gnu/store/wiqbxcvzj3r35hd55yxzz919b1dv1hnv-glibc-2.21/lib/:/gnu/store/43mpxdd1qwmlsfgnl79jy1zkkx25nz6r-glibc-utf8-locales-2.21/lib/:/gnu/store/h132igxl2lkj3sbfcbknn2rd493j7d1l-gcc-4.8.4-lib/lib/gcc/x86_64-unknown-linux-gnu/4.8.4/:/gnu/store/h132igxl2lkj3sbfcbknn2rd493j7d1l-gcc-4.8.4-lib/lib/gcc/x86_64-unknown-linux-gnu/4.8.4/../../../:/gnu/store/wiqbxcvzj3r35hd55yxzz919b1dv1hnv-glibc-2.21/lib > COLLECT_GCC_OPTIONS='-v' '-nostdlib' '-nostartfiles' '-shared' '-o' '/tmp/nix-build-glibc-2.21.drv-0/build/elf/ld.so.new' '-mtune=generic' '-march=x86-64' > /gnu/store/4sqgnc9bc1kmn058yp4xnj4vpydmfzpq-gcc-4.8.4/libexec/gcc/x86_64-unknown-linux-gnu/4.8.4/collect2 --eh-frame-hdr -m elf_x86_64 -shared -o /tmp/nix-build-glibc-2.21.drv-0/build/elf/ld.so.new -L/gnu/store/xxjla3x9lv9djgszi9g2i7sp3zdh2fhz-perl-5.16.1/lib -L/gnu/store/zf0lrd865zxwkx30zmmv2s9pm3cbnyq9-bzip2-1.0.6/lib -L/gnu/store/yc75pismby9n46pimi7l9ifjwmj2ybix-xz-5.0.4/lib -L/gnu/store/ip9ydlmc7kwb1q472rh8539rkplx8xgl-file-5.22/lib -L/gnu/store/vmlwh55kmsjk7mmrw5qi8n71f02l4w0p-gawk-4.1.1/lib -L/gnu/store/z9d24s2wkri1z0ix5r7qqyp7zy3dklb4-binutils-2.25/lib -L/gnu/store/wiqbxcvzj3r35hd55yxzz919b1dv1hnv-glibc-2.21/lib -L/gnu/store/43mpxdd1qwmlsfgnl79jy1zkkx25nz6r-glibc-utf8-locales-2.21/lib -L/gnu/store/h132igxl2lkj3sbfcbknn2rd493j7d1l-gcc-4.8.4-lib/lib/gcc/x86_64-unknown-linux-gnu/4.8.4 -L/gnu/store/h132igxl2lkj3sbfcbknn2rd493j7d1l-gcc-4.8.4-lib/lib/gcc/x86_64-unknown-linux-gnu/4.8.4/../../.. -L/gnu/store/wiqbxcvzj3r35hd55yxzz919b1dv1hnv-glibc-2.21/lib -z combreloc -z relro --hash-style=both -z defs /tmp/nix-build-glibc-2.21.drv-0/build/elf/librtld.os --version-script=/tmp/nix-build-glibc-2.21.drv-0/build/ld.map -soname=ld-linux-x86-64.so.2 -defsym=_begin=0 > > The strace log shows that ld is not passed the -rpath flags that appear > in the “lib” spec: > > 13261 execve("/gnu/store/crfqrvj1g3ldyhfqq8wpwqx3sd6qn4k7-ld-wrapper-0/bin/ld", ["/gnu/store/crfqrvj1g3ldyhfqq8wpwqx3sd6qn4k7-ld-wrapper-0/bin/ld", "--eh-frame-hdr", "-m", "elf_x86_64", "-shared", "-o", "/tmp/nix-build-glibc-2.21.drv-0/build/elf/ld.so.new", "-L/gnu/store/xxjla3x9lv9djgszi9g2i7sp3zdh2fhz-perl-5.16.1/lib", "-L/gnu/store/zf0lrd865zxwkx30zmmv2s9pm3cbnyq9-bzip2-1.0.6/lib", "-L/gnu/store/yc75pismby9n46pimi7l9ifjwmj2ybix-xz-5.0.4/lib", "-L/gnu/store/ip9ydlmc7kwb1q472rh8539rkplx8xgl-file-5.22/lib", "-L/gnu/store/vmlwh55kmsjk7mmrw5qi8n71f02l4w0p-gawk-4.1.1/lib", "-L/gnu/store/z9d24s2wkri1z0ix5r7qqyp7zy3dklb4-binutils-2.25/lib", "-L/gnu/store/wiqbxcvzj3r35hd55yxzz919b1dv1hnv-glibc-2.21/lib", "-L/gnu/store/43mpxdd1qwmlsfgnl79jy1zkkx25nz6r-glibc-utf8-locales-2.21/lib", "-L/gnu/store/h132igxl2lkj3sbfcbknn2rd493j7d1l-gcc-4.8.4-lib/lib/gcc/x86_64-unknown-linux-gnu/4.8.4", "-L/gnu/store/h132igxl2lkj3sbfcbknn2rd493j7d1l-gcc-4.8.4-lib/lib/gcc/x86_64-unknown-linux-gnu/4.8.4/../../..", "-L/gnu/store/wiqbxcvzj3r35hd55yxzz919b1dv1hnv-glibc-2.21/lib", "-z", "combreloc", "-z", "relro", "--hash-style=both", "-z", "defs", "/tmp/nix-build-glibc-2.21.drv-0/build/elf/librtld.os", "--version-script=/tmp/nix-build-glibc-2.21.drv-0/build/ld.map", "-soname=ld-linux-x86-64.so.2", "-defsym=_begin=0"], [/* 73 vars */] > > Could you try the same on armhf? I've done so. Here's the transcript: --8<---------------cut here---------------start------------->8--- mhw <at> novena:/tmp/nix-build-glibc-2.21.drv-0$ source environment-variables mhw <at> novena:/tmp/nix-build-glibc-2.21.drv-0/build$ cd /tmp/nix-build-glibc-2.21.drv-0/build/elf/ mhw <at> novena:/tmp/nix-build-glibc-2.21.drv-0/build/elf$ /usr/bin/strace -s 345 -f -o ,,s gcc --verbose -nostdlib -nostartfiles -shared -o /tmp/nix-build-glibc-2.21.drv-0/build/elf/ld.so.new \ -Wl,-z,combreloc -Wl,-z,relro -Wl,--hash-style=both -Wl,-z,defs \ /tmp/nix-build-glibc-2.21.drv-0/build/elf/librtld.os -Wl,--version-script=/tmp/nix-build-glibc-2.21.drv-0/build/ld.map \ -Wl,-soname=ld-linux-armhf.so.3 \ -Wl,-defsym=_begin=0 > > > > Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/gnu/store/qchkhdj4nn4aqs8rrbbyybrj2sarjs3j-gcc-4.8.4/libexec/gcc/armv7l-unknown-linux-gnueabihf/4.8.4/lto-wrapper Target: armv7l-unknown-linux-gnueabihf Configured with: Thread model: posix gcc version 4.8.4 (GCC) COMPILER_PATH=/gnu/store/qchkhdj4nn4aqs8rrbbyybrj2sarjs3j-gcc-4.8.4/libexec/gcc/armv7l-unknown-linux-gnueabihf/4.8.4/:/gnu/store/qchkhdj4nn4aqs8rrbbyybrj2sarjs3j-gcc-4.8.4/libexec/gcc/armv7l-unknown-linux-gnueabihf/4.8.4/:/gnu/store/qchkhdj4nn4aqs8rrbbyybrj2sarjs3j-gcc-4.8.4/libexec/gcc/armv7l-unknown-linux-gnueabihf/:/gnu/store/fc8kqk3dazn6mcgcjxd931752b2pf3wj-gcc-4.8.4-lib/lib/gcc/armv7l-unknown-linux-gnueabihf/4.8.4/:/gnu/store/fc8kqk3dazn6mcgcjxd931752b2pf3wj-gcc-4.8.4-lib/lib/gcc/armv7l-unknown-linux-gnueabihf/ LIBRARY_PATH=/gnu/store/84bsc47g2052allrmh4ph6xaqvp6f4cm-perl-5.16.1/lib/:/gnu/store/lakz7x2m4vqvvfdasn5x95a91rkqqs3c-bzip2-1.0.6/lib/:/gnu/store/mrb163wwjc45hgrcjwmb6nxp8fgab3lk-xz-5.0.4/lib/:/gnu/store/f1fnh2sp1j32jysdr2nw9z296iba6b5d-file-5.22/lib/:/gnu/store/l9ji7gc640j2r8c1c561iwcnqpcd585m-gawk-4.1.1/lib/:/gnu/store/w7gjnx5rz64mssxndnryazlwlhflfd2j-binutils-2.25/lib/:/gnu/store/fbdjazgwy3zyx8qc5z4ag0j78k2d7raw-glibc-2.21/lib/:/gnu/store/psmxs9gcr9l4arz7agmp94vm8fjwninv-glibc-utf8-locales-2.21/lib/:/gnu/store/fc8kqk3dazn6mcgcjxd931752b2pf3wj-gcc-4.8.4-lib/lib/gcc/armv7l-unknown-linux-gnueabihf/4.8.4/:/gnu/store/fc8kqk3dazn6mcgcjxd931752b2pf3wj-gcc-4.8.4-lib/lib/gcc/armv7l-unknown-linux-gnueabihf/4.8.4/../../../:/gnu/store/fbdjazgwy3zyx8qc5z4ag0j78k2d7raw-glibc-2.21/lib COLLECT_GCC_OPTIONS='-v' '-nostdlib' '-nostartfiles' '-shared' '-o' '/tmp/nix-build-glibc-2.21.drv-0/build/elf/ld.so.new' '-march=armv7-a' '-mfloat-abi=hard' '-mfpu=vfpv3-d16' '-mthumb' '-mtls-dialect=gnu' /gnu/store/qchkhdj4nn4aqs8rrbbyybrj2sarjs3j-gcc-4.8.4/libexec/gcc/armv7l-unknown-linux-gnueabihf/4.8.4/collect2 --eh-frame-hdr -shared -dynamic-linker /gnu/store/fbdjazgwy3zyx8qc5z4ag0j78k2d7raw-glibc-2.21/lib/ld-linux-armhf.so.3 -X -m armelf_linux_eabi -o /tmp/nix-build-glibc-2.21.drv-0/build/elf/ld.so.new -L/gnu/store/84bsc47g2052allrmh4ph6xaqvp6f4cm-perl-5.16.1/lib -L/gnu/store/lakz7x2m4vqvvfdasn5x95a91rkqqs3c-bzip2-1.0.6/lib -L/gnu/store/mrb163wwjc45hgrcjwmb6nxp8fgab3lk-xz-5.0.4/lib -L/gnu/store/f1fnh2sp1j32jysdr2nw9z296iba6b5d-file-5.22/lib -L/gnu/store/l9ji7gc640j2r8c1c561iwcnqpcd585m-gawk-4.1.1/lib -L/gnu/store/w7gjnx5rz64mssxndnryazlwlhflfd2j-binutils-2.25/lib -L/gnu/store/fbdjazgwy3zyx8qc5z4ag0j78k2d7raw-glibc-2.21/lib -L/gnu/store/psmxs9gcr9l4arz7agmp94vm8fjwninv-glibc-utf8-locales-2.21/lib -L/gnu/store/fc8kqk3dazn6mcgcjxd931752b2pf3wj-gcc-4.8.4-lib/lib/gcc/armv7l-unknown-linux-gnueabihf/4.8.4 -L/gnu/store/fc8kqk3dazn6mcgcjxd931752b2pf3wj-gcc-4.8.4-lib/lib/gcc/armv7l-unknown-linux-gnueabihf/4.8.4/../../.. -L/gnu/store/fbdjazgwy3zyx8qc5z4ag0j78k2d7raw-glibc-2.21/lib -z combreloc -z relro --hash-style=both -z defs /tmp/nix-build-glibc-2.21.drv-0/build/elf/librtld.os --version-script=/tmp/nix-build-glibc-2.21.drv-0/build/ld.map -soname=ld-linux-armhf.so.3 -defsym=_begin=0 mhw <at> novena:/tmp/nix-build-glibc-2.21.drv-0/build/elf$ --8<---------------cut here---------------end--------------->8--- and here's the corresponding line in the strace log: --8<---------------cut here---------------start------------->8--- 13440 execve("/gnu/store/p70wvylq6xdrlxblnk76k3ljgkrmvpnq-ld-wrapper-0/bin/ld", ["/gnu/store/p70wvylq6xdrlxblnk76k3ljgkrmvpnq-ld-wrapper-0/bin/ld", "--eh-frame-hdr", "-shared", "-dynamic-linker", "/gnu/store/fbdjazgwy3zyx8qc5z4ag0j78k2d7raw-glibc-2.21/lib/ld-linux-armhf.so.3", "-X", "-m", "armelf_linux_eabi", "-o", "/tmp/nix-build-glibc-2.21.drv-0/build/elf/ld.so.new", "-L/gnu/store/84bsc47g2052allrmh4ph6xaqvp6f4cm-perl-5.16.1/lib", "-L/gnu/store/lakz7x2m4vqvvfdasn5x95a91rkqqs3c-bzip2-1.0.6/lib", "-L/gnu/store/mrb163wwjc45hgrcjwmb6nxp8fgab3lk-xz-5.0.4/lib", "-L/gnu/store/f1fnh2sp1j32jysdr2nw9z296iba6b5d-file-5.22/lib", "-L/gnu/store/l9ji7gc640j2r8c1c561iwcnqpcd585m-gawk-4.1.1/lib", "-L/gnu/store/w7gjnx5rz64mssxndnryazlwlhflfd2j-binutils-2.25/lib", "-L/gnu/store/fbdjazgwy3zyx8qc5z4ag0j78k2d7raw-glibc-2.21/lib", "-L/gnu/store/psmxs9gcr9l4arz7agmp94vm8fjwninv-glibc-utf8-locales-2.21/lib", "-L/gnu/store/fc8kqk3dazn6mcgcjxd931752b2pf3wj-gcc-4.8.4-lib/lib/gcc/armv7l-unknown-linux-gnueabihf/4.8.4", "-L/gnu/store/fc8kqk3dazn6mcgcjxd931752b2pf3wj-gcc-4.8.4-lib/lib/gcc/armv7l-unknown-linux-gnueabihf/4.8.4/../../..", "-L/gnu/store/fbdjazgwy3zyx8qc5z4ag0j78k2d7raw-glibc-2.21/lib", "-z", "combreloc", "-z", "relro", "--hash-style=both", "-z", "defs", "/tmp/nix-build-glibc-2.21.drv-0/build/elf/librtld.os", "--version-script=/tmp/nix-build-glibc-2.21.drv-0/build/ld.map", "-soname=ld-linux-armhf.so.3", "-defsym=_begin=0"], [/* 55 vars */] <unfinished ...> --8<---------------cut here---------------end--------------->8--- Thanks! Mark
bug-guix <at> gnu.org
:bug#20102
; Package guix
.
(Wed, 08 Apr 2015 15:26:02 GMT) Full text and rfc822 format available.Message #26 received at 20102 <at> debbugs.gnu.org (full text, mbox):
From: Mark H Weaver <mhw <at> netris.org> To: ludo <at> gnu.org (Ludovic Courtès) Cc: 20102 <at> debbugs.gnu.org Subject: Re: bug#20102: Problem with ld.so RUNPATH on armhf Date: Wed, 08 Apr 2015 11:26:07 -0400
Mark H Weaver <mhw <at> netris.org> writes: > ludo <at> gnu.org (Ludovic Courtès) writes: > >> Could you try the same on armhf? > > I've done so. Here's the transcript: > > mhw <at> novena:/tmp/nix-build-glibc-2.21.drv-0$ source environment-variables > mhw <at> novena:/tmp/nix-build-glibc-2.21.drv-0/build$ cd /tmp/nix-build-glibc-2.21.drv-0/build/elf/ > mhw <at> novena:/tmp/nix-build-glibc-2.21.drv-0/build/elf$ /usr/bin/strace -s 345 -f -o ,,s gcc --verbose -nostdlib -nostartfiles -shared -o /tmp/nix-build-glibc-2.21.drv-0/build/elf/ld.so.new \ > -Wl,-z,combreloc -Wl,-z,relro -Wl,--hash-style=both -Wl,-z,defs \ > /tmp/nix-build-glibc-2.21.drv-0/build/elf/librtld.os -Wl,--version-script=/tmp/nix-build-glibc-2.21.drv-0/build/ld.map \ > -Wl,-soname=ld-linux-armhf.so.3 \ > -Wl,-defsym=_begin=0 >> > > > Using built-in specs. > COLLECT_GCC=gcc > COLLECT_LTO_WRAPPER=/gnu/store/qchkhdj4nn4aqs8rrbbyybrj2sarjs3j-gcc-4.8.4/libexec/gcc/armv7l-unknown-linux-gnueabihf/4.8.4/lto-wrapper > Target: armv7l-unknown-linux-gnueabihf > Configured with: > Thread model: posix > gcc version 4.8.4 (GCC) > COMPILER_PATH=/gnu/store/qchkhdj4nn4aqs8rrbbyybrj2sarjs3j-gcc-4.8.4/libexec/gcc/armv7l-unknown-linux-gnueabihf/4.8.4/:/gnu/store/qchkhdj4nn4aqs8rrbbyybrj2sarjs3j-gcc-4.8.4/libexec/gcc/armv7l-unknown-linux-gnueabihf/4.8.4/:/gnu/store/qchkhdj4nn4aqs8rrbbyybrj2sarjs3j-gcc-4.8.4/libexec/gcc/armv7l-unknown-linux-gnueabihf/:/gnu/store/fc8kqk3dazn6mcgcjxd931752b2pf3wj-gcc-4.8.4-lib/lib/gcc/armv7l-unknown-linux-gnueabihf/4.8.4/:/gnu/store/fc8kqk3dazn6mcgcjxd931752b2pf3wj-gcc-4.8.4-lib/lib/gcc/armv7l-unknown-linux-gnueabihf/ > LIBRARY_PATH=/gnu/store/84bsc47g2052allrmh4ph6xaqvp6f4cm-perl-5.16.1/lib/:/gnu/store/lakz7x2m4vqvvfdasn5x95a91rkqqs3c-bzip2-1.0.6/lib/:/gnu/store/mrb163wwjc45hgrcjwmb6nxp8fgab3lk-xz-5.0.4/lib/:/gnu/store/f1fnh2sp1j32jysdr2nw9z296iba6b5d-file-5.22/lib/:/gnu/store/l9ji7gc640j2r8c1c561iwcnqpcd585m-gawk-4.1.1/lib/:/gnu/store/w7gjnx5rz64mssxndnryazlwlhflfd2j-binutils-2.25/lib/:/gnu/store/fbdjazgwy3zyx8qc5z4ag0j78k2d7raw-glibc-2.21/lib/:/gnu/store/psmxs9gcr9l4arz7agmp94vm8fjwninv-glibc-utf8-locales-2.21/lib/:/gnu/store/fc8kqk3dazn6mcgcjxd931752b2pf3wj-gcc-4.8.4-lib/lib/gcc/armv7l-unknown-linux-gnueabihf/4.8.4/:/gnu/store/fc8kqk3dazn6mcgcjxd931752b2pf3wj-gcc-4.8.4-lib/lib/gcc/armv7l-unknown-linux-gnueabihf/4.8.4/../../../:/gnu/store/fbdjazgwy3zyx8qc5z4ag0j78k2d7raw-glibc-2.21/lib > COLLECT_GCC_OPTIONS='-v' '-nostdlib' '-nostartfiles' '-shared' '-o' '/tmp/nix-build-glibc-2.21.drv-0/build/elf/ld.so.new' '-march=armv7-a' '-mfloat-abi=hard' '-mfpu=vfpv3-d16' '-mthumb' '-mtls-dialect=gnu' > /gnu/store/qchkhdj4nn4aqs8rrbbyybrj2sarjs3j-gcc-4.8.4/libexec/gcc/armv7l-unknown-linux-gnueabihf/4.8.4/collect2 --eh-frame-hdr -shared -dynamic-linker /gnu/store/fbdjazgwy3zyx8qc5z4ag0j78k2d7raw-glibc-2.21/lib/ld-linux-armhf.so.3 -X -m armelf_linux_eabi -o /tmp/nix-build-glibc-2.21.drv-0/build/elf/ld.so.new -L/gnu/store/84bsc47g2052allrmh4ph6xaqvp6f4cm-perl-5.16.1/lib -L/gnu/store/lakz7x2m4vqvvfdasn5x95a91rkqqs3c-bzip2-1.0.6/lib -L/gnu/store/mrb163wwjc45hgrcjwmb6nxp8fgab3lk-xz-5.0.4/lib -L/gnu/store/f1fnh2sp1j32jysdr2nw9z296iba6b5d-file-5.22/lib -L/gnu/store/l9ji7gc640j2r8c1c561iwcnqpcd585m-gawk-4.1.1/lib -L/gnu/store/w7gjnx5rz64mssxndnryazlwlhflfd2j-binutils-2.25/lib -L/gnu/store/fbdjazgwy3zyx8qc5z4ag0j78k2d7raw-glibc-2.21/lib -L/gnu/store/psmxs9gcr9l4arz7agmp94vm8fjwninv-glibc-utf8-locales-2.21/lib -L/gnu/store/fc8kqk3dazn6mcgcjxd931752b2pf3wj-gcc-4.8.4-lib/lib/gcc/armv7l-unknown-linux-gnueabihf/4.8.4 -L/gnu/store/fc8kqk3dazn6mcgcjxd931752b2pf3wj-gcc-4.8.4-lib/lib/gcc/armv7l-unknown-linux-gnueabihf/4.8.4/../../.. -L/gnu/store/fbdjazgwy3zyx8qc5z4ag0j78k2d7raw-glibc-2.21/lib -z combreloc -z relro --hash-style=both -z defs /tmp/nix-build-glibc-2.21.drv-0/build/elf/librtld.os --version-script=/tmp/nix-build-glibc-2.21.drv-0/build/ld.map -soname=ld-linux-armhf.so.3 -defsym=_begin=0 > mhw <at> novena:/tmp/nix-build-glibc-2.21.drv-0/build/elf$ and I should add this sanity check: --8<---------------cut here---------------start------------->8--- mhw <at> novena:/tmp/nix-build-glibc-2.21.drv-0/build/elf$ readelf -a ld.so.new | grep RUNPATH 0x0000001d (RUNPATH) Library runpath: [/gnu/store/fbdjazgwy3zyx8qc5z4ag0j78k2d7raw-glibc-2.21/lib] --8<---------------cut here---------------end--------------->8--- Mark
bug-guix <at> gnu.org
:bug#20102
; Package guix
.
(Wed, 08 Apr 2015 15:49:01 GMT) Full text and rfc822 format available.Message #29 received at 20102 <at> debbugs.gnu.org (full text, mbox):
From: ludo <at> gnu.org (Ludovic Courtès) To: Mark H Weaver <mhw <at> netris.org> Cc: 20102 <at> debbugs.gnu.org Subject: Re: bug#20102: Problem with ld.so RUNPATH on armhf Date: Wed, 08 Apr 2015 17:48:09 +0200
Mark H Weaver <mhw <at> netris.org> skribis: > Mark H Weaver <mhw <at> netris.org> writes: > >> ludo <at> gnu.org (Ludovic Courtès) writes: >> >>> Could you try the same on armhf? >> >> I've done so. Here's the transcript: >> >> mhw <at> novena:/tmp/nix-build-glibc-2.21.drv-0$ source environment-variables >> mhw <at> novena:/tmp/nix-build-glibc-2.21.drv-0/build$ cd /tmp/nix-build-glibc-2.21.drv-0/build/elf/ >> mhw <at> novena:/tmp/nix-build-glibc-2.21.drv-0/build/elf$ /usr/bin/strace -s 345 -f -o ,,s gcc --verbose -nostdlib -nostartfiles -shared -o /tmp/nix-build-glibc-2.21.drv-0/build/elf/ld.so.new \ >> -Wl,-z,combreloc -Wl,-z,relro -Wl,--hash-style=both -Wl,-z,defs \ >> /tmp/nix-build-glibc-2.21.drv-0/build/elf/librtld.os -Wl,--version-script=/tmp/nix-build-glibc-2.21.drv-0/build/ld.map \ >> -Wl,-soname=ld-linux-armhf.so.3 \ >> -Wl,-defsym=_begin=0 >>> > > > Using built-in specs. >> COLLECT_GCC=gcc >> COLLECT_LTO_WRAPPER=/gnu/store/qchkhdj4nn4aqs8rrbbyybrj2sarjs3j-gcc-4.8.4/libexec/gcc/armv7l-unknown-linux-gnueabihf/4.8.4/lto-wrapper >> Target: armv7l-unknown-linux-gnueabihf >> Configured with: >> Thread model: posix >> gcc version 4.8.4 (GCC) >> COMPILER_PATH=/gnu/store/qchkhdj4nn4aqs8rrbbyybrj2sarjs3j-gcc-4.8.4/libexec/gcc/armv7l-unknown-linux-gnueabihf/4.8.4/:/gnu/store/qchkhdj4nn4aqs8rrbbyybrj2sarjs3j-gcc-4.8.4/libexec/gcc/armv7l-unknown-linux-gnueabihf/4.8.4/:/gnu/store/qchkhdj4nn4aqs8rrbbyybrj2sarjs3j-gcc-4.8.4/libexec/gcc/armv7l-unknown-linux-gnueabihf/:/gnu/store/fc8kqk3dazn6mcgcjxd931752b2pf3wj-gcc-4.8.4-lib/lib/gcc/armv7l-unknown-linux-gnueabihf/4.8.4/:/gnu/store/fc8kqk3dazn6mcgcjxd931752b2pf3wj-gcc-4.8.4-lib/lib/gcc/armv7l-unknown-linux-gnueabihf/ >> LIBRARY_PATH=/gnu/store/84bsc47g2052allrmh4ph6xaqvp6f4cm-perl-5.16.1/lib/:/gnu/store/lakz7x2m4vqvvfdasn5x95a91rkqqs3c-bzip2-1.0.6/lib/:/gnu/store/mrb163wwjc45hgrcjwmb6nxp8fgab3lk-xz-5.0.4/lib/:/gnu/store/f1fnh2sp1j32jysdr2nw9z296iba6b5d-file-5.22/lib/:/gnu/store/l9ji7gc640j2r8c1c561iwcnqpcd585m-gawk-4.1.1/lib/:/gnu/store/w7gjnx5rz64mssxndnryazlwlhflfd2j-binutils-2.25/lib/:/gnu/store/fbdjazgwy3zyx8qc5z4ag0j78k2d7raw-glibc-2.21/lib/:/gnu/store/psmxs9gcr9l4arz7agmp94vm8fjwninv-glibc-utf8-locales-2.21/lib/:/gnu/store/fc8kqk3dazn6mcgcjxd931752b2pf3wj-gcc-4.8.4-lib/lib/gcc/armv7l-unknown-linux-gnueabihf/4.8.4/:/gnu/store/fc8kqk3dazn6mcgcjxd931752b2pf3wj-gcc-4.8.4-lib/lib/gcc/armv7l-unknown-linux-gnueabihf/4.8.4/../../../:/gnu/store/fbdjazgwy3zyx8qc5z4ag0j78k2d7raw-glibc-2.21/lib >> COLLECT_GCC_OPTIONS='-v' '-nostdlib' '-nostartfiles' '-shared' '-o' '/tmp/nix-build-glibc-2.21.drv-0/build/elf/ld.so.new' '-march=armv7-a' '-mfloat-abi=hard' '-mfpu=vfpv3-d16' '-mthumb' '-mtls-dialect=gnu' >> /gnu/store/qchkhdj4nn4aqs8rrbbyybrj2sarjs3j-gcc-4.8.4/libexec/gcc/armv7l-unknown-linux-gnueabihf/4.8.4/collect2 --eh-frame-hdr -shared -dynamic-linker /gnu/store/fbdjazgwy3zyx8qc5z4ag0j78k2d7raw-glibc-2.21/lib/ld-linux-armhf.so.3 -X -m armelf_linux_eabi -o /tmp/nix-build-glibc-2.21.drv-0/build/elf/ld.so.new -L/gnu/store/84bsc47g2052allrmh4ph6xaqvp6f4cm-perl-5.16.1/lib -L/gnu/store/lakz7x2m4vqvvfdasn5x95a91rkqqs3c-bzip2-1.0.6/lib -L/gnu/store/mrb163wwjc45hgrcjwmb6nxp8fgab3lk-xz-5.0.4/lib -L/gnu/store/f1fnh2sp1j32jysdr2nw9z296iba6b5d-file-5.22/lib -L/gnu/store/l9ji7gc640j2r8c1c561iwcnqpcd585m-gawk-4.1.1/lib -L/gnu/store/w7gjnx5rz64mssxndnryazlwlhflfd2j-binutils-2.25/lib -L/gnu/store/fbdjazgwy3zyx8qc5z4ag0j78k2d7raw-glibc-2.21/lib -L/gnu/store/psmxs9gcr9l4arz7agmp94vm8fjwninv-glibc-utf8-locales-2.21/lib -L/gnu/store/fc8kqk3dazn6mcgcjxd931752b2pf3wj-gcc-4.8.4-lib/lib/gcc/armv7l-unknown-linux-gnueabihf/4.8.4 -L/gnu/store/fc8kqk3dazn6mcgcjxd931752b2pf3wj-gcc-4.8.4-lib/lib/gcc/armv7l-unknown-linux-gnueabihf/4.8.4/../../.. -L/gnu/store/fbdjazgwy3zyx8qc5z4ag0j78k2d7raw-glibc-2.21/lib -z combreloc -z relro --hash-style=both -z defs /tmp/nix-build-glibc-2.21.drv-0/build/elf/librtld.os --version-script=/tmp/nix-build-glibc-2.21.drv-0/build/ld.map -soname=ld-linux-armhf.so.3 -defsym=_begin=0 >> mhw <at> novena:/tmp/nix-build-glibc-2.21.drv-0/build/elf$ > > and I should add this sanity check: > > mhw <at> novena:/tmp/nix-build-glibc-2.21.drv-0/build/elf$ readelf -a ld.so.new | grep RUNPATH > 0x0000001d (RUNPATH) Library runpath: [/gnu/store/fbdjazgwy3zyx8qc5z4ag0j78k2d7raw-glibc-2.21/lib] So there’s no explicit -rpath, yet it slips through. In that build directory, can you rm elf/ld*so* and then restart the build, but this time with: export GUIX_LD_WRAPPER_DEBUG=yes TIA! Ludo’.
bug-guix <at> gnu.org
:bug#20102
; Package guix
.
(Wed, 08 Apr 2015 15:50:03 GMT) Full text and rfc822 format available.Message #32 received at 20102 <at> debbugs.gnu.org (full text, mbox):
From: Mark H Weaver <mhw <at> netris.org> To: ludo <at> gnu.org (Ludovic Courtès) Cc: 20102 <at> debbugs.gnu.org Subject: Re: bug#20102: Problem with ld.so RUNPATH on armhf Date: Wed, 08 Apr 2015 11:50:08 -0400
Mark H Weaver <mhw <at> netris.org> writes: > and here's the corresponding line in the strace log: > > 13440 execve("/gnu/store/p70wvylq6xdrlxblnk76k3ljgkrmvpnq-ld-wrapper-0/bin/ld", ["/gnu/store/p70wvylq6xdrlxblnk76k3ljgkrmvpnq-ld-wrapper-0/bin/ld", "--eh-frame-hdr", "-shared", "-dynamic-linker", "/gnu/store/fbdjazgwy3zyx8qc5z4ag0j78k2d7raw-glibc-2.21/lib/ld-linux-armhf.so.3", "-X", "-m", "armelf_linux_eabi", "-o", "/tmp/nix-build-glibc-2.21.drv-0/build/elf/ld.so.new", "-L/gnu/store/84bsc47g2052allrmh4ph6xaqvp6f4cm-perl-5.16.1/lib", "-L/gnu/store/lakz7x2m4vqvvfdasn5x95a91rkqqs3c-bzip2-1.0.6/lib", "-L/gnu/store/mrb163wwjc45hgrcjwmb6nxp8fgab3lk-xz-5.0.4/lib", "-L/gnu/store/f1fnh2sp1j32jysdr2nw9z296iba6b5d-file-5.22/lib", "-L/gnu/store/l9ji7gc640j2r8c1c561iwcnqpcd585m-gawk-4.1.1/lib", "-L/gnu/store/w7gjnx5rz64mssxndnryazlwlhflfd2j-binutils-2.25/lib", "-L/gnu/store/fbdjazgwy3zyx8qc5z4ag0j78k2d7raw-glibc-2.21/lib", "-L/gnu/store/psmxs9gcr9l4arz7agmp94vm8fjwninv-glibc-utf8-locales-2.21/lib", "-L/gnu/store/fc8kqk3dazn6mcgcjxd931752b2pf3wj-gcc-4.8.4-lib/lib/gcc/armv7l-unknown-linux-gnueabihf/4.8.4", "-L/gnu/store/fc8kqk3dazn6mcgcjxd931752b2pf3wj-gcc-4.8.4-lib/lib/gcc/armv7l-unknown-linux-gnueabihf/4.8.4/../../..", "-L/gnu/store/fbdjazgwy3zyx8qc5z4ag0j78k2d7raw-glibc-2.21/lib", "-z", "combreloc", "-z", "relro", "--hash-style=both", "-z", "defs", "/tmp/nix-build-glibc-2.21.drv-0/build/elf/librtld.os", "--version-script=/tmp/nix-build-glibc-2.21.drv-0/build/ld.map", "-soname=ld-linux-armhf.so.3", "-defsym=_begin=0"], [/* 55 vars */] <unfinished ...> So, -rpath is not passed to ld-wrapper's ld, but it _is_ passed to the binutils ld: --8<---------------cut here---------------start------------->8--- 13440 execve("/gnu/store/w7gjnx5rz64mssxndnryazlwlhflfd2j-binutils-2.25/bin/ld", ["ld", "--eh-frame-hdr", "-shared", "-dynamic-linker", "/gnu/store/fbdjazgwy3zyx8qc5z4ag0j78k2d7raw-glibc-2.21/lib/ld-linux-armhf.so.3", "-X", "-m", "armelf_linux_eabi", "-o", "/tmp/nix-build-glibc-2.21.drv-0/build/elf/ld.so.new", "-L/gnu/store/84bsc47g2052allrmh4ph6xaqvp6f4cm-perl-5.16.1/lib", "-L/gnu/store/lakz7x2m4vqvvfdasn5x95a91rkqqs3c-bzip2-1.0.6/lib", "-L/gnu/store/mrb163wwjc45hgrcjwmb6nxp8fgab3lk-xz-5.0.4/lib", "-L/gnu/store/f1fnh2sp1j32jysdr2nw9z296iba6b5d-file-5.22/lib", "-L/gnu/store/l9ji7gc640j2r8c1c561iwcnqpcd585m-gawk-4.1.1/lib", "-L/gnu/store/w7gjnx5rz64mssxndnryazlwlhflfd2j-binutils-2.25/lib", "-L/gnu/store/fbdjazgwy3zyx8qc5z4ag0j78k2d7raw-glibc-2.21/lib", "-L/gnu/store/psmxs9gcr9l4arz7agmp94vm8fjwninv-glibc-utf8-locales-2.21/lib", "-L/gnu/store/fc8kqk3dazn6mcgcjxd931752b2pf3wj-gcc-4.8.4-lib/lib/gcc/armv7l-unknown-linux-gnueabihf/4.8.4", "-L/gnu/store/fc8kqk3dazn6mcgcjxd931752b2pf3wj-gcc-4.8.4-lib/lib/gcc/armv7l-unknown-linux-gnueabihf/4.8.4/../../..", "-L/gnu/store/fbdjazgwy3zyx8qc5z4ag0j78k2d7raw-glibc-2.21/lib", "-z", "combreloc", "-z", "relro", "--hash-style=both", "-z", "defs", "/tmp/nix-build-glibc-2.21.drv-0/build/elf/librtld.os", "--version-script=/tmp/nix-build-glibc-2.21.drv-0/build/ld.map", "-soname=ld-linux-armhf.so.3", "-defsym=_begin=0", "-rpath", "/gnu/store/fbdjazgwy3zyx8qc5z4ag0j78k2d7raw-glibc-2.21/lib"], [/* 53 vars */]) = 0 --8<---------------cut here---------------end--------------->8--- Mark
bug-guix <at> gnu.org
:bug#20102
; Package guix
.
(Wed, 08 Apr 2015 18:40:01 GMT) Full text and rfc822 format available.Message #35 received at 20102 <at> debbugs.gnu.org (full text, mbox):
From: ludo <at> gnu.org (Ludovic Courtès) To: Mark H Weaver <mhw <at> netris.org> Cc: 20102 <at> debbugs.gnu.org Subject: Re: bug#20102: Problem with ld.so RUNPATH on armhf Date: Wed, 08 Apr 2015 20:39:09 +0200
[Message part 1 (text/plain, inline)]
Mark H Weaver <mhw <at> netris.org> skribis: > 13440 execve("/gnu/store/p70wvylq6xdrlxblnk76k3ljgkrmvpnq-ld-wrapper-0/bin/ld", ["/gnu/store/p70wvylq6xdrlxblnk76k3ljgkrmvpnq-ld-wrapper-0/bin/ld", "--eh-frame-hdr", "-shared", "-dynamic-linker", "/gnu/store/fbdjazgwy3zyx8qc5z4ag0j78k2d7raw-glibc-2.21/lib/ld-linux-armhf.so.3", "-X", "-m", "armelf_linux_eabi", "-o", "/tmp/nix-build-glibc-2.21.drv-0/build/elf/ld.so.new", "-L/gnu/store/84bsc47g2052allrmh4ph6xaqvp6f4cm-perl-5.16.1/lib", "-L/gnu/store/lakz7x2m4vqvvfdasn5x95a91rkqqs3c-bzip2-1.0.6/lib", "-L/gnu/store/mrb163wwjc45hgrcjwmb6nxp8fgab3lk-xz-5.0.4/lib", "-L/gnu/store/f1fnh2sp1j32jysdr2nw9z296iba6b5d-file-5.22/lib", "-L/gnu/store/l9ji7gc640j2r8c1c561iwcnqpcd585m-gawk-4.1.1/lib", "-L/gnu/store/w7gjnx5rz64mssxndnryazlwlhflfd2j-binutils-2.25/lib", "-L/gnu/store/fbdjazgwy3zyx8qc5z4ag0j78k2d7raw-glibc-2.21/lib", "-L/gnu/store/psmxs9gcr9l4arz7agmp94vm8fjwninv-glibc-utf8-locales-2.21/lib", "-L/gnu/store/fc8kqk3dazn6mcgcjxd931752b2pf3wj-gcc-4.8.4-lib/lib/gcc/armv7l-unknown-linux-gnueabihf/4.8.4", "-L/gnu/store/fc8kqk3dazn6mcgcjxd931752b2pf3wj-gcc-4.8.4-lib/lib/gcc/armv7l-unknown-linux-gnueabihf/4.8.4/../../..", "-L/gnu/store/fbdjazgwy3zyx8qc5z4ag0j78k2d7raw-glibc-2.21/lib", "-z", "combreloc", "-z", "relro", "--hash-style=both", "-z", "defs", "/tmp/nix-build-glibc-2.21.drv-0/build/elf/librtld.os", "--version-script=/tmp/nix-build-glibc-2.21.drv-0/build/ld.map", "-soname=ld-linux-armhf.so.3", "-defsym=_begin=0"], [/* 55 vars */] <unfinished ...> Indeed, here’s what happens when passing it through ld-wrapper: --8<---------------cut here---------------start------------->8--- $ GUIX_LD_WRAPPER_DEBUG=yes ld "--eh-frame-hdr" "-shared" "-dynamic-linker" "/gnu/store/fbdjazgwy3zyx8qc5z4ag0j78k2d7raw-glibc-2.21/lib/ld-linux-armhf.so.3" "-X" "-m" "armelf_linux_eabi" "-o" "/tmp/nix-build-glibc-2.21.drv-0/build/elf/ld.so.new" "-L/gnu/store/84bsc47g2052allrmh4ph6xaqvp6f4cm-perl-5.16.1/lib" "-L/gnu/store/lakz7x2m4vqvvfdasn5x95a91rkqqs3c-bzip2-1.0.6/lib" "-L/gnu/store/mrb163wwjc45hgrcjwmb6nxp8fgab3lk-xz-5.0.4/lib" "-L/gnu/store/f1fnh2sp1j32jysdr2nw9z296iba6b5d-file-5.22/lib" "-L/gnu/store/l9ji7gc640j2r8c1c561iwcnqpcd585m-gawk-4.1.1/lib" "-L/gnu/store/w7gjnx5rz64mssxndnryazlwlhflfd2j-binutils-2.25/lib" "-L/gnu/store/fbdjazgwy3zyx8qc5z4ag0j78k2d7raw-glibc-2.21/lib" "-L/gnu/store/psmxs9gcr9l4arz7agmp94vm8fjwninv-glibc-utf8-locales-2.21/lib" "-L/gnu/store/fc8kqk3dazn6mcgcjxd931752b2pf3wj-gcc-4.8.4-lib/lib/gcc/armv7l-unknown-linux-gnueabihf/4.8.4" "-L/gnu/store/fc8kqk3dazn6mcgcjxd931752b2pf3wj-gcc-4.8.4-lib/lib/gcc/armv7l-unknown-linux-gnueabihf/4.8.4/../../.." "-L/gnu/store/fbdjazgwy3zyx8qc5z4ag0j78k2d7raw-glibc-2.21/lib" "-z" "combreloc" "-z" "relro" "--hash-style=both" "-z" "defs" "/tmp/nix-build-glibc-2.21.drv-0/build/elf/librtld.os" "--version-script=/tmp/nix-build-glibc-2.21.drv-0/build/ld.map" "-soname=ld-linux-armhf.so.3" "-defsym=_begin=0" ld-wrapper: invoking `/gnu/store/z9d24s2wkri1z0ix5r7qqyp7zy3dklb4-binutils-2.25/bin/ld' with ("--eh-frame-hdr" "-shared" "-dynamic-linker" "/gnu/store/fbdjazgwy3zyx8qc5z4ag0j78k2d7raw-glibc-2.21/lib/ld-linux-armhf.so.3" "-X" "-m" "armelf_linux_eabi" "-o" "/tmp/nix-build-glibc-2.21.drv-0/build/elf/ld.so.new" "-L/gnu/store/84bsc47g2052allrmh4ph6xaqvp6f4cm-perl-5.16.1/lib" "-L/gnu/store/lakz7x2m4vqvvfdasn5x95a91rkqqs3c-bzip2-1.0.6/lib" "-L/gnu/store/mrb163wwjc45hgrcjwmb6nxp8fgab3lk-xz-5.0.4/lib" "-L/gnu/store/f1fnh2sp1j32jysdr2nw9z296iba6b5d-file-5.22/lib" "-L/gnu/store/l9ji7gc640j2r8c1c561iwcnqpcd585m-gawk-4.1.1/lib" "-L/gnu/store/w7gjnx5rz64mssxndnryazlwlhflfd2j-binutils-2.25/lib" "-L/gnu/store/fbdjazgwy3zyx8qc5z4ag0j78k2d7raw-glibc-2.21/lib" "-L/gnu/store/psmxs9gcr9l4arz7agmp94vm8fjwninv-glibc-utf8-locales-2.21/lib" "-L/gnu/store/fc8kqk3dazn6mcgcjxd931752b2pf3wj-gcc-4.8.4-lib/lib/gcc/armv7l-unknown-linux-gnueabihf/4.8.4" "-L/gnu/store/fc8kqk3dazn6mcgcjxd931752b2pf3wj-gcc-4.8.4-lib/lib/gcc/armv7l-unknown-linux-gnueabihf/4.8.4/../../.." "-L/gnu/store/fbdjazgwy3zyx8qc5z4ag0j78k2d7raw-glibc-2.21/lib" "-z" "combreloc" "-z" "relro" "--hash-style=both" "-z" "defs" "/tmp/nix-build-glibc-2.21.drv-0/build/elf/librtld.os" "--version-script=/tmp/nix-build-glibc-2.21.drv-0/build/ld.map" "-soname=ld-linux-armhf.so.3" "-defsym=_begin=0" "-rpath" "/gnu/store/fbdjazgwy3zyx8qc5z4ag0j78k2d7raw-glibc-2.21/lib") ld: unrecognised emulation mode: armelf_linux_eabi --8<---------------cut here---------------end--------------->8--- Conversely, when “replaying” the command that’s used on x86_64, -rpath is not added: --8<---------------cut here---------------start------------->8--- $ GUIX_LD_WRAPPER_DEBUG=yes ld "--eh-frame-hdr" "-m" "elf_x86_64" "-shared" "-o" "/tmp/nix-build-glibc-2.21.drv-0/build/elf/ld.so.new" "-L/gnu/store/xxjla3x9lv9djgszi9g2i7sp3zdh2fhz-perl-5.16.1/lib" "-L/gnu/store/zf0lrd865zxwkx30zmmv2s9pm3cbnyq9-bzip2-1.0.6/lib" "-L/gnu/store/yc75pismby9n46pimi7l9ifjwmj2ybix-xz-5.0.4/lib" "-L/gnu/store/ip9ydlmc7kwb1q472rh8539rkplx8xgl-file-5.22/lib" "-L/gnu/store/vmlwh55kmsjk7mmrw5qi8n71f02l4w0p-gawk-4.1.1/lib" "-L/gnu/store/z9d24s2wkri1z0ix5r7qqyp7zy3dklb4-binutils-2.25/lib" "-L/gnu/store/wiqbxcvzj3r35hd55yxzz919b1dv1hnv-glibc-2.21/lib" "-L/gnu/store/43mpxdd1qwmlsfgnl79jy1zkkx25nz6r-glibc-utf8-locales-2.21/lib" "-L/gnu/store/h132igxl2lkj3sbfcbknn2rd493j7d1l-gcc-4.8.4-lib/lib/gcc/x86_64-unknown-linux-gnu/4.8.4" "-L/gnu/store/h132igxl2lkj3sbfcbknn2rd493j7d1l-gcc-4.8.4-lib/lib/gcc/x86_64-unknown-linux-gnu/4.8.4/../../.." "-L/gnu/store/wiqbxcvzj3r35hd55yxzz919b1dv1hnv-glibc-2.21/lib" "-z" "combreloc" "-z" "relro" "--hash-style=both" "-z" "defs" "/tmp/nix-build-glibc-2.21.drv-0/build/elf/librtld.os" "--version-script=/tmp/nix-build-glibc-2.21.drv-0/build/ld.map" "-soname=ld-linux-x86-64.so.2" "-defsym=_begin=0" ld-wrapper: invoking `/gnu/store/z9d24s2wkri1z0ix5r7qqyp7zy3dklb4-binutils-2.25/bin/ld' with ("--eh-frame-hdr" "-m" "elf_x86_64" "-shared" "-o" "/tmp/nix-build-glibc-2.21.drv-0/build/elf/ld.so.new" "-L/gnu/store/xxjla3x9lv9djgszi9g2i7sp3zdh2fhz-perl-5.16.1/lib" "-L/gnu/store/zf0lrd865zxwkx30zmmv2s9pm3cbnyq9-bzip2-1.0.6/lib" "-L/gnu/store/yc75pismby9n46pimi7l9ifjwmj2ybix-xz-5.0.4/lib" "-L/gnu/store/ip9ydlmc7kwb1q472rh8539rkplx8xgl-file-5.22/lib" "-L/gnu/store/vmlwh55kmsjk7mmrw5qi8n71f02l4w0p-gawk-4.1.1/lib" "-L/gnu/store/z9d24s2wkri1z0ix5r7qqyp7zy3dklb4-binutils-2.25/lib" "-L/gnu/store/wiqbxcvzj3r35hd55yxzz919b1dv1hnv-glibc-2.21/lib" "-L/gnu/store/43mpxdd1qwmlsfgnl79jy1zkkx25nz6r-glibc-utf8-locales-2.21/lib" "-L/gnu/store/h132igxl2lkj3sbfcbknn2rd493j7d1l-gcc-4.8.4-lib/lib/gcc/x86_64-unknown-linux-gnu/4.8.4" "-L/gnu/store/h132igxl2lkj3sbfcbknn2rd493j7d1l-gcc-4.8.4-lib/lib/gcc/x86_64-unknown-linux-gnu/4.8.4/../../.." "-L/gnu/store/wiqbxcvzj3r35hd55yxzz919b1dv1hnv-glibc-2.21/lib" "-z" "combreloc" "-z" "relro" "--hash-style=both" "-z" "defs" "/tmp/nix-build-glibc-2.21.drv-0/build/elf/librtld.os" "--version-script=/tmp/nix-build-glibc-2.21.drv-0/build/ld.map" "-soname=ld-linux-x86-64.so.2" "-defsym=_begin=0") --8<---------------cut here---------------end--------------->8--- With a bit of additional debug, I can print the value of ‘libs’ in the ‘ld-wrapper’ procedure: --8<---------------cut here---------------start------------->8--- ;;; (libs ("/gnu/store/fbdjazgwy3zyx8qc5z4ag0j78k2d7raw-glibc-2.21/lib/ld-linux-armhf.so.3")) --8<---------------cut here---------------end--------------->8--- 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:
[Message part 2 (text/x-patch, inline)]
--- 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
[Message part 3 (text/plain, inline)]
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? There are ways we could have worked around it, for instance by adding: (setenv "GUIX_LD_WRAPPER_DISABLE_RPATH" "yes") in the glibc recipe. But I think it’s better to understand what’s going on. Thanks, Ludo’.
bug-guix <at> gnu.org
:bug#20102
; Package guix
.
(Wed, 08 Apr 2015 22:34:01 GMT) Full text and rfc822 format available.Message #38 received at 20102 <at> debbugs.gnu.org (full text, mbox):
From: ludo <at> gnu.org (Ludovic Courtès) To: Mark H Weaver <mhw <at> netris.org> Cc: 20102 <at> debbugs.gnu.org Subject: Re: bug#20102: Problem with ld.so RUNPATH on armhf Date: Thu, 09 Apr 2015 00:33:14 +0200
[Message part 1 (text/plain, inline)]
ludo <at> gnu.org (Ludovic Courtès) skribis: > 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? > > > There are ways we could have worked around it, for instance by adding: > > (setenv "GUIX_LD_WRAPPER_DISABLE_RPATH" "yes") > > in the glibc recipe. I’m forgetting another possibility: fix ld-wrapper so that it doesn’t add “-rpath $(dirname ld.so)” when it encounters “-dynamic-linker ld.so”. This patch does that:
[Message part 2 (text/x-patch, inline)]
diff --git a/gnu/packages/ld-wrapper.in b/gnu/packages/ld-wrapper.in index 094018d..125edee 100644 --- a/gnu/packages/ld-wrapper.in +++ b/gnu/packages/ld-wrapper.in @@ -142,34 +142,45 @@ exec @GUILE@ -c "(load-compiled \"@SELF@.go\") (apply $main (cdr (command-line)) (define (library-files-linked args) ;; Return the file names of shared libraries explicitly linked against via ;; `-l' or with an absolute file name in ARGS. - (define path+files + (define path+files+args (fold (lambda (argument result) (match result - ((library-path . library-files) + ((library-path library-files ("-dynamic-linker" . rest)) + ;; When passed '-dynamic-linker ld.so', ignore 'ld.so'. + ;; See <http://bugs.gnu.org/20102>. + (list library-path + library-files + (cons* argument "-dynamic-linker" rest))) + ((library-path library-files previous-args) (cond ((string-prefix? "-L" argument) ;augment the search path - (cons (append library-path + (list (append library-path (list (string-drop argument 2))) - library-files)) + library-files + (cons argument previous-args))) ((string-prefix? "-l" argument) ;add library (let* ((lib (string-append "lib" (string-drop argument 2) ".so")) (full (search-path library-path lib))) + (list library-path (if full - (cons library-path - (cons full library-files)) - result))) + (cons full library-files) + library-files) + (cons argument previous-args)))) ((and (string-prefix? %store-directory argument) (shared-library? argument)) ;add library - (cons library-path - (cons argument library-files))) + (list library-path + (cons argument library-files) + (cons argument previous-args))) (else - result))))) - (cons '() '()) + (list library-path + library-files + (cons argument previous-args))))))) + (list '() '() '()) args)) - (match path+files - ((path . files) + (match path+files+args + ((path files arguments) (reverse files)))) (define (rpath-arguments library-files) @@ -202,6 +213,8 @@ impure library ~s~%" (args (append args (rpath-arguments libs)))) (when %debug? (format (current-error-port) + "ld-wrapper: libraries linked: ~s~%" libs) + (format (current-error-port) "ld-wrapper: invoking `~a' with ~s~%" %real-ld args)) (apply execl %real-ld (basename %real-ld) args)))
[Message part 3 (text/plain, inline)]
Could you check whether it solves the problem? (Tested on x86_64, no regressions AFAICS.) Ludo’.
bug-guix <at> gnu.org
:bug#20102
; Package guix
.
(Thu, 09 Apr 2015 06:05:02 GMT) Full text and rfc822 format available.Message #41 received at 20102 <at> debbugs.gnu.org (full text, mbox):
From: Mark H Weaver <mhw <at> netris.org> To: ludo <at> gnu.org (Ludovic Courtès) Cc: 20102 <at> debbugs.gnu.org Subject: Re: 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
ludo <at> gnu.org (Ludovic Courtès)
:Mark H Weaver <mhw <at> netris.org>
:Message #46 received at 20102-done <at> debbugs.gnu.org (full text, mbox):
From: ludo <at> gnu.org (Ludovic Courtès) To: Mark H Weaver <mhw <at> netris.org> Cc: 20102-done <at> debbugs.gnu.org Subject: Re: bug#20102: Problem with ld.so RUNPATH on armhf Date: Thu, 09 Apr 2015 08:57:39 +0200
Mark H Weaver <mhw <at> netris.org> skribis: > 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. Cool, thanks! (There’s a small typo in the comment in the patch: it should be “Don’t pass -dynamic-linker when shared.”) I will push the ld-wrapper fix in the next core-updates cycle then. Ludo’.
bug-guix <at> gnu.org
:bug#20102
; Package guix
.
(Thu, 09 Apr 2015 08:19:02 GMT) Full text and rfc822 format available.Message #49 received at 20102 <at> debbugs.gnu.org (full text, mbox):
From: ludo <at> gnu.org (Ludovic Courtès) To: Mark H Weaver <mhw <at> netris.org> Cc: 20102 <at> debbugs.gnu.org Subject: Re: bug#20102: Problem with ld.so RUNPATH on armhf Date: Thu, 09 Apr 2015 10:18:00 +0200
Mark H Weaver <mhw <at> netris.org> skribis: > 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’ve reported the problem at <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65711>. Ludo’.
Debbugs Internal Request <help-debbugs <at> gnu.org>
to internal_control <at> debbugs.gnu.org
.
(Thu, 07 May 2015 11:24:05 GMT) Full text and rfc822 format available.Mark H Weaver <mhw <at> netris.org>
to control <at> debbugs.gnu.org
.
(Sat, 13 Jun 2015 15:10:02 GMT) Full text and rfc822 format available.Debbugs Internal Request <help-debbugs <at> gnu.org>
to internal_control <at> debbugs.gnu.org
.
(Sat, 13 Jun 2015 15:10:02 GMT) Full text and rfc822 format available.bug-guix <at> gnu.org
:bug#20102
; Package guix
.
(Sat, 13 Jun 2015 15:13:02 GMT) Full text and rfc822 format available.Message #58 received at 20102 <at> debbugs.gnu.org (full text, mbox):
From: Mark H Weaver <mhw <at> netris.org> To: 20102 <at> debbugs.gnu.org Subject: Re: bug#20102: Problem with ld.so RUNPATH on armhf Date: Sat, 13 Jun 2015 11:12:45 -0400
In March 2015, Mark H Weaver <mhw <at> netris.org> wrote: > I recently tried rebuilding Guix on armhf, specifically master since the > recent core-updates merge, and have run into a snag. I'm able to build > a lot of stuff, including our full 'emacs' package (with Gtk+), but I'm > unable to build 'glibc-utf8-locales', which means I can't build any > profiles at all, because the ca-certificates-bundle uses > glibc-utf8-locales. > > Here's what happens when I try to build 'glibc-utf8-locales' manually: > > mhw <at> novena:~$ guix build -K glibc-utf8-locales > The following derivation will be built: > /gnu/store/14kf28i9qkzrdjn5m150zk6dxijssk2k-glibc-utf8-locales-2.21.drv > warning: failed to install locale: Invalid argument > @ build-started /gnu/store/14kf28i9qkzrdjn5m150zk6dxijssk2k-glibc-utf8-locales-2.21.drv - armhf-linux /var/log/guix/drvs/14//kf28i9qkzrdjn5m150zk6dxijssk2k-glibc-utf8-locales-2.21.drv.bz2 > Inconsistency detected by ld.so: get-dynamic-info.h: 142: elf_get_dynamic_info: Assertion `info[29] == ((void *)0)' failed! > note: keeping build directory `/tmp/nix-build-glibc-utf8-locales-2.21.drv-0' > builder for `/gnu/store/14kf28i9qkzrdjn5m150zk6dxijssk2k-glibc-utf8-locales-2.21.drv' failed with exit code 1 > @ build-failed /gnu/store/14kf28i9qkzrdjn5m150zk6dxijssk2k-glibc-utf8-locales-2.21.drv - 1 builder for `/gnu/store/14kf28i9qkzrdjn5m150zk6dxijssk2k-glibc-utf8-locales-2.21.drv' failed with exit code 1 > killing process 1498 > guix build: error: build failed: build of `/gnu/store/14kf28i9qkzrdjn5m150zk6dxijssk2k-glibc-utf8-locales-2.21.drv' failed > > The key line being: > > Inconsistency detected by ld.so: get-dynamic-info.h: 142: elf_get_dynamic_info: Assertion `info[29] == ((void *)0)' failed! The same problem has resurfaced on armhf on the current core-updates branch. More precisely, this is a merge of core-updates (16cae79), master (1e44cf8), and openssl-update (0515580). There's one difference: I can successfully run "guix build -K glibc-utf8-locales", but if I try to build any profile, it fails while building another package named "glibc-utf8-locales", with precisely the same error message above. Otherwise, I managed to build every package in my profile, which includes some substantial software. I'm surprised because I thought we already fixed this in two redundant ways: by improving 'ld-wrapper' to avoid adding an '-rpath' for ld.so, and by patching gcc. I would have expected at least one of those fixes to take care of this. Should I open a new ticket for this, or should we reuse this ticket? For now, I unarchived and reopened this bug. Thanks, Mark
bug-guix <at> gnu.org
:bug#20102
; Package guix
.
(Sat, 13 Jun 2015 23:37:02 GMT) Full text and rfc822 format available.Message #61 received at 20102 <at> debbugs.gnu.org (full text, mbox):
From: ludo <at> gnu.org (Ludovic Courtès) To: Mark H Weaver <mhw <at> netris.org> Cc: 20102 <at> debbugs.gnu.org Subject: Re: bug#20102: Problem with ld.so RUNPATH on armhf Date: Sun, 14 Jun 2015 01:36:00 +0200
[Message part 1 (text/plain, inline)]
Mark H Weaver <mhw <at> netris.org> skribis: > In March 2015, Mark H Weaver <mhw <at> netris.org> wrote: [...] >> Inconsistency detected by ld.so: get-dynamic-info.h: 142: elf_get_dynamic_info: Assertion `info[29] == ((void *)0)' failed! > > The same problem has resurfaced on armhf on the current core-updates > branch. More precisely, this is a merge of core-updates (16cae79), > master (1e44cf8), and openssl-update (0515580). > > There's one difference: I can successfully run "guix build -K > glibc-utf8-locales", but if I try to build any profile, it fails while > building another package named "glibc-utf8-locales", with precisely the > same error message above. Otherwise, I managed to build every package > in my profile, which includes some substantial software. It happens on x86_64 as well. Namely, the glibc that is built with glibc-final and gcc-final has extra RUNPATH entries: --8<---------------cut here---------------start------------->8--- $ ./pre-inst-env guix build -e '(@ (gnu packages base) glibc)' -K [...] /gnu/store/pxi61vv6qj325y3zs5qpcy2shykgxdar-glibc-2.21 /gnu/store/m3qidd4gx7ry3wxagsrd9cwlykq90yi7-glibc-2.21-debug $ /gnu/store/pxi61vv6qj325y3zs5qpcy2shykgxdar-glibc-2.21/bin/gencat Inconsistency detected by ld.so: get-dynamic-info.h: 142: elf_get_dynamic_info: Assertion `info[29] == ((void *)0)' failed! $ objdump -x /gnu/store/pxi61vv6qj325y3zs5qpcy2shykgxdar-glibc-2.21/bin/gencat |grep PATH RUNPATH /gnu/store/2bq2qaaajar2f3dbxrrwssxfrfi0k9zr-gcc-4.9.2/libexec/gcc/x86_64-unknown-linux-gnu/4.9.2 --8<---------------cut here---------------end--------------->8--- After a bit of investigation, I found that the problem came from: -plugin /gnu/store/2bq2qaaajar2f3dbxrrwssxfrfi0k9zr-gcc-4.9.2/libexec/gcc/x86_64-unknown-linux-gnu/4.9.2/liblto_plugin.so.0 which led ld-wrapper to add a -rpath flag for that directory. I’m testing the patch below and will commit tomorrow if everything goes well. Thanks, Ludo’.
[Message part 2 (text/x-patch, inline)]
--- a/gnu/packages/ld-wrapper.in +++ b/gnu/packages/ld-wrapper.in @@ -143,12 +143,16 @@ exec @GUILE@ -c "(load-compiled \"@SELF@.go\") (apply $main (cdr (command-line)) (define path+files+args (fold (lambda (argument result) (match result - ((library-path library-files ("-dynamic-linker" . rest)) - ;; When passed '-dynamic-linker ld.so', ignore 'ld.so'. - ;; See <http://bugs.gnu.org/20102>. + ((library-path library-files + ((and flag + (or "-dynamic-linker" "-plugin")) + . rest)) + ;; When passed '-dynamic-linker ld.so', ignore 'ld.so'; when + ;; passed '-plugin liblto_plugin.so', ignore + ;; 'liblto_plugin.so'. See <http://bugs.gnu.org/20102>. (list library-path library-files - (cons* argument "-dynamic-linker" rest))) + (cons* argument flag rest))) ((library-path library-files previous-args) (cond ((string-prefix? "-L" argument) ;augment the search path (list (append library-path
ludo <at> gnu.org (Ludovic Courtès)
:Mark H Weaver <mhw <at> netris.org>
:Message #66 received at 20102-done <at> debbugs.gnu.org (full text, mbox):
From: ludo <at> gnu.org (Ludovic Courtès) To: Mark H Weaver <mhw <at> netris.org> Cc: 20102-done <at> debbugs.gnu.org Subject: Re: bug#20102: Problem with ld.so RUNPATH on armhf Date: Tue, 14 Jul 2015 15:32:36 +0200
ludo <at> gnu.org (Ludovic Courtès) skribis: > It happens on x86_64 as well. Namely, the glibc that is built with > glibc-final and gcc-final has extra RUNPATH entries: > > $ ./pre-inst-env guix build -e '(@ (gnu packages base) glibc)' -K > [...] > /gnu/store/pxi61vv6qj325y3zs5qpcy2shykgxdar-glibc-2.21 > /gnu/store/m3qidd4gx7ry3wxagsrd9cwlykq90yi7-glibc-2.21-debug > $ /gnu/store/pxi61vv6qj325y3zs5qpcy2shykgxdar-glibc-2.21/bin/gencat > Inconsistency detected by ld.so: get-dynamic-info.h: 142: elf_get_dynamic_info: Assertion `info[29] == ((void *)0)' failed! > $ objdump -x /gnu/store/pxi61vv6qj325y3zs5qpcy2shykgxdar-glibc-2.21/bin/gencat |grep PATH > RUNPATH /gnu/store/2bq2qaaajar2f3dbxrrwssxfrfi0k9zr-gcc-4.9.2/libexec/gcc/x86_64-unknown-linux-gnu/4.9.2 > > After a bit of investigation, I found that the problem came from: > > -plugin /gnu/store/2bq2qaaajar2f3dbxrrwssxfrfi0k9zr-gcc-4.9.2/libexec/gcc/x86_64-unknown-linux-gnu/4.9.2/liblto_plugin.so.0 > > which led ld-wrapper to add a -rpath flag for that directory. > > I’m testing the patch below and will commit tomorrow if everything goes > well. The patch was applied as b5616bc a while back, so I’m closing this bug. Ludo’.
Debbugs Internal Request <help-debbugs <at> gnu.org>
to internal_control <at> debbugs.gnu.org
.
(Wed, 12 Aug 2015 11:24:04 GMT) Full text and rfc822 format available.
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.