From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) Subject: bug#32894: Exception in validate-runpath phase Date: Tue, 02 Oct 2018 14:31:10 +0200 Message-ID: <877ej0o7ht.fsf@gnu.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:40517) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g7Jrz-000150-NE for bug-guix@gnu.org; Tue, 02 Oct 2018 08:33:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g7JqO-0008RP-0s for bug-guix@gnu.org; Tue, 02 Oct 2018 08:32:07 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:57871) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1g7JqN-0008RK-T7 for bug-guix@gnu.org; Tue, 02 Oct 2018 08:32:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1g7JqN-0004dH-Om for bug-guix@gnu.org; Tue, 02 Oct 2018 08:32:03 -0400 Sender: "Debbugs-submit" Resent-Message-ID: In-Reply-To: (Julien Lepiller's message of "Mon, 01 Oct 2018 14:53:51 +0200") List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: "bug-Guix" To: Julien Lepiller Cc: 32894@debbugs.gnu.org Hello Julien, Julien Lepiller skribis: > Then, running: > > (elf-dynamic-info (call-with-input-file "libjsoundalsa.debuginfo" > (compose parse-elf get-bytevector-all))) > $79 =3D #< soname: #f needed: () rpath: () runpath: ()> > > (elf-dynamic-info (call-with-input-file "libjsound.debuginfo" (compose > parse-elf get-bytevector-all))) > $80 =3D #< soname: #f needed: (1) rpath: () runpath: ()> > > (elf-dynamic-info (call-with-input-file "libawt_xawt.debuginfo" > (compose parse-elf get-bytevector-all))) > $81 =3D #< 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=E2=80= =99s 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 P= ATH 0x000000000000001d (RUNPATH) Library runpath: [/gnu/store/xmdk5= z05kqxpwgagxhlv375x3f82dxb3-libxcb-1.13/lib:/gnu/store/bid7hvpnm8nq04vm4dsz= ywxsw9g2kmf2-libx11-1.6.6/lib:/gnu/store/b9aapwjz2nhri24imzy491fx86ng8jvz-l= ibxau-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/8w2i20d3g= h80x0a7hvbkww8yyn5ky2j8-wayland-1.15.0/lib:/gnu/store/hp2j1cjrca3ghi14ikzha= nx8yl41kihp-mesa-18.1.5/lib:/gnu/store/ppsylkcpw2fk2lkzhwjd60xyr9gjl70v-lib= ffi-3.2.1/lib:/gnu/store/70825hjil6070g7cs3mmdnfwmhxgga36-expat-2.2.5/lib:/= gnu/store/66h0jfk3k4wavw951ydkzv4x3wwgapkm-libdrm-2.4.92/lib:/gnu/store/l4l= r0f5cjd0nbsaaf8b5dmcw1a1yypr3-glibc-2.27/lib:/gnu/store/vla5j7pbkpcp39lsdfs= mz7m9azn48lr4-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 =E2=80=9C.debuginfo=E2=80=9D files so perhaps they ar= e the result of home-made ELF stripping (we don=E2=80=99t have this problem with =E2=80= =9C.debug=E2=80=9D files created with objcopy & co.). I can see two short-term =E2=80=9Csolutions=E2=80=9D: 1. Remove those .debuginfo files prior to the =E2=80=98validate-runpath= =E2=80=99 phase. 2. Set #:validate-runpath? #f. Could you check in your build logs how those .debuginfo files are produced? HTH! Ludo=E2=80=99.