From: Maxime Devos <maximedevos@telenet.be>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: 47221@debbugs.gnu.org
Subject: bug#47221: Guile not in native-inputs when it should
Date: Thu, 18 Mar 2021 10:29:59 +0100 [thread overview]
Message-ID: <d62b3877cce0f3a6c16c62a7047ac70e5fc790d6.camel@telenet.be> (raw)
In-Reply-To: <c34c473b38b2c659947d684d357a31a2a3ece480.camel@telenet.be>
[-- Attachment #1: Type: text/plain, Size: 2947 bytes --]
On Wed, 2021-03-17 at 22:58 +0100, Maxime Devos wrote:
> [...]
> Some suspicious things:
> * [...]
> * clipmenu & others use "wrap-script" to define wrapper scripts
> (in this case "guile" does not have to be in native-inputs).
> The "wrap-script" procedure from (guix build utils) uses the
> "which" procedure to determine where guile is located ...
> but this is incorrect when cross-compiling!
Demonstration (host system: x86-64-linux with a childhurd running, without qemu binfmt),
using the "bats" package (the "bats" package is choosen because it doesn't have many
dependencies and it uses wrap-script). ("bats" actually uses wrap-script correctly,
so first remove the following line
":" (assoc-ref %build-inputs "guile") "/bin"
from the package definition to simulate a misbehaving package)
./pre-inst-env guix build --system=i586-gnu --target=x86-64-linux bats
--> tcl fails to build with plenty of failing test cases
^ TODO submit a bug report, for now try without tests
./pre-inst-env guix build --system=i586-gnu --target=x86-64-linux bats --without-tests=tcl
^ TODO this hangs the childhurd (something about paging?)
./pre-inst-env guix build --target=aarch64-linux bats
(warning: this takes some time building the cross-compiler)
--> install.sh: line 15: /gnu/store/...-coreutils-8.32/bin/install: cannot execute binary file: Exec format error
After adding "coreutils" to the native-inputs:
./pre-inst-env guix build --target=aarch64-linux bats
(success! --> some /gnu/store/something path $STORE_ITEM)
Let's look at $STORE_ITEM/bin/bats:
(start snip)
#!#f --no-auto-compile
#!#; Guix wrapper
#\-(begin (let ((current (getenv "PATH"))) (setenv "PATH" (if current (string-append "/gnu/store/qrj2w7a8ms7rkyvqhnrv8wrvqnbwv9bm-bash-
5.0.16/bin:/gnu/store/n8awazyldv9hbzb7pjcw76hiifmvrpvd-coreutils-8.32/bin:/gnu/store/3xi5vprn92r0jcb03lk9ykind5pi789j-grep-3.4/bin:/path-
not-set" ":" current) "/gnu/store/qrj2w7a8ms7rkyvqhnrv8wrvqnbwv9bm-bash-5.0.16/bin:/gnu/store/n8awazyldv9hbzb7pjcw76hiifmvrpvd-coreutils-
8.32/bin:/gnu/store/3xi5vprn92r0jcb03lk9ykind5pi789j-grep-3.4/bin:/path-not-set"))))
#\-(let ((cl (command-line))) (apply execl "/gnu/store/qrj2w7a8ms7rkyvqhnrv8wrvqnbwv9bm-bash-5.0.16/bin/bash" (car cl) (cons (car cl)
(append (quote ("")) cl))))
#!/gnu/store/qrj2w7a8ms7rkyvqhnrv8wrvqnbwv9bm-bash-5.0.16/bin/bash
set -e
BATS_READLINK='true'
[...]
(end snip)
I was worried for a moment that the inputs in "inputs" would contribute to
$PATH even when cross-compiling, but this turns out not to be the case.
However, I believe "wrap-script" should raise some kind of exception
instead of trying to use "#f" as interpreter.
--
Btw., "wrap-program" also uses "which" (but for finding the shell),
but fixing that would entail a world-rebuild as "wrap-program" doesn't
have a keyword argument
> Greetings,
> Maxime
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 260 bytes --]
next prev parent reply other threads:[~2021-03-18 9:34 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <87y2ewyv7o.fsf@ngyro.com>
[not found] ` <20210309193925.15447-1-samplet@ngyro.com>
[not found] ` <7a04ca46ee7f332e6a31cecbdf9ad4b4133a86f3.camel@telenet.be>
[not found] ` <87zgz1y030.fsf_-_@gnu.org>
2021-03-17 21:58 ` bug#47221: Guile not in native-inputs when it should Maxime Devos
2021-03-18 7:18 ` Maxime Devos
2021-03-18 9:29 ` Maxime Devos [this message]
2021-03-18 14:01 ` Maxime Devos
2021-03-18 19:08 ` Maxime Devos
2021-03-20 21:45 ` bug#47221: [PATCH v2]: Correct some inputs / native-inputs issues with guile Maxime Devos
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=d62b3877cce0f3a6c16c62a7047ac70e5fc790d6.camel@telenet.be \
--to=maximedevos@telenet.be \
--cc=47221@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).