From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ivan Vilata i Balaguer Subject: bug#38055: patchelf: Assertion failed when setting interpreter Date: Sun, 3 Nov 2019 23:56:14 -0500 Message-ID: <20191104045614.GI17621@sax.terramar.selidor.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:37953) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iRURH-0007cT-P3 for bug-guix@gnu.org; Sun, 03 Nov 2019 23:58:04 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iRURG-0000qN-B0 for bug-guix@gnu.org; Sun, 03 Nov 2019 23:58:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:55145) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iRURG-0000qE-2s for bug-guix@gnu.org; Sun, 03 Nov 2019 23:58:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iRURG-0001UL-0Z for bug-guix@gnu.org; Sun, 03 Nov 2019 23:58:02 -0500 Sender: "Debbugs-submit" Resent-Message-ID: Received: from eggs.gnu.org ([2001:470:142:3::10]:37838) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iRUQS-0007OH-Tl for bug-guix@gnu.org; Sun, 03 Nov 2019 23:57:13 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iRUQR-0000d3-Im for bug-guix@gnu.org; Sun, 03 Nov 2019 23:57:12 -0500 Received: from lev.selidor.net ([2600:3c03:e001:1100::1]:56996) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1iRUQR-0000cq-FP for bug-guix@gnu.org; Sun, 03 Nov 2019 23:57:11 -0500 Content-Disposition: inline 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: 38055@debbugs.gnu.org Hi, I'm using patchelf 0.8 from Guix commit 7f81cce3 on Debian Sid. When trying to patch the `go` binary from , I get the following error: ivan@sax /tmp/tmps2Cv6w [env]$ patchelf --print-interpreter $SHELL /gnu/store/ahqgl4h89xqj695lgqvsaf6zh2nhy4pj-glibc-2.29/lib/ld-linux-x86-64.so.2 ivan@sax /tmp/tmps2Cv6w [env]$ patchelf --set-interpreter $(patchelf --print-interpreter $SHELL) /tmp/tmps2Cv6w/golang/bin/go patchelf: patchelf.cc:701: void ElfFile::rewriteSectionsExecutable() \ [with Elf_Ehdr = Elf64_Ehdr; Elf_Phdr = Elf64_Phdr; Elf_Shdr = Elf64_Shdr; Elf_Addr = long unsigned int; Elf_Off = long unsigned int; \ Elf_Dyn = Elf64_Dyn; Elf_Sym = Elf64_Sym]: Assertion `(off_t) rdi(hdr->e_shoff) >= startOffset' failed. Aborted (I know Go is packed for Guix, my need arises from trying to build an unrelated project which relies on binary Go for its build process.) It may be the problem described here regarding Go-produced binaries: . It seems to be fixed in patchelf 0.10, and indeed trying the same operation with patchelf 0.10 from Debian does succeed to patch the binary. As an aside, I tried to build `--with-source` for 0.10 and it succeeds to compile, but tests fail to pass. Thank you very much! -- Ivan Vilata i Balaguer -- https://elvil.net/