From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: 69396@debbugs.gnu.org
Subject: [bug#69396] [PATCH core-updates] gnu: ld-wrapper: Also unset GUILE_LOAD_PATH.
Date: Sun, 25 Feb 2024 23:06:06 -0500 [thread overview]
Message-ID: <87sf1flvip.fsf@gmail.com> (raw)
In-Reply-To: <87le7843js.fsf@gnu.org> ("Ludovic Courtès"'s message of "Sun, 25 Feb 2024 22:49:59 +0100")
Hi Ludo,
Thanks for the prompt review!
Ludovic Courtès <ludo@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
next prev parent reply other threads:[~2024-02-26 4:07 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-25 21:17 [bug#69396] [PATCH core-updates] gnu: ld-wrapper: Also unset GUILE_LOAD_PATH Maxim Cournoyer
2024-02-25 21:49 ` Ludovic Courtès
2024-02-26 4:06 ` Maxim Cournoyer [this message]
2024-02-26 3:57 ` [bug#69396] [PATCH core-updates v2] " Maxim Cournoyer
2024-02-27 9:23 ` Ludovic Courtès
2024-03-09 18:37 ` bug#69396: " Maxim Cournoyer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87sf1flvip.fsf@gmail.com \
--to=maxim.cournoyer@gmail.com \
--cc=69396@debbugs.gnu.org \
--cc=ludo@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).