From: ludo@gnu.org (Ludovic Courtès)
To: Julien Lepiller <julien@lepiller.eu>
Cc: 32894@debbugs.gnu.org
Subject: bug#32894: Exception in validate-runpath phase
Date: Tue, 02 Oct 2018 14:31:10 +0200 [thread overview]
Message-ID: <877ej0o7ht.fsf@gnu.org> (raw)
In-Reply-To: <a1e911c6609a5d0e811a3be41e2fa112@lepiller.eu> (Julien Lepiller's message of "Mon, 01 Oct 2018 14:53:51 +0200")
Hello Julien,
Julien Lepiller <julien@lepiller.eu> skribis:
> Then, running:
>
> (elf-dynamic-info (call-with-input-file "libjsoundalsa.debuginfo"
> (compose parse-elf get-bytevector-all)))
> $79 = #<<elf-dynamic-info> soname: #f needed: () rpath: () runpath: ()>
>
> (elf-dynamic-info (call-with-input-file "libjsound.debuginfo" (compose
> parse-elf get-bytevector-all)))
> $80 = #<<elf-dynamic-info> soname: #f needed: (1) rpath: () runpath: ()>
>
> (elf-dynamic-info (call-with-input-file "libawt_xawt.debuginfo"
> (compose parse-elf get-bytevector-all)))
> $81 = #<<elf-dynamic-info> soname: #f needed: (3659183287175258)
> rpath: () runpath: ()>
The reason we get numbers here (rather than strings) is because the
PT_DYNAMIC segment lacks a string table (DT_STRTAB), and thus there’s
nowhere the DT_NEEDED strings can be looked for, AIUI.
That gremlin.scm lets the number through comes from this bit:
(if string-table-offset
(pointer->string
(bytevector->pointer (elf-bytes elf)
(vma->offset
elf
(+ string-table-offset value))))
value))
This is a questionable choice, but the crux of the problem is that these
ELF files appear to be corrupt or at least non-conventional.
Even BFD (from Binutils) fails to make sense of it:
--8<---------------cut here---------------start------------->8---
$ readelf -a /tmp/libawt_xawt.debuginfo | grep NEED
$ readelf -a /tmp/libawt_xawt.debuginfo | grep PATH
--8<---------------cut here---------------end--------------->8---
Compare with this (random example):
--8<---------------cut here---------------start------------->8---
$ readelf -a ~/.guix-profile/lib/libEGL.so.1 | grep NEED
[ 6] .gnu.version_r VERNEED 0000000000004718 00004718
0x0000000000000001 (NEEDED) Shared library: [libxcb-dri2.so.0]
0x0000000000000001 (NEEDED) Shared library: [libX11-xcb.so.1]
0x0000000000000001 (NEEDED) Shared library: [libX11.so.6]
0x0000000000000001 (NEEDED) Shared library: [libxcb-dri3.so.0]
0x0000000000000001 (NEEDED) Shared library: [libxcb-xfixes.so.0]
0x0000000000000001 (NEEDED) Shared library: [libxcb-present.so.0]
0x0000000000000001 (NEEDED) Shared library: [libxcb-sync.so.1]
0x0000000000000001 (NEEDED) Shared library: [libxcb.so.1]
0x0000000000000001 (NEEDED) Shared library: [libXau.so.6]
0x0000000000000001 (NEEDED) Shared library: [libXdmcp.so.6]
0x0000000000000001 (NEEDED) Shared library: [libbsd.so.0]
0x0000000000000001 (NEEDED) Shared library: [libxshmfence.so.1]
0x0000000000000001 (NEEDED) Shared library: [libwayland-client.so.0]
0x0000000000000001 (NEEDED) Shared library: [libgbm.so.1]
0x0000000000000001 (NEEDED) Shared library: [libz.so.1]
0x0000000000000001 (NEEDED) Shared library: [libwayland-server.so.0]
0x0000000000000001 (NEEDED) Shared library: [libffi.so.6]
0x0000000000000001 (NEEDED) Shared library: [librt.so.1]
0x0000000000000001 (NEEDED) Shared library: [libexpat.so.1]
0x0000000000000001 (NEEDED) Shared library: [libdl.so.2]
0x0000000000000001 (NEEDED) Shared library: [libdrm.so.2]
0x0000000000000001 (NEEDED) Shared library: [libm.so.6]
0x0000000000000001 (NEEDED) Shared library: [libglapi.so.0]
0x0000000000000001 (NEEDED) Shared library: [libpthread.so.0]
0x0000000000000001 (NEEDED) Shared library: [libgcc_s.so.1]
0x0000000000000001 (NEEDED) Shared library: [libc.so.6]
0x000000006ffffffe (VERNEED) 0x4718
0x000000006fffffff (VERNEEDNUM) 5
ludo@ribbon ~/src/guix$ readelf -a ~/.guix-profile/lib/libEGL.so.1 | grep PATH
0x000000000000001d (RUNPATH) Library runpath: [/gnu/store/xmdk5z05kqxpwgagxhlv375x3f82dxb3-libxcb-1.13/lib:/gnu/store/bid7hvpnm8nq04vm4dszywxsw9g2kmf2-libx11-1.6.6/lib:/gnu/store/b9aapwjz2nhri24imzy491fx86ng8jvz-libxau-1.0.8/lib:/gnu/store/07gpi7dx2rjs5v5n12q5b2sk7gxsliih-libxdmcp-1.1.2/lib:/gnu/store/cy16rapipmypb7qj49ncphjkkj9nqkzx-libbsd-0.8.7/lib:/gnu/store/ycj27z17m3n5qj1rwnyxdqkrk7li9712-libxshmfence-1.3/lib:/gnu/store/8w2i20d3gh80x0a7hvbkww8yyn5ky2j8-wayland-1.15.0/lib:/gnu/store/hp2j1cjrca3ghi14ikzhanx8yl41kihp-mesa-18.1.5/lib:/gnu/store/ppsylkcpw2fk2lkzhwjd60xyr9gjl70v-libffi-3.2.1/lib:/gnu/store/70825hjil6070g7cs3mmdnfwmhxgga36-expat-2.2.5/lib:/gnu/store/66h0jfk3k4wavw951ydkzv4x3wwgapkm-libdrm-2.4.92/lib:/gnu/store/l4lr0f5cjd0nbsaaf8b5dmcw1a1yypr3-glibc-2.27/lib:/gnu/store/vla5j7pbkpcp39lsdfsmz7m9azn48lr4-gcc-5.5.0-lib/lib:/gnu/store/fxiwj2wpp11sif613axdax7gmwzsg6kp-zlib-1.2.11/lib:/gnu/store/vla5j7pbkpcp39lsdfsmz7m9azn48lr4-gcc-5.5.0-lib/lib/gcc/x86_64-unknown-linux-gnu/5.5.0/../../..]
--8<---------------cut here---------------end--------------->8---
Then again, these are “.debuginfo” files so perhaps they are the result
of home-made ELF stripping (we don’t have this problem with “.debug”
files created with objcopy & co.).
I can see two short-term “solutions”:
1. Remove those .debuginfo files prior to the ‘validate-runpath’
phase.
2. Set #:validate-runpath? #f.
Could you check in your build logs how those .debuginfo files are produced?
HTH!
Ludo’.
next prev parent reply other threads:[~2018-10-02 12:33 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-01 12:53 bug#32894: Exception in validate-runpath phase Julien Lepiller
2018-10-02 12:31 ` Ludovic Courtès [this message]
2018-10-03 8:14 ` Julien Lepiller
2018-10-08 12:21 ` Ludovic Courtès
2021-11-19 14:51 ` Julien Lepiller
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
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=877ej0o7ht.fsf@gnu.org \
--to=ludo@gnu.org \
--cc=32894@debbugs.gnu.org \
--cc=julien@lepiller.eu \
/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 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).