GNU bug report logs - #69396
[PATCH core-updates] gnu: ld-wrapper: Also unset GUILE_LOAD_PATH.

Previous Next

Package: guix-patches;

Reported by: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>

Date: Sun, 25 Feb 2024 21:20:02 UTC

Severity: normal

Tags: patch

Done: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 69396 in the body.
You can then email your comments to 69396 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to ludo <at> gnu.org, guix-patches <at> gnu.org:
bug#69396; Package guix-patches. (Sun, 25 Feb 2024 21:20:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Maxim Cournoyer <maxim.cournoyer <at> gmail.com>:
New bug report received and forwarded. Copy sent to ludo <at> gnu.org, guix-patches <at> gnu.org. (Sun, 25 Feb 2024 21:20:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
To: guix-patches <at> gnu.org
Cc: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
Subject: [PATCH core-updates] gnu: ld-wrapper: Also unset GUILE_LOAD_PATH.
Date: Sun, 25 Feb 2024 16:17:49 -0500
The following problem was discovered while attempting to configure Guix to use
a locally built Guile tree, via its meta/uninstalled-env script, which would
attempt to use the newer Guile source files and fail with:

  Pre-boot error; key: unbound-variable, args: (#f "Unbound variable:
  ~S" (error) #f)collect2: fatal error: ld terminated with signal 6 [Aborted]

With the following change, a Guix user may now configure their build to use a
locally built Guile with e.g.:

  ~/src/guile/meta/uninstalled-env ./configure --localstatedir=/var \
  --sysconfdir=/etc

* gnu/packages/ld-wrapper.in: Unset GUILE_LOAD_PATH.  Also unset
GUILE_SYSTEM_PATH, for symmetry.  Streamline exec call, using the now fixed
'-l' option.
(ld-wrapper): Fix args being a nested list, and strip its arg0.

Change-Id: Iaaa721019f3646d851202bb018214ec9fcc04fd4
---

 gnu/packages/ld-wrapper.in | 27 +++++++++++++++------------
 1 file changed, 15 insertions(+), 12 deletions(-)

diff --git a/gnu/packages/ld-wrapper.in b/gnu/packages/ld-wrapper.in
index 0d53e746af..0a2135ff5e 100644
--- a/gnu/packages/ld-wrapper.in
+++ b/gnu/packages/ld-wrapper.in
@@ -1,23 +1,26 @@
 #!@BASH@
 # -*- mode: scheme; coding: utf-8; -*-
 
-# XXX: We have to go through Bash because there's no command-line switch to
-# augment %load-compiled-path, and because of the silly 127-byte limit for
-# the shebang line in Linux.
-# Use `load-compiled' because `load' (and `-l') doesn't otherwise load our
-# .go file (see <http://bugs.gnu.org/12519>).
-# Unset 'GUILE_LOAD_COMPILED_PATH' to make sure we do not stumble upon
-# incompatible .go files.  See
-# <https://lists.gnu.org/archive/html/guile-devel/2016-03/msg00000.html>.
+# XXX: We have to go through Bash because there's no Guile command-line switch to
+# ignore the various Guile load path related environment variables.
 
+# Unset 'GUILE_LOAD_PATH' to make sure we do not stumble upon
+# incompatible Guile files (see
+# <https://lists.gnu.org/archive/html/guile-devel/2016-03/msg00000.html>).
+
+unset GUILE_LOAD_PATH
 unset GUILE_LOAD_COMPILED_PATH
+unset GUILE_SYSTEM_PATH
 unset GUILE_SYSTEM_COMPILED_PATH
-main="(@ (gnu build-support ld-wrapper) ld-wrapper)"
-exec @GUILE@ -c "(load-compiled \"@SELF@.go\") (apply $main (cdr (command-line)))" "$@"
+
+exec  @GUILE@ \
+-l @SELF@ \
+-e '(@ (gnu build-support ld-wrapper) ld-wrapper)' -s "$0" "$@"
 !#
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2020 Ludovic Courtès <ludo <at> gnu.org>
 ;;; Copyright © 2020 Marius Bakke <mbakke <at> fastmail.com>
+;;; Copyright © 2024 Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -285,9 +288,9 @@ library outside of ~a: ~s~%"
       result
       (expand-arguments result)))
 
-(define (ld-wrapper . args)
+(define (ld-wrapper args)
   ;; Invoke the real `ld' with ARGS, augmented with `-rpath' switches.
-  (let* ((args (expand-arguments args))
+  (let* ((args (expand-arguments (cdr args))) ;strip arg0
          (path (library-search-path args))
          (libs (library-files-linked args path))
          (args (append args (rpath-arguments libs))))

base-commit: f205179ed2cedf55aa0e046af2d80282f6a74075
-- 
2.41.0





Information forwarded to guix-patches <at> gnu.org:
bug#69396; Package guix-patches. (Sun, 25 Feb 2024 21:51:02 GMT) Full text and rfc822 format available.

Message #8 received at 69396 <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
Cc: 69396 <at> debbugs.gnu.org
Subject: Re: bug#69396: [PATCH core-updates] gnu: ld-wrapper: Also unset
 GUILE_LOAD_PATH.
Date: Sun, 25 Feb 2024 22:49:59 +0100
Hi,

Maxim Cournoyer <maxim.cournoyer <at> gmail.com> skribis:

> The following problem was discovered while attempting to configure Guix to use
> a locally built Guile tree, via its meta/uninstalled-env script, which would
> attempt to use the newer Guile source files and fail with:
>
>   Pre-boot error; key: unbound-variable, args: (#f "Unbound variable:
>   ~S" (error) #f)collect2: fatal error: ld terminated with signal 6 [Aborted]
>
> With the following change, a Guix user may now configure their build to use a
> locally built Guile with e.g.:
>
>   ~/src/guile/meta/uninstalled-env ./configure --localstatedir=/var \
>   --sysconfdir=/etc
>
> * gnu/packages/ld-wrapper.in: Unset GUILE_LOAD_PATH.  Also unset
> GUILE_SYSTEM_PATH, for symmetry.  Streamline exec call, using the now fixed
> '-l' option.
> (ld-wrapper): Fix args being a nested list, and strip its arg0.

[...]

> -# XXX: We have to go through Bash because there's no command-line switch to
> -# augment %load-compiled-path, and because of the silly 127-byte limit for
> -# the shebang line in Linux.
> -# Use `load-compiled' because `load' (and `-l') doesn't otherwise load our
> -# .go file (see <http://bugs.gnu.org/12519>).
> -# Unset 'GUILE_LOAD_COMPILED_PATH' to make sure we do not stumble upon
> -# incompatible .go files.  See
> -# <https://lists.gnu.org/archive/html/guile-devel/2016-03/msg00000.html>.
> +# XXX: We have to go through Bash because there's no Guile command-line switch to
> +# ignore the various Guile load path related environment variables.
>  
> +# Unset 'GUILE_LOAD_PATH' to make sure we do not stumble upon
> +# incompatible Guile files (see
> +# <https://lists.gnu.org/archive/html/guile-devel/2016-03/msg00000.html>).
> +
> +unset GUILE_LOAD_PATH
>  unset GUILE_LOAD_COMPILED_PATH
> +unset GUILE_SYSTEM_PATH
>  unset GUILE_SYSTEM_COMPILED_PATH

OK for this part (I guess nobody tried that before!).

> -main="(@ (gnu build-support ld-wrapper) ld-wrapper)"
> -exec @GUILE@ -c "(load-compiled \"@SELF@.go\") (apply $main (cdr (command-line)))" "$@"
> +
> +exec  @GUILE@ \
> +-l @SELF@ \
> +-e '(@ (gnu build-support ld-wrapper) ld-wrapper)' -s "$0" "$@"

@SELF@ might need to be enclosed in double quotes for good measure.

Can you check through ‘strace’ how loading with ‘-l’ compares to
(load-compiled …)?

Otherwise LGTM, thanks!

Ludo’.




Information forwarded to ludo <at> gnu.org, guix-patches <at> gnu.org:
bug#69396; Package guix-patches. (Mon, 26 Feb 2024 04:00:03 GMT) Full text and rfc822 format available.

Message #11 received at 69396 <at> debbugs.gnu.org (full text, mbox):

From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
To: 69396 <at> debbugs.gnu.org
Cc: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
Subject: [PATCH core-updates v2] gnu: ld-wrapper: Also unset GUILE_LOAD_PATH.
Date: Sun, 25 Feb 2024 22:57:07 -0500
The following problem was discovered while attempting to configure Guix to use
a locally built Guile tree, via its meta/uninstalled-env script, which would
attempt to use the newer Guile source files and fail with:

  Pre-boot error; key: unbound-variable, args: (#f "Unbound variable:
  ~S" (error) #f)collect2: fatal error: ld terminated with signal 6 [Aborted]

With the following change, a Guix user may now configure their build to use a
locally built Guile with e.g.:

  ~/src/guile/meta/uninstalled-env ./configure --localstatedir=/var \
  --sysconfdir=/etc

* gnu/packages/ld-wrapper.in: Unset GUILE_LOAD_PATH.  Also unset
GUILE_SYSTEM_PATH, for symmetry.  Streamline exec call, using the now fixed
'-l' option.
(ld-wrapper): Fix args being a nested list, and strip its arg0.

Change-Id: Iaaa721019f3646d851202bb018214ec9fcc04fd4
---

Changes in v2:
 - Revert to load-compiled scheme to load ld.go
 - Refine comment

 gnu/packages/ld-wrapper.in | 27 ++++++++++++++++-----------
 1 file changed, 16 insertions(+), 11 deletions(-)

diff --git a/gnu/packages/ld-wrapper.in b/gnu/packages/ld-wrapper.in
index 0d53e746af..c9bb235bca 100644
--- a/gnu/packages/ld-wrapper.in
+++ b/gnu/packages/ld-wrapper.in
@@ -1,23 +1,28 @@
 #!@BASH@
 # -*- mode: scheme; coding: utf-8; -*-
 
-# XXX: We have to go through Bash because there's no command-line switch to
-# augment %load-compiled-path, and because of the silly 127-byte limit for
-# the shebang line in Linux.
-# Use `load-compiled' because `load' (and `-l') doesn't otherwise load our
-# .go file (see <http://bugs.gnu.org/12519>).
-# Unset 'GUILE_LOAD_COMPILED_PATH' to make sure we do not stumble upon
-# incompatible .go files.  See
-# <https://lists.gnu.org/archive/html/guile-devel/2016-03/msg00000.html>.
+# XXX: We have to go through Bash because there's no Guile command-line switch to
+# ignore the various Guile load path related environment variables.
+
+# Unset 'GUILE_LOAD_PATH' to make sure we do not stumble upon
+# incompatible Guile files (see
+# <https://lists.gnu.org/archive/html/guile-devel/2016-03/msg00000.html>).
 
+unset GUILE_LOAD_PATH
 unset GUILE_LOAD_COMPILED_PATH
+unset GUILE_SYSTEM_PATH
 unset GUILE_SYSTEM_COMPILED_PATH
+
+# Use `load-compiled' because `load' (and `-l') doesn't otherwise load our
+# .go file, or causes extraneous `stat' system calls when the "-C" "/" arguments
+# are provided.
 main="(@ (gnu build-support ld-wrapper) ld-wrapper)"
-exec @GUILE@ -c "(load-compiled \"@SELF@.go\") (apply $main (cdr (command-line)))" "$@"
+exec @GUILE@ -c "(load-compiled \"@SELF@.go\") ($main (command-line))" "$@"
 !#
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2020 Ludovic Courtès <ludo <at> gnu.org>
 ;;; Copyright © 2020 Marius Bakke <mbakke <at> fastmail.com>
+;;; Copyright © 2024 Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -285,9 +290,9 @@ library outside of ~a: ~s~%"
       result
       (expand-arguments result)))
 
-(define (ld-wrapper . args)
+(define (ld-wrapper args)
   ;; Invoke the real `ld' with ARGS, augmented with `-rpath' switches.
-  (let* ((args (expand-arguments args))
+  (let* ((args (expand-arguments (cdr args))) ;strip arg0
          (path (library-search-path args))
          (libs (library-files-linked args path))
          (args (append args (rpath-arguments libs))))

base-commit: f205179ed2cedf55aa0e046af2d80282f6a74075
-- 
2.41.0





Information forwarded to guix-patches <at> gnu.org:
bug#69396; Package guix-patches. (Mon, 26 Feb 2024 04:08:02 GMT) Full text and rfc822 format available.

Message #14 received at 69396 <at> debbugs.gnu.org (full text, mbox):

From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: 69396 <at> debbugs.gnu.org
Subject: Re: bug#69396: [PATCH core-updates] gnu: ld-wrapper: Also unset
 GUILE_LOAD_PATH.
Date: Sun, 25 Feb 2024 23:06:06 -0500
Hi Ludo,

Thanks for the prompt review!

Ludovic Courtès <ludo <at> gnu.org> writes:

[...]

>> +unset GUILE_LOAD_PATH
>>  unset GUILE_LOAD_COMPILED_PATH
>> +unset GUILE_SYSTEM_PATH
>>  unset GUILE_SYSTEM_COMPILED_PATH
>
> OK for this part (I guess nobody tried that before!).

Ack.

>> -main="(@ (gnu build-support ld-wrapper) ld-wrapper)"
>> -exec @GUILE@ -c "(load-compiled \"@SELF@.go\") (apply $main (cdr (command-line)))" "$@"
>> +
>> +exec  @GUILE@ \
>> +-l @SELF@ \
>> +-e '(@ (gnu build-support ld-wrapper) ld-wrapper)' -s "$0" "$@"
>
> @SELF@ might need to be enclosed in double quotes for good measure.
>
> Can you check through ‘strace’ how loading with ‘-l’ compares to
> (load-compiled …)?

Good suggestion; it turns out the .go file was not loaded until I also
would provide the -C / arguments to Guile, as load-in-vicinity with an
absolute file does the module loading from site-path thing as well as
compiled-path-dir + absolute-file-name-of.go, which meant it was
attempting to load the .go file at some odd place like
'/gnu/store/hx74v20cwcra7jq8lnagfi76i73018ai-ld-wrapper2-0/bin//gnu/store/hx74v20cwcra7jq8lnagfi76i73018ai-ld-wrapper2-0/bin/ld.go',
hm.

For completeness, the added system calls as seen with strace when using -C / -l
/gnu/store/hx74v20cwcra7jq8lnagfi76i73018ai-ld-wrapper2-0/bin/ld
compared to the previous approach were:

--8<---------------cut here---------------start------------->8---
newfstatat(AT_FDCWD, "/gnu/store/7jdlzpvy01y7szg7phm2l2x9szjrwlgw-guile-3.0.9/share/guile/3.0/gnu/build-support/ld-wrapper.scm", 0x7ffd4c4c3920, 0) = -1 ENOENT (Aucun fichier ou dossier de ce type)
newfstatat(AT_FDCWD, "/gnu/store/7jdlzpvy01y7szg7phm2l2x9szjrwlgw-guile-3.0.9/share/guile/3.0/gnu/build-support/ld-wrapper", 0x7ffd4c4c3920, 0) = -1 ENOENT (Aucun fichier ou dossier de ce type)
newfstatat(AT_FDCWD, "/gnu/store/7jdlzpvy01y7szg7phm2l2x9szjrwlgw-guile-3.0.9/share/guile/site/3.0/gnu/build-support/ld-wrapper.scm", 0x7ffd4c4c3920, 0) = -1 ENOENT (Aucun fichier ou dossier de ce type)
newfstatat(AT_FDCWD, "/gnu/store/7jdlzpvy01y7szg7phm2l2x9szjrwlgw-guile-3.0.9/share/guile/site/3.0/gnu/build-support/ld-wrapper", 0x7ffd4c4c3920, 0) = -1 ENOENT (Aucun fichier ou dossier de ce type)
newfstatat(AT_FDCWD, "/gnu/store/7jdlzpvy01y7szg7phm2l2x9szjrwlgw-guile-3.0.9/share/guile/site/gnu/build-support/ld-wrapper.scm", 0x7ffd4c4c3920, 0) = -1 ENOENT (Aucun fichier ou dossier de ce type)
newfstatat(AT_FDCWD, "/gnu/store/7jdlzpvy01y7szg7phm2l2x9szjrwlgw-guile-3.0.9/share/guile/site/gnu/build-support/ld-wrapper", 0x7ffd4c4c3920, 0) = -1 ENOENT (Aucun fichier ou dossier de ce type)
newfstatat(AT_FDCWD, "/gnu/store/7jdlzpvy01y7szg7phm2l2x9szjrwlgw-guile-3.0.9/share/guile/gnu/build-support/ld-wrapper.scm", 0x7ffd4c4c3920, 0) = -1 ENOENT (Aucun fichier ou dossier de ce type)
newfstatat(AT_FDCWD, "/gnu/store/7jdlzpvy01y7szg7phm2l2x9szjrwlgw-guile-3.0.9/share/guile/gnu/build-support/ld-wrapper", 0x7ffd4c4c3920, 0) = -1 ENOENT (Aucun fichier ou dossier de ce type)
newfstatat(AT_FDCWD, "/gnu/store/7jdlzpvy01y7szg7phm2l2x9szjrwlgw-guile-3.0.9/lib/guile/3.0/ccache/gnu/build-support/ld-wrapper.go", 0x7ffd4c4c36a0, 0) = -1 ENOENT (Aucun fichier ou dossier de ce type)
newfstatat(AT_FDCWD, "/gnu/store/7jdlzpvy01y7szg7phm2l2x9szjrwlgw-guile-3.0.9/lib/guile/3.0/site-ccache/gnu/build-support/ld-wrapper.go", 0x7ffd4c4c36a0, 0) = -1 ENOENT (Aucun fichier ou dossier de ce type)
newfstatat(AT_FDCWD, "/gnu/store/7jdlzpvy01y7szg7phm2l2x9szjrwlgw-guile-3.0.9/share/guile/3.0/gnu/build-support/ld-wrapper.scm", 0x7ffd4c4c3920, 0) = -1 ENOENT (Aucun fichier ou dossier de ce type)
newfstatat(AT_FDCWD, "/gnu/store/7jdlzpvy01y7szg7phm2l2x9szjrwlgw-guile-3.0.9/share/guile/3.0/gnu/build-support/ld-wrapper", 0x7ffd4c4c3920, 0) = -1 ENOENT (Aucun fichier ou dossier de ce type)
newfstatat(AT_FDCWD, "/gnu/store/7jdlzpvy01y7szg7phm2l2x9szjrwlgw-guile-3.0.9/share/guile/site/3.0/gnu/build-support/ld-wrapper.scm", 0x7ffd4c4c3920, 0) = -1 ENOENT (Aucun fichier ou dossier de ce type)
newfstatat(AT_FDCWD, "/gnu/store/7jdlzpvy01y7szg7phm2l2x9szjrwlgw-guile-3.0.9/share/guile/site/3.0/gnu/build-support/ld-wrapper", 0x7ffd4c4c3920, 0) = -1 ENOENT (Aucun fichier ou dossier de ce type)
newfstatat(AT_FDCWD, "/gnu/store/7jdlzpvy01y7szg7phm2l2x9szjrwlgw-guile-3.0.9/share/guile/site/gnu/build-support/ld-wrapper.scm", 0x7ffd4c4c3920, 0) = -1 ENOENT (Aucun fichier ou dossier de ce type)
newfstatat(AT_FDCWD, "/gnu/store/7jdlzpvy01y7szg7phm2l2x9szjrwlgw-guile-3.0.9/share/guile/site/gnu/build-support/ld-wrapper", 0x7ffd4c4c3920, 0) = -1 ENOENT (Aucun fichier ou dossier de ce type)
newfstatat(AT_FDCWD, "/gnu/store/7jdlzpvy01y7szg7phm2l2x9szjrwlgw-guile-3.0.9/share/guile/gnu/build-support/ld-wrapper.scm", 0x7ffd4c4c3920, 0) = -1 ENOENT (Aucun fichier ou dossier de ce type)
newfstatat(AT_FDCWD, "/gnu/store/7jdlzpvy01y7szg7phm2l2x9szjrwlgw-guile-3.0.9/share/guile/gnu/build-support/ld-wrapper", 0x7ffd4c4c3920, 0) = -1 ENOENT (Aucun fichier ou dossier de ce type)
newfstatat(AT_FDCWD, "/gnu/store/7jdlzpvy01y7szg7phm2l2x9szjrwlgw-guile-3.0.9/lib/guile/3.0/ccache/gnu/build-support/ld-wrapper.go", 0x7ffd4c4c36a0, 0) = -1 ENOENT (Aucun fichier ou dossier de ce type)
newfstatat(AT_FDCWD, "/gnu/store/7jdlzpvy01y7szg7phm2l2x9szjrwlgw-guile-3.0.9/lib/guile/3.0/site-ccache/gnu/build-support/ld-wrapper.go", 0x7ffd4c4c36a0, 0) = -1 ENOENT (Aucun fichier ou dossier de ce type)
getcwd("/home/maxim/src/guix-core-updates", 100) = 34
newfstatat(AT_FDCWD, "/gnu/store/mn9fi6hvs5nr8n3c4651vbirkgigfy7n-ld-wrapper2-0/bin/ld", {st_dev=makedev(0, 0x18), st_ino=370740560, st_mode=S_IFREG|0555, st_nlink=2, st_uid=0, st_gid=0, st_blksize=4096, st_blocks=32, st_size=12553, st_atime=1708917046 /* 2024-02-25T22:10:46-0500 */, st_atime_nsec=0, st_mtime=1 /* 1969-12-31T19:00:01-0500 */, st_mtime_nsec=0, st_ctime=1708917047 /* 2024-02-25T22:10:47.398473362-0500 */, st_ctime_nsec=398473362}, 0) = 0
newfstatat(AT_FDCWD, "//gnu/store/mn9fi6hvs5nr8n3c4651vbirkgigfy7n-ld-wrapper2-0/bin/ld.go", {st_dev=makedev(0, 0x18), st_ino=370740561, st_mode=S_IFREG|0444, st_nlink=2, st_uid=0, st_gid=0, st_blksize=4096, st_blocks=160, st_size=81429, st_atime=1708917046 /* 2024-02-25T22:10:46-0500 */, st_atime_nsec=0, st_mtime=1 /* 1969-12-31T19:00:01-0500 */, st_mtime_nsec=0, st_ctime=1708917047 /* 2024-02-25T22:10:47.402473236-0500 */, st_ctime_nsec=402473236}, 0) = 0
newfstatat(AT_FDCWD, "/gnu/store/7jdlzpvy01y7szg7phm2l2x9szjrwlgw-guile-3.0.9/share/guile/3.0/system/vm/loader.scm", {st_dev=makedev(0, 0x18), st_ino=357681850, st_mode=S_IFREG|0444, st_nlink=1, st_uid=0, st_gid=0, st_blksize=4096, st_blocks=8, st_size=1120, st_atime=1 /* 1969-12-31T19:00:01-0500 */, st_atime_nsec=0, st_mtime=1 /* 1969-12-31T19:00:01-0500 */, st_mtime_nsec=0, st_ctime=1706016118 /* 2024-01-23T08:21:58.171697725-0500 */, st_ctime_nsec=171697725}, 0) = 0
newfstatat(AT_FDCWD, "/system/vm/loader.go", 0x7ffd4c4c36a0, 0) = -1 ENOENT (Aucun fichier ou dossier de ce type)
newfstatat(AT_FDCWD, "/gnu/store/7jdlzpvy01y7szg7phm2l2x9szjrwlgw-guile-3.0.9/lib/guile/3.0/ccache/system/vm/loader.go", {st_dev=makedev(0, 0x18), st_ino=256911472, st_mode=S_IFREG|0444, st_nlink=39, st_uid=0, st_gid=0, st_blksize=4096, st_blocks=136, st_size=68581, st_atime=1707491218 /* 2024-02-09T10:06:58.868984106-0500 */, st_atime_nsec=868984106, st_mtime=1 /* 1969-12-31T19:00:01-0500 */, st_mtime_nsec=0, st_ctime=1707727292 /* 2024-02-12T03:41:32.717219251-0500 */, st_ctime_nsec=717219251}, 0) = 0
openat(AT_FDCWD, "/gnu/store/7jdlzpvy01y7szg7phm2l2x9szjrwlgw-guile-3.0.9/lib/guile/3.0/ccache/system/vm/loader.go", O_RDONLY|O_CLOEXEC) = 5
lseek(5, 0, SEEK_END)                   = 68581
mmap(NULL, 68581, PROT_READ, MAP_PRIVATE, 5, 0) = 0x7fa8f76cc000
close(5)                                = 0
mprotect(0x7fa8f76dc000, 936, PROT_READ|PROT_WRITE) = 0
openat(AT_FDCWD, "//gnu/store/mn9fi6hvs5nr8n3c4651vbirkgigfy7n-ld-wrapper2-0/bin/ld.go", O_RDONLY|O_CLOEXEC) = 5
lseek(5, 0, SEEK_END)                   = 81429
mmap(NULL, 81429, PROT_READ, MAP_PRIVATE, 5, 0) = 0x7fa8f76b8000
close(5)                                = 0
mprotect(0x7fa8f76c8000, 5832, PROT_READ|PROT_WRITE) = 0
getcwd("/home/maxim/src/guix-core-updates", 100) = 34
newfstatat(AT_FDCWD, "/gnu/store/mn9fi6hvs5nr8n3c4651vbirkgigfy7n-ld-wrapper2-0/bin/ld", {st_dev=makedev(0, 0x18), st_ino=370740560, st_mode=S_IFREG|0555, st_nlink=2, st_uid=0, st_gid=0, st_blksize=4096, st_blocks=32, st_size=12553, st_atime=1708917046 /* 2024-02-25T22:10:46-0500 */, st_atime_nsec=0, st_mtime=1 /* 1969-12-31T19:00:01-0500 */, st_mtime_nsec=0, st_ctime=1708917047 /* 2024-02-25T22:10:47.398473362-0500 */, st_ctime_nsec=398473362}, 0) = 0
newfstatat(AT_FDCWD, "//gnu/store/mn9fi6hvs5nr8n3c4651vbirkgigfy7n-ld-wrapper2-0/bin/ld.go", {st_dev=makedev(0, 0x18), st_ino=370740561, st_mode=S_IFREG|0444, st_nlink=2, st_uid=0, st_gid=0, st_blksize=4096, st_blocks=160, st_size=81429, st_atime=1708917046 /* 2024-02-25T22:10:46-0500 */, st_atime_nsec=0, st_mtime=1 /* 1969-12-31T19:00:01-0500 */, st_mtime_nsec=0, st_ctime=1708917047 /* 2024-02-25T22:10:47.402473236-0500 */, st_ctime_nsec=402473236}, 0) = 0
openat(AT_FDCWD, "//gnu/store/mn9fi6hvs5nr8n3c4651vbirkgigfy7n-ld-wrapper2-0/bin/ld.go", O_RDONLY|O_CLOEXEC) = 5
--8<---------------cut here---------------end--------------->8---

So, I've reverted to the old style of using load-compiled, and left a
note.  You'll find the result in v2.

I'll synchronize with jpoiret for the right timing to merge this to
core-updates with other world rebuilding changes, to minimize disruption
to other core-updates hackers.

-- 
Thanks,
Maxim




Information forwarded to guix-patches <at> gnu.org:
bug#69396; Package guix-patches. (Tue, 27 Feb 2024 09:24:01 GMT) Full text and rfc822 format available.

Message #17 received at 69396 <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
Cc: 69396 <at> debbugs.gnu.org
Subject: Re: [bug#69396] [PATCH core-updates v2] gnu: ld-wrapper: Also unset
 GUILE_LOAD_PATH.
Date: Tue, 27 Feb 2024 10:23:00 +0100
Hi,

Maxim Cournoyer <maxim.cournoyer <at> gmail.com> skribis:

> The following problem was discovered while attempting to configure Guix to use
> a locally built Guile tree, via its meta/uninstalled-env script, which would
> attempt to use the newer Guile source files and fail with:
>
>   Pre-boot error; key: unbound-variable, args: (#f "Unbound variable:
>   ~S" (error) #f)collect2: fatal error: ld terminated with signal 6 [Aborted]
>
> With the following change, a Guix user may now configure their build to use a
> locally built Guile with e.g.:
>
>   ~/src/guile/meta/uninstalled-env ./configure --localstatedir=/var \
>   --sysconfdir=/etc
>
> * gnu/packages/ld-wrapper.in: Unset GUILE_LOAD_PATH.  Also unset
> GUILE_SYSTEM_PATH, for symmetry.  Streamline exec call, using the now fixed
> '-l' option.
> (ld-wrapper): Fix args being a nested list, and strip its arg0.
>
> Change-Id: Iaaa721019f3646d851202bb018214ec9fcc04fd4
> ---
>
> Changes in v2:
>  - Revert to load-compiled scheme to load ld.go
>  - Refine comment

LGTM!

I’ll let you check with Josselin et al. whether to merge it now in
‘core-updates’ (my gut feeling is that we’d rather wait for the next
cycle, but I’ve haven’t been following lately.)

Thanks,
Ludo’.




Reply sent to Maxim Cournoyer <maxim.cournoyer <at> gmail.com>:
You have taken responsibility. (Sat, 09 Mar 2024 18:40:02 GMT) Full text and rfc822 format available.

Notification sent to Maxim Cournoyer <maxim.cournoyer <at> gmail.com>:
bug acknowledged by developer. (Sat, 09 Mar 2024 18:40:02 GMT) Full text and rfc822 format available.

Message #22 received at 69396-done <at> debbugs.gnu.org (full text, mbox):

From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
To: 69396-done <at> debbugs.gnu.org
Cc: Ludovic Courtès <ludo <at> gnu.org>
Subject: Re: [PATCH core-updates v2] gnu: ld-wrapper: Also unset
 GUILE_LOAD_PATH.
Date: Sat, 09 Mar 2024 13:37:35 -0500
Hello,

Maxim Cournoyer <maxim.cournoyer <at> gmail.com> writes:

> The following problem was discovered while attempting to configure Guix to use
> a locally built Guile tree, via its meta/uninstalled-env script, which would
> attempt to use the newer Guile source files and fail with:
>
>   Pre-boot error; key: unbound-variable, args: (#f "Unbound variable:
>   ~S" (error) #f)collect2: fatal error: ld terminated with signal 6 [Aborted]
>
> With the following change, a Guix user may now configure their build to use a
> locally built Guile with e.g.:
>
>   ~/src/guile/meta/uninstalled-env ./configure --localstatedir=/var \
>   --sysconfdir=/etc
>
> * gnu/packages/ld-wrapper.in: Unset GUILE_LOAD_PATH.  Also unset
> GUILE_SYSTEM_PATH, for symmetry.  Streamline exec call, using the now fixed
> '-l' option.
> (ld-wrapper): Fix args being a nested list, and strip its arg0.
>
> Change-Id: Iaaa721019f3646d851202bb018214ec9fcc04fd4

Pushed to core-updates.

Closing!

-- 
Thanks,
Maxim




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sun, 07 Apr 2024 11:24:32 GMT) Full text and rfc822 format available.

This bug report was last modified 1 year and 67 days ago.

Previous Next


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