[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#59073] [PATCH] gnu: r-minimal: Avoid referencing /gnu/store/[^-]+-g
From: |
Ludovic Courtès |
Subject: |
[bug#59073] [PATCH] gnu: r-minimal: Avoid referencing /gnu/store/[^-]+-glibc-[^-]+-static. |
Date: |
Tue, 08 Nov 2022 14:09:55 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) |
Hi,
Christopher Baines <mail@cbaines.net> skribis:
> → guix build --target=aarch64-linux-gnu r-minimal
> guix build: error: path ‘/gnu/store/[^-]+-glibc-[^-]+-static’ is not valid
Interesting bug!
I pushed a fix and explanation:
--8<---------------cut here---------------start------------->8---
commit 3bd4b92f55f40119349e39902a9b800de98040d2
build-system/gnu: Turn #:phases into a gexp when cross-compiling.
Previously, we'd get this error:
$ guix build --target=aarch64-linux-gnu r-minimal -d --no-grafts
guix build: error: path ‘/gnu/store/[^-]+-glibc-[^-]+-static’ is not valid
This is because the sexp would be passed as an input of the surrounding
gexp in 'gnu-cross-build', and thus
"/gnu/store/[^-]+-glibc-[^-]+-static" would be interpreted as a source
file name, as in this example:
scheme@(guix gexp)> #~(foo #$(list 'whatever
"/gnu/store/[^-]+-glibc-[^-]+-static"))
$11 = #<gexp (foo #<gexp-input (whatever
"/gnu/store/[^-]+-glibc-[^-]+-static"):out>) 7f098badec30>
scheme@(guix gexp)> (gexp-inputs $11)
$12 = (#<gexp-input "/gnu/store/[^-]+-glibc-[^-]+-static":out>)
Fixes <https://issues.guix.gnu.org/59073>.
Reported by Christopher Baines <mail@cbaines.net>.
* guix/build-system/gnu.scm (gnu-cross-build): When PHASES is a pair,
pass it through 'sexp->gexp'.
--8<---------------cut here---------------end--------------->8---
That said, this code is bogus:
1. We should refrain from using non-literal strings as patterns in
‘substitute*’.
2. We should call ‘%store-directory’ from (guix build utils) instead
of hardcoding “/gnu/store”.
Both of these should be fixed at some point.
Thanks,
Ludo’.
[bug#59073] [PATCH v2] gnu: r-minimal: Avoid referencing /gnu/store/[^-]+-glibc-[^-]+-static., Christopher Baines, 2022/11/08