unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
* bug#20102: Problem with ld.so RUNPATH on armhf
@ 2015-03-13 18:56 Mark H Weaver
  2015-04-04 21:58 ` Ludovic Courtès
  2015-06-13 15:12 ` Mark H Weaver
  0 siblings, 2 replies; 18+ messages in thread
From: Mark H Weaver @ 2015-03-13 18:56 UTC (permalink / raw)
  To: 20102

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@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@novena:/gnu/store/l2bkyclkm0lph48mfs6jbndj9p0y41g8-glibc-2.21/bin$ ./bash 
I have no name!@novena:/gnu/store/l2bkyclkm0lph48mfs6jbndj9p0y41g8-glibc-2.21/bin$ exit
mhw@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

^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2015-07-14 13:33 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-13 18:56 bug#20102: Problem with ld.so RUNPATH on armhf Mark H Weaver
2015-04-04 21:58 ` Ludovic Courtès
2015-04-05  4:42   ` Mark H Weaver
2015-04-06 20:24     ` Ludovic Courtès
2015-04-06 21:02       ` Mark H Weaver
2015-04-08  9:52         ` Ludovic Courtès
2015-04-08 15:21           ` Mark H Weaver
2015-04-08 15:26             ` Mark H Weaver
2015-04-08 15:48               ` Ludovic Courtès
2015-04-08 15:50             ` Mark H Weaver
2015-04-08 18:39             ` Ludovic Courtès
2015-04-08 22:33               ` Ludovic Courtès
2015-04-09  6:04               ` Mark H Weaver
2015-04-09  6:57                 ` Ludovic Courtès
2015-04-09  8:18                 ` Ludovic Courtès
2015-06-13 15:12 ` Mark H Weaver
2015-06-13 23:36   ` Ludovic Courtès
2015-07-14 13:32     ` Ludovic Courtès

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).