From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id iKeHFsisf2fFWwAA62LTzQ:P1 (envelope-from ) for ; Thu, 09 Jan 2025 11:02:32 +0000 Received: from aspmx1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id iKeHFsisf2fFWwAA62LTzQ (envelope-from ) for ; Thu, 09 Jan 2025 12:02:32 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=QgYquuok; dkim=fail ("headers rsa verify failed") header.d=inria.fr header.s=dc header.b=pe2B5qc5; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org"; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=inria.fr (policy=none) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1736420552; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:resent-cc:resent-from:resent-sender: resent-message-id:list-id:list-help:list-unsubscribe:list-subscribe: list-post:dkim-signature; bh=tnMDhT64X0AXnjPouPFWbqKqufGPj8slXyzDmdHfVsU=; b=Q/HT9BAULqHbTjhrVzsi25WiGirdahrBeDDvLd3aNRq+b/Q3QD/7Fj7iuXjTN5+U/Dtifi nKKe7KKzjIXq1XGgm01/yLNxVAgf5DOsWaDzkfGM7vY6fxdF+IvwKI9OCtbz81OQeT3tj2 3MzA7Utw7vMQQTVBmTxeWlT64SNokX8NZjxyfLnl5ZknqTMheeEv/eGTSlO3j+X6OotiaH Hx1/mm6RtIMPktPqWdCruAiuraEwjbatRncFDAusYmkJ+g1vpL2PqZWmXbsMRey6tKrDwQ r7A5+VHvtpYC2qEn8yNwJ9LWLRffAu2L2iUjOdvBxH7Gdj47KSZU5t00FmwnXA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=QgYquuok; dkim=fail ("headers rsa verify failed") header.d=inria.fr header.s=dc header.b=pe2B5qc5; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org"; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=inria.fr (policy=none) ARC-Seal: i=1; s=key1; d=yhetil.org; t=1736420552; a=rsa-sha256; cv=none; b=n37PZHt+AooOTnI3CYJb5+ewfJ9JCM3cDj6PJFRag5ljYC2MciFKulw7tOgS4eeVY5vzth p9zA/uGvvHtSRDxBC9WmWjurWCYvfXfzKzyHMdGjPWkLfST2OoG1U4PQGTMArAhMPmQyq4 1zDf4JBFwH48WVq19RDugPV/B3YEQ241nK2wUiEnIE6uXibZO85Pk/3LKdEQM8TJLz4lt7 DFbCDO37H2PZrxamCBie9KHmnhJZUKdgxEOZq49iE4ipyTZ6mEonR/1itG2KFbWn45orr8 OYNXUoKO3QbplgVim0H7SES9auvv5Rh8sEqlJF8zYn8OyDXGQ4XCIEAl1dcO8A== 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 D7C655B0CC for ; Thu, 09 Jan 2025 12:02:31 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tVqIe-0003hV-Fy; Thu, 09 Jan 2025 06:02:04 -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 ) id 1tVqId-0003hH-0V for bug-guix@gnu.org; Thu, 09 Jan 2025 06:02:03 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tVqIc-0000qN-NQ for bug-guix@gnu.org; Thu, 09 Jan 2025 06:02:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:From:To:Subject; bh=tnMDhT64X0AXnjPouPFWbqKqufGPj8slXyzDmdHfVsU=; b=QgYquuoksBm9zGV0LrN0X6H8lYB8D4N1wW5WWJuLfNaxfsB+Z+vsoHp6wR/RFJa/FacWlm4Vj5uVZxSFQ4+tIoWFFYyLhqm5VId4EoVrH2Ru21kPMVipE7grsGD/JjfdUdR5URb94Qpi3spise38fdJiDqb7wzGFFGtYA3byVd5dAuVprvdn1qcbfv9sJ3eI+GX7sqkFqDYHF5LHLkE755NQCOJgCIOnZcCqsKaFt33wa+OurKFShRjZt/l2XhEy0G099KdP8lDyWwNmM0Pon2QjMvmO95HMD+7rec8+ePqAQ9gXvQ0kO8BAcR9u6gyuWJZH3j+VsgkHRx0FDytqVg==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tVqIc-0000Wp-D5; Thu, 09 Jan 2025 06:02:02 -0500 X-Loop: help-debbugs@gnu.org Subject: bug#75458: (guix platforms) & co. can end up loading incompatible modules Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: florent.pruvost@inria.fr, romain.garbage@inria.fr, bug-guix@gnu.org Resent-Date: Thu, 09 Jan 2025 11:02:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 75458 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: 75458@debbugs.gnu.org Cc: Florent Pruvost , "Romain GARBAGE" X-Debbugs-Original-To: bug-guix@gnu.org X-Debbugs-Original-Xcc: Florent Pruvost , "Romain GARBAGE" Received: via spool by submit@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 ) id 1tVqI9-0000Vy-Ad for submit@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 ) id 1tVqI7-0000Vc-Fc for submit@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 ) id 1tVqHx-0003er-V0 for bug-guix@gnu.org; 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 ) id 1tVqHu-0000nu-Pg for bug-guix@gnu.org; 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=; 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?= 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@inria.fr> 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@inria.fr; 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-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Queue-Id: D7C655B0CC X-Migadu-Scanner: mx13.migadu.com X-Migadu-Spam-Score: 0.93 X-Spam-Score: 0.93 X-TUID: gt3rmb9s66Qm --=-=-= 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 x86) 7f2929ebd960> # # # # # # #) 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. --=-=-=--