From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id UIGCAQYfIF95TwAA0tVLHw (envelope-from ) for ; Tue, 28 Jul 2020 12:50:14 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id YEDqOAUfIF8FaQAAbx9fmQ (envelope-from ) for ; Tue, 28 Jul 2020 12:50:13 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 8B99D940391 for ; Tue, 28 Jul 2020 12:50:12 +0000 (UTC) Received: from localhost ([::1]:60858 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k0P3b-0004M6-3d for larch@yhetil.org; Tue, 28 Jul 2020 08:50:11 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59244) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k0P3S-0004L3-9x for bug-guix@gnu.org; Tue, 28 Jul 2020 08:50:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:46021) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1k0P3R-0003r4-VU for bug-guix@gnu.org; Tue, 28 Jul 2020 08:50:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1k0P3R-0005dB-Tt for bug-guix@gnu.org; Tue, 28 Jul 2020 08:50:01 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#42558: =?UTF-8?Q?=E2=80=98guix?= pack =?UTF-8?Q?-RR=E2=80=99:?= audit library is dynamically linked Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Tue, 28 Jul 2020 12:50:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42558 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: 42558@debbugs.gnu.org Received: via spool by 42558-submit@debbugs.gnu.org id=B42558.159594060021627 (code B ref 42558); Tue, 28 Jul 2020 12:50:01 +0000 Received: (at 42558) by debbugs.gnu.org; 28 Jul 2020 12:50:00 +0000 Received: from localhost ([127.0.0.1]:57565 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k0P3M-0005cf-AT for submit@debbugs.gnu.org; Tue, 28 Jul 2020 08:50:00 -0400 Received: from mail3-relais-sop.national.inria.fr ([192.134.164.104]:5650) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k0P3J-0005cJ-A2 for 42558@debbugs.gnu.org; Tue, 28 Jul 2020 08:49:54 -0400 X-IronPort-AV: E=Sophos;i="5.75,406,1589234400"; d="scan'208";a="355482547" Received: from unknown (HELO ribbon) ([193.50.110.108]) by mail3-relais-sop.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 28 Jul 2020 14:49:46 +0200 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <87tuxtuk9m.fsf@inria.fr> Date: Tue, 28 Jul 2020 14:49:46 +0200 In-Reply-To: <87tuxtuk9m.fsf@inria.fr> ("Ludovic \=\?utf-8\?Q\?Court\=C3\=A8s\=22\?\= \=\?utf-8\?Q\?'s\?\= message of "Mon, 27 Jul 2020 16:04:21 +0200") Message-ID: <87r1svu7md.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -3.3 (---) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Spam-Score: -4.3 (----) X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of bug-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=bug-guix-bounces@gnu.org X-Spam-Score: -1.01 X-TUID: Wx7WjVFHwCMS Ludovic Court=C3=A8s skribis: > The audit library created by =E2=80=98guix pack -RR=E2=80=99, called =E2= =80=98pack-audit.so=E2=80=99, is > dynamically-linked. Thus, it cannot be loaded (unless there are working > libgcc.so and libc.so in the search path?), leading to failures like > this: > > $ GUIX_EXECUTION_ENGINE=3Dperformance ./bin/sinfo --version > ERROR: ld.so: object '/=E2=80=A6/lcourtes/tmp/t/gnu/store/0n6nnvzgxyisg0b= szb5zqxp2gzdwh7h3-pack-audit.so' cannot be loaded as audit interface: canno= t open shared object file; ignored. > /=E2=80=A6/lcourtes/tmp/t/gnu/store/3dhy2f3djmm1h5ix5aa84lrskxzrl6d0-slur= m-19.05.3-2/bin//sinfo: error while loading shared libraries: libslurmfull.= so: cannot open shared object file: No such file or directory > > The root cause is that =E2=80=98pack-audit.so=E2=80=99 NEEDs libgcc_s.so,= which on this > machine could not be loaded, and thus resolving the other dependencies > of the wrapped executable, like =E2=80=98libslurmfull.so=E2=80=99 here, f= ails. Fixed by commit c6c0d5a22c2ee3d7164dab0129b2e4852a4ae76c. How could this happen? I think there are two key factors: 1. Most likely I tested v1 of the patch series on =E2=80=9Creal=E2=80=9D = non-Guix machines, but when iterating on v2 (which removed =E2=80=98--library-p= ath=E2=80=99 from the ld.so invocation=C2=B9) I probably relied on =E2=80=98tests/guix-pack-relocatable.sh=E2=80=99, which emulates a mac= hine where /gnu is empty by mounting a tmpfs on it. 2. There was another bug in =E2=80=98exec_with_loader=E2=80=99 whereby it= would symlink its store to that writable /gnu. Thus, the tests would run as if the store was already available under /gnu/store, thereby hiding the actual issue. This second bug is fixed by c088aa2988ef82289c87ebfd6d07d8f1464dd8f0. AFAICS we=E2=80=99re all fine now. You=E2=80=99re very welcome to give it a spin on a Guix-less machine! Just= do: guix pack -RR your favorite packages -S /bin=3Dbin Send the resulting tarball to that machine, and then: mkdir test cd test tar xf /path/to/pack.tar.gz GUIX_EXECUTION_ENGINE=3Dfakechroot ./bin/your-favorite-command Ludo=E2=80=99. =C2=B9 https://issues.guix.gnu.org/41189#8