all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Mark H Weaver <mhw@netris.org>
To: 20102@debbugs.gnu.org
Subject: bug#20102: Problem with ld.so RUNPATH on armhf
Date: Fri, 13 Mar 2015 14:56:46 -0400	[thread overview]
Message-ID: <87y4n0ybdd.fsf@netris.org> (raw)

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

             reply	other threads:[~2015-03-13 18:57 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-13 18:56 Mark H Weaver [this message]
2015-04-04 21:58 ` bug#20102: Problem with ld.so RUNPATH on armhf 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87y4n0ybdd.fsf@netris.org \
    --to=mhw@netris.org \
    --cc=20102@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.