From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julien Lepiller Subject: bug#32894: Exception in validate-runpath phase Date: Mon, 01 Oct 2018 14:53:51 +0200 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:49704) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g6xj8-0003Ki-Hl for bug-guix@gnu.org; Mon, 01 Oct 2018 08:55:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g6xj4-0006nY-Bk for bug-guix@gnu.org; Mon, 01 Oct 2018 08:55:06 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:56586) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1g6xj4-0006nJ-6U for bug-guix@gnu.org; Mon, 01 Oct 2018 08:55:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1g6xj4-0007LJ-4Q for bug-guix@gnu.org; Mon, 01 Oct 2018 08:55:02 -0400 Sender: "Debbugs-submit" Resent-Message-ID: Received: from eggs.gnu.org ([2001:4830:134:3::10]:49389) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g6xi6-0002uC-8r for bug-guix@gnu.org; Mon, 01 Oct 2018 08:54:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g6xi0-0006Jp-HE for bug-guix@gnu.org; Mon, 01 Oct 2018 08:54:01 -0400 Received: from lepiller.eu ([2a00:5884:8208::1]:45380) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1g6xhz-0006JG-Dy for bug-guix@gnu.org; Mon, 01 Oct 2018 08:53:56 -0400 Received: from webmail.lepiller.eu (static-176-182-42-79.ncc.abo.bbox.fr [176.182.42.79]) by lepiller.eu (OpenSMTPD) with ESMTPSA id 1cac9551 (TLSv1.2:ECDHE-RSA-CHACHA20-POLY1305:256:NO) for ; Mon, 1 Oct 2018 12:55:41 +0000 (UTC) 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: 32894@debbugs.gnu.org Hi, I'm trying to create a new package for openjdk versions we don't have yet. While building openjdk 10 on top of core-updates (because gcc on master has a bug that prevents building openjdk 9 and 10), I get a stacktrace at the end of the validate-runpath phase: starting phase `validate-runpath' validating RUNPATH of 74 binaries in "/gnu/store/bdgbs6nsb1kzxpqmcxajjkvvkmk5kn72-openjdk-10+46/lib"... Backtrace: 11 (primitive-load "/gnu/store/cyxf063m59nb288xnpy94gr4chq…") In ice-9/eval.scm: 191:35 10 (_ _) In srfi/srfi-1.scm: 863:16 9 (every1 # …) In /gnu/store/p9wwyq2jfq2piwyc01qgsxm3hsxg2bnv-module-import/guix/build/gnu-build-system.scm: 799:28 8 (_ _) 557:16 7 (validate-runpath #:validate-runpath? _ # _ #:outputs _) In /gnu/store/p9wwyq2jfq2piwyc01qgsxm3hsxg2bnv-module-import/guix/build/utils.scm: 536:23 6 (every* # _) 536:23 5 (every* # …) In ice-9/boot-9.scm: 829:9 4 (catch srfi-34 # …) In /gnu/store/p9wwyq2jfq2piwyc01qgsxm3hsxg2bnv-module-import/guix/build/gremlin.scm: 305:26 3 (_) In unknown file: 2 (remove # (#)) 1 (find # …) 0 (string-prefix? "libanl.so" 3659183287175258 # …) ERROR: In procedure string-prefix?: In procedure string-prefix?: Wrong type argument in position 2 (expecting string): 3659183287175258 I tried to investigate the issue and I have found that that running (validate-needed-in-runpath "/gnu/...") sometimes fails on some files. More specifically, it always succeeds on *.so files and on most *.debuginfo files, but it fails on these files: /gnu/store/bdgbs6nsb1kzxpqmcxajjkvvkmk5kn72-openjdk-10+46/lib/libjsound.debuginfo /gnu/store/bdgbs6nsb1kzxpqmcxajjkvvkmk5kn72-openjdk-10+46/lib/libjimage.debuginfo /gnu/store/bdgbs6nsb1kzxpqmcxajjkvvkmk5kn72-openjdk-10+46/lib/libjaas_unix.debuginfo /gnu/store/bdgbs6nsb1kzxpqmcxajjkvvkmk5kn72-openjdk-10+46/lib/libawt_xawt.debuginfo with the following backtrace: scheme@(guix build gremlin)> (validate-needed-in-runpath "/gnu/store/bdgbs6nsb1kzxpqmcxajjkvvkmk5kn72-openjdk-10+46/lib/libjsound.debuginfo") ERROR: In procedure string-prefix?: In procedure string-prefix?: Wrong type argument in position 2 (expecting string): 1 Entering a new prompt. Type `,bt' for a backtrace or `,q' to continue. scheme@(guix build gremlin) [1]> ,bt In ice-9/boot-9.scm: 829:9 4 (catch srfi-34 # # _) In guix/build/gremlin.scm: 305:26 3 (_) In unknown file: 2 (remove # (1)) 1 (find # ("libanl.so" "libcrypt.so" "libc.so" "libdl.so" "libm.so" "libnsl.so" "libp?" ?)) 0 (string-prefix? "libanl.so" 1 # # # #) Similarly for libawt_xawt, with the following error message: In procedure string-prefix?: Wrong type argument in position 2 (expecting string): 3659183287175258 Then, running: (elf-dynamic-info (call-with-input-file "libjsoundalsa.debuginfo" (compose parse-elf get-bytevector-all))) $79 = #< soname: #f needed: () rpath: () runpath: ()> (elf-dynamic-info (call-with-input-file "libjsound.debuginfo" (compose parse-elf get-bytevector-all))) $80 = #< soname: #f needed: (1) rpath: () runpath: ()> (elf-dynamic-info (call-with-input-file "libawt_xawt.debuginfo" (compose parse-elf get-bytevector-all))) $81 = #< soname: #f needed: (3659183287175258) rpath: () runpath: ()> shows that the number in the exception comes from the needed field. I think it should be empty. You can find these three files for comparison at: http://89.234.186.109/guix/libawt_xawt.debuginfo http://89.234.186.109/guix/libjsoundalsa.debuginfo http://89.234.186.109/guix/libjsound.debuginfo Thank you.