GNU logs - #75458, boring messages


Message sent to florent.pruvost@HIDDEN, romain.garbage@HIDDEN, bug-guix@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#75458: (guix platforms) & co. can end up loading incompatible modules
Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= <ludovic.courtes@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: florent.pruvost@HIDDEN, romain.garbage@HIDDEN, bug-guix@HIDDEN
Resent-Date: Thu, 09 Jan 2025 11:02:02 +0000
Resent-Message-ID: <handler.75458.B.17364204941986 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: report 75458
X-GNU-PR-Package: guix
X-GNU-PR-Keywords: 
To: 75458 <at> debbugs.gnu.org
Cc: Florent Pruvost <florent.pruvost@HIDDEN>, "Romain GARBAGE" <romain.garbage@HIDDEN>
X-Debbugs-Original-To: bug-guix@HIDDEN
X-Debbugs-Original-Xcc: Florent Pruvost <florent.pruvost@HIDDEN>, "Romain GARBAGE" <romain.garbage@HIDDEN>
Received: via spool by submit <at> debbugs.gnu.org id=B.17364204941986
          (code B ref -1); Thu, 09 Jan 2025 11:02:02 +0000
Received: (at submit) by debbugs.gnu.org; 9 Jan 2025 11:01:34 +0000
Received: from localhost ([127.0.0.1]:50596 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tVqI9-0000Vy-Ad
	for submit <at> debbugs.gnu.org; Thu, 09 Jan 2025 06:01:33 -0500
Received: from lists.gnu.org ([2001:470:142::17]:41742)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <ludovic.courtes@HIDDEN>)
 id 1tVqI7-0000Vc-Fc
 for submit <at> debbugs.gnu.org; Thu, 09 Jan 2025 06:01:32 -0500
Received: from eggs.gnu.org ([2001:470:142:3::10])
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <ludovic.courtes@HIDDEN>)
 id 1tVqHx-0003er-V0
 for bug-guix@HIDDEN; Thu, 09 Jan 2025 06:01:22 -0500
Received: from mail3-relais-sop.national.inria.fr ([192.134.164.104])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <ludovic.courtes@HIDDEN>)
 id 1tVqHu-0000nu-Pg
 for bug-guix@HIDDEN; Thu, 09 Jan 2025 06:01:21 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=inria.fr; s=dc;
 h=from:to:subject:date:message-id:mime-version;
 bh=tnMDhT64X0AXnjPouPFWbqKqufGPj8slXyzDmdHfVsU=;
 b=pe2B5qc5TpqpudLvdMXTcFrwqunDmCot7SFGbax+bhssvmTfjnrRcwyA
 XeviTCvi4qZkWmITB3LQnwEATxbHLhZvwQa2uwvnU5kdPy5V0mwFJAMgS
 iMu7NTEKpWwAA1Ma+uYoX97rol6Jqx82huahMf7naxwkl1B2i/9SwmcVv k=;
Authentication-Results: mail3-relais-sop.national.inria.fr;
 dkim=none (message not signed) header.i=none;
 spf=SoftFail smtp.mailfrom=ludovic.courtes@HIDDEN;
 dmarc=fail (p=none dis=none) d=inria.fr
X-IronPort-AV: E=Sophos;i="6.12,301,1728943200"; d="scan'208";a="105892765"
Received: from 91-160-117-201.subs.proxad.net (HELO ribbon) ([91.160.117.201])
 by mail3-relais-sop.national.inria.fr with
 ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Jan 2025 12:01:13 +0100
From: Ludovic =?UTF-8?Q?Court=C3=A8s?= <ludovic.courtes@HIDDEN>
X-URL: http://www.fdn.fr/~lcourtes/
X-Revolutionary-Date: =?UTF-8?Q?D=C3=A9cadi?= 20 =?UTF-8?Q?Niv=C3=B4se?= an
 233 de la =?UTF-8?Q?R=C3=A9volution,?= jour du Van
X-PGP-Key-ID: 0x090B11993D9AEBB5
X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc
X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4  0CFB 090B 1199 3D9A EBB5
X-OS: x86_64-pc-linux-gnu
Date: Thu, 09 Jan 2025 12:01:12 +0100
Message-ID: <871pxcs13b.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
Received-SPF: pass client-ip=192.134.164.104;
 envelope-from=ludovic.courtes@HIDDEN;
 helo=mail3-relais-sop.national.inria.fr
X-Spam_score_int: -43
X-Spam_score: -4.4
X-Spam_bar: ----
X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,
 RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001,
 RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001,
 SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: 0.0 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

--=-=-=
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable

Hello,

A colleague reported this weird =E2=80=9Cunbound variable=E2=80=9D error me=
ssage, which
is ignored in this case but can be fatal in other cases (see below):

--8<---------------cut here---------------start------------->8---
$ guix time-machine -C /tmp/channels.scm -- shell emacs-elementaryx-ox-publ=
ish-as-default bash-minimal -n
error: #{ %make-platform-procedure/abi-check}#: unbound variable
hint: Did you forget a `use-modules' form?

14.4 MB would be downloaded
$ cat /tmp/channels.scm=20
(list (channel
        (name 'guix)
        (url "https://git.savannah.gnu.org/git/guix.git")
        (branch "master")
        (commit
          "5a95cf76e1d0f9fdff5b232b42337c657b76d1d4")
        (introduction
          (make-channel-introduction
            "9edb3f66fd807b096b48283debdcddccfea34bad"
            (openpgp-fingerprint
              "BBB0 2DDF 2CEA F6A8 0D1D  E643 A2A0 6DF2 A33A 54FA"))))
      (channel
        (name 'guix-hpc)
        (url "https://gitlab.inria.fr/guix-hpc/guix-hpc.git")
        (branch "master")
        (commit
          "b7608db6ecff32e2569ed8407d62ac1485e2856a")))
--8<---------------cut here---------------end--------------->8---

The crux of the problem is that =E2=80=98platforms=E2=80=99 happily browses=
 any
=E2=80=98guix/platforms=E2=80=99 it finds in the load path; in my case, aft=
er looking
for guix/platforms modules in this specific Guix instance, it goes on to
browse ~/.guix-home/profile/=E2=80=A6 and /run/current-system/profile/=E2=
=80=A6, both of
which being on GUILE_LOAD_PATH.  The modules it finds there, in this
case, are not ABI-compatible with those of the Guix instance, hence the
error message.

Reduced case:

--8<---------------cut here---------------start------------->8---
$ guix time-machine -C /tmp/channels.scm -- repl -q
GNU Guile 3.0.9
Copyright (C) 1995-2023 Free Software Foundation, Inc.

Guile comes with ABSOLUTELY NO WARRANTY; for details type `,show w'.
This program is free software, and you are welcome to redistribute it
under certain conditions; type `,show c' for details.

Enter `,help' for help.
scheme@(guix-user)> ,use(guix platform)
scheme@(guix-user)> (platform-modules)
error: #{ %make-platform-procedure/abi-check}#: unbound variable
hint: Did you forget a `use-modules' form?

$1 =3D (#<interface (guix platforms arm) 7f2929e0c8c0> #<interface (guix pl=
atforms avr) 7f2929e0c640> #<interface (guix platforms mips) 7f2929e0c3c0> =
#<interface (guix platforms or1k) 7f2929e0c140> #<interface (guix platforms=
 powerpc) 7f2929ebde60> #<interface (guix platforms riscv) 7f2929ebdbe0> #<=
interface (guix platforms x86) 7f2929ebd960> #<interface (guix platforms ar=
m) 7f2929e0c8c0> #<interface (guix platforms avr) 7f2929e0c640> #<interface=
 (guix platforms mips) 7f2929e0c3c0> #<interface (guix platforms or1k) 7f29=
29e0c140> #<interface (guix platforms powerpc) 7f2929ebde60> #<interface (g=
uix platforms riscv) 7f2929ebdbe0> #<interface (guix platforms x86) 7f2929e=
bd960>)
scheme@(guix-user)> %load-path
$2 =3D ("/gnu/store/n9xy5r1a0njyn8ml33p4mm8rxfn93drb-guix-module-union/shar=
e/guile/site/3.0" "/gnu/store/1gd9nsy4cps8fnrd1avkc9l01l7ywiai-guile-3.0.9/=
share/guile/3.0" "/gnu/store/1gd9nsy4cps8fnrd1avkc9l01l7ywiai-guile-3.0.9/s=
hare/guile/3.0" "/gnu/store/1gd9nsy4cps8fnrd1avkc9l01l7ywiai-guile-3.0.9/sh=
are/guile/site/3.0" "/gnu/store/1gd9nsy4cps8fnrd1avkc9l01l7ywiai-guile-3.0.=
9/share/guile/site" "/gnu/store/1gd9nsy4cps8fnrd1avkc9l01l7ywiai-guile-3.0.=
9/share/guile" "/home/ludo/.guix-home/profile/share/guile/site/3.0" "/home/=
ludo/.guix-home/profile/share/guile/site/3.0" "/run/current-system/profile/=
share/guile/site/3.0")
--8<---------------cut here---------------end--------------->8---

The same problem exists in:

  =E2=80=A2 =E2=80=98image-modules=E2=80=99 in (gnu system images);

  =E2=80=A2 =E2=80=98build-system-modules=E2=80=99 in (guix import utils);

  =E2=80=A2 =E2=80=98importer-modules=E2=80=99 in (guix upstream);

  =E2=80=A2 =E2=80=98bootloader-modules=E2=80=99 in (gnu bootloader).

One radical way to fix it would be to not use anything outside the
module union:


--=-=-=
Content-Type: text/x-patch
Content-Disposition: inline

diff --git a/guix/self.scm b/guix/self.scm
index 2652688c71..85fa3e1467 100644
--- a/guix/self.scm
+++ b/guix/self.scm
@@ -620,22 +620,20 @@ (define* (guix-command modules
                     (set! %load-extensions '(".scm"))
 
                     (set! %load-path
-                      (append (list (string-append #$module-directory
-                                                   "/share/guile/site/"
-                                                   (effective-version))
-                                    (string-append #$guile "/share/guile/"
-                                                   (effective-version)))
-                              %load-path))
+                          (list (string-append #$module-directory
+                                               "/share/guile/site/"
+                                               (effective-version))
+                                (string-append #$guile "/share/guile/"
+                                               (effective-version))))
 
                     (set! %load-compiled-path
-                      (append (list (string-append #$module-directory
-                                                   "/lib/guile/"
-                                                   (effective-version)
-                                                   "/site-ccache")
-                                    (string-append #$guile "/lib/guile/"
-                                                   (effective-version)
-                                                   "/ccache"))
-                              %load-compiled-path))
+                          (list (string-append #$module-directory
+                                               "/lib/guile/"
+                                               (effective-version)
+                                               "/site-ccache")
+                                (string-append #$guile "/lib/guile/"
+                                               (effective-version)
+                                               "/ccache")))
 
                     ;; To maximize the chances that locales are set up right
                     ;; out-of-the-box, bundle "common" UTF-8 locales.

--=-=-=
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable


That would make it impossible to use external Guile libraries from =E2=80=
=98guix
repl=E2=80=99, for example.

Another solution would be for all the =E2=80=98all-modules=E2=80=99 call si=
tes to limit
their search to (current-profile).  Probably better.

Thoughts?

Ludo=E2=80=99.

--=-=-=--




Message sent:


Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-Mailer: MIME-tools 5.505 (Entity 5.505)
Content-Type: text/plain; charset=utf-8
X-Loop: help-debbugs@HIDDEN
From: help-debbugs@HIDDEN (GNU bug Tracking System)
To: Ludovic =?UTF-8?Q?Court=C3=A8s?= <ludovic.courtes@HIDDEN>
Subject: bug#75458: Acknowledgement ((guix platforms) & co. can end up
 loading incompatible modules)
Message-ID: <handler.75458.B.17364204941986.ack <at> debbugs.gnu.org>
References: <871pxcs13b.fsf@HIDDEN>
X-Gnu-PR-Message: ack 75458
X-Gnu-PR-Package: guix
Reply-To: 75458 <at> debbugs.gnu.org
Date: Thu, 09 Jan 2025 11:02:02 +0000

Thank you for filing a new bug report with debbugs.gnu.org.

This is an automatically generated reply to let you know your message
has been received.

Your message is being forwarded to the package maintainers and other
interested parties for their attention; they will reply in due course.

As you requested using X-Debbugs-CC, your message was also forwarded to
  Florent Pruvost <florent.pruvost@HIDDEN>, "Romain GARBAGE" <romain.garb=
age@HIDDEN>
(after having been given a bug report number, if it did not have one).

Your message has been sent to the package maintainer(s):
 bug-guix@HIDDEN

If you wish to submit further information on this problem, please
send it to 75458 <at> debbugs.gnu.org.

Please do not send mail to help-debbugs@HIDDEN unless you wish
to report a problem with the Bug-tracking system.

--=20
75458: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D75458
GNU Bug Tracking System
Contact help-debbugs@HIDDEN with problems



Last modified: Sun, 12 Jan 2025 05:45:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.