copy-build-system assumes that strip-flags, strip-directories is a S-exp, but it isn't.

  • Done
  • quality assurance status badge
Details
2 participants
  • Ludovic Courtès
  • Maxime Devos
Owner
unassigned
Submitted by
Maxime Devos
Severity
normal
M
M
Maxime Devos wrote on 8 Oct 2022 20:52
(address . bug-guix@gnu.org)
93a98b47-2912-e854-dd2f-8c48f49fac92@telenet.be
Hi,
In commit
the default 'strip-flags' and 'strip-directories' argument were changed
from a S-exp to %strip-flags and %strip-directories from (guix
build-system gnu).
This is fine, except for copy-build doing (sexp->gexp ...) on those,
even though %strip-flags etc. are G-exps, not S-exps, causing errors like
Toggle quote (4 lines)
> ice-9/read.scm:126:4: In procedure read-expr*:
> /gnu/store/abb0wz0223bjsxkw9av768szz955m2xh-openjpeg-data-2021.09.26-builder:1:2504: Unknown # object: "#<"
> builder for `/gnu/store/qbc93ywsbm3bwwiqn7h8fv124i1yqh53-openjpeg-data-2021.09.26.drv' failed with exit code 1
> derivation '/gnu/store/qbc93ywsbm3bwwiqn7h8fv124i1yqh53-openjpeg-data-2021.09.26.drv' offloaded to '141.80.167.174' failed: build of `/gnu/store/qbc93ywsbm3bwwiqn7h8fv124i1yqh53-openjpeg-data-2021.09.26.drv' failed
Changing '(sexp->gexp strip-flags)' to 'strip-flags' and likewise for
'strip-directories' should fix things (unverified).
Greetings,
Maxime.
Attachment: OpenPGP_signature
M
M
M
Maxime Devos wrote on 9 Oct 2022 11:39
[core-updates] build-system: Fix uses of #:strip-flags and #:strip-directories.
(address . 58384@debbugs.gnu.org)(name . Maxime Devos)(address . maximedevos@telenet.be)
20221009093916.11252-1-maximedevos@telenet.be
This fixes a bug introduced in ccc2658e2a111590ec25e308946e47a24d357785,

Tested with "./pre-inst-env guix build openjpeg-data".


* guix/build-system/copy.scm (copy-build): 'strip-flags' and
'#:strip-directories' are G-exps, not S-exps, so don't use sexp->gexp.
* guix/build-system/cmake.scm (copy-build): Likewise.
* guix/build-system/glib-or-gtk.scm
(glib-or-gtk-build,glib-or-gtk-cross-build): Likewise.
* guix/build-system/maven.scm (maven-build): Likewise.
* guix/build-system/meson.scm
(meson-build,meson-cross-build): Likewise.
---
guix/build-system/cmake.scm | 4 ++--
guix/build-system/copy.scm | 4 ++--
guix/build-system/glib-or-gtk.scm | 8 ++++----
guix/build-system/maven.scm | 4 ++--
guix/build-system/meson.scm | 8 ++++----
5 files changed, 14 insertions(+), 14 deletions(-)

Toggle diff (105 lines)
diff --git a/guix/build-system/cmake.scm b/guix/build-system/cmake.scm
index ffd04867a2..effb54f044 100644
--- a/guix/build-system/cmake.scm
+++ b/guix/build-system/cmake.scm
@@ -149,8 +149,8 @@ (define build
#:validate-runpath? #$validate-runpath?
#:patch-shebangs? #$patch-shebangs?
#:strip-binaries? #$strip-binaries?
- #:strip-flags #$(sexp->gexp strip-flags)
- #:strip-directories #$(sexp->gexp strip-directories))))))
+ #:strip-flags #$strip-flags
+ #:strip-directories #$strip-directories)))))
(mlet %store-monad ((guile (package->derivation (or guile (default-guile))
system #:graft? #f)))
diff --git a/guix/build-system/copy.scm b/guix/build-system/copy.scm
index ea85719286..bf7fcaedba 100644
--- a/guix/build-system/copy.scm
+++ b/guix/build-system/copy.scm
@@ -122,8 +122,8 @@ (define builder
#:validate-runpath? #$validate-runpath?
#:patch-shebangs? #$patch-shebangs?
#:strip-binaries? #$strip-binaries?
- #:strip-flags #$(sexp->gexp strip-flags)
- #:strip-directories #$(sexp->gexp strip-directories))))))
+ #:strip-flags #$strip-flags
+ #:strip-directories #$strip-directories)))))
(mlet %store-monad ((guile (package->derivation (or guile (default-guile))
system #:graft? #f)))
diff --git a/guix/build-system/glib-or-gtk.scm b/guix/build-system/glib-or-gtk.scm
index a9041bb9f9..f4f431273b 100644
--- a/guix/build-system/glib-or-gtk.scm
+++ b/guix/build-system/glib-or-gtk.scm
@@ -178,9 +178,9 @@ (define build
#:validate-runpath? #$validate-runpath?
#:patch-shebangs? #$patch-shebangs?
#:strip-binaries? #$strip-binaries?
- #:strip-flags #$(sexp->gexp strip-flags)
+ #:strip-flags #$strip-flags
#:strip-directories
- #$(sexp->gexp strip-directories))))))
+ #$strip-directories)))))
(mlet %store-monad ((guile (package->derivation (or guile (default-guile))
@@ -271,9 +271,9 @@ (define %outputs
#:make-dynamic-linker-cache? #$make-dynamic-linker-cache?
#:patch-shebangs? #$patch-shebangs?
#:strip-binaries? #$strip-binaries?
- #:strip-flags #$(sexp->gexp strip-flags)
+ #:strip-flags #$strip-flags
#:strip-directories
- #$(sexp->gexp strip-directories))))
+ #$strip-directories)))
(mlet %store-monad ((guile (package->derivation (or guile (default-guile))
diff --git a/guix/build-system/maven.scm b/guix/build-system/maven.scm
index c5a26c8754..9a17dea977 100644
--- a/guix/build-system/maven.scm
+++ b/guix/build-system/maven.scm
@@ -183,8 +183,8 @@ (define builder
#:validate-runpath? #$validate-runpath?
#:patch-shebangs? #$patch-shebangs?
#:strip-binaries? #$strip-binaries?
- #:strip-flags #$(sexp->gexp strip-flags)
- #:strip-directories #$(sexp->gexp strip-directories)))))
+ #:strip-flags #$strip-flags
+ #:strip-directories #$strip-directories))))
(mlet %store-monad ((guile (package->derivation (or guile (default-guile))
system #:graft? #f)))
diff --git a/guix/build-system/meson.scm b/guix/build-system/meson.scm
index e75c1a17cb..ba3ffa6b1c 100644
--- a/guix/build-system/meson.scm
+++ b/guix/build-system/meson.scm
@@ -227,8 +227,8 @@ (define build-phases
#:validate-runpath? #$validate-runpath?
#:patch-shebangs? #$patch-shebangs?
#:strip-binaries? #$strip-binaries?
- #:strip-flags #$(sexp->gexp strip-flags)
- #:strip-directories #$(sexp->gexp strip-directories)
+ #:strip-flags #$strip-flags
+ #:strip-directories #$strip-directories
#:elf-directories #$(sexp->gexp elf-directories))))))
(mlet %store-monad ((guile (package->derivation (or guile (default-guile))
@@ -339,8 +339,8 @@ (define build-phases
#:validate-runpath? #$validate-runpath?
#:patch-shebangs? #$patch-shebangs?
#:strip-binaries? #$strip-binaries?
- #:strip-flags #$(sexp->gexp strip-flags)
- #:strip-directories #$(sexp->gexp strip-directories)
+ #:strip-flags #$strip-flags
+ #:strip-directories #$strip-directories
#:elf-directories #$(sexp->gexp elf-directories)))))
(mlet %store-monad ((guile (package->derivation (or guile (default-guile))

base-commit: ccc2658e2a111590ec25e308946e47a24d357785
prerequisite-patch-id: 87e197146284fb770478e0c2d73027e68ee3db6d
prerequisite-patch-id: 32ea6453c34258e3ac8a8766aa14ebb5fe1f5f88
--
2.37.3
L
L
Ludovic Courtès wrote on 9 Oct 2022 18:54
Re: bug#58384: copy-build-system assumes that strip-flags, strip-directories is a S-exp, but it isn't.
(name . Maxime Devos)(address . maximedevos@telenet.be)(address . 58384-done@debbugs.gnu.org)
87fsfx5455.fsf_-_@gnu.org
Hi,

Maxime Devos <maximedevos@telenet.be> skribis:

Toggle quote (16 lines)
> This fixes a bug introduced in ccc2658e2a111590ec25e308946e47a24d357785,
> reported at <https://issues.guix.gnu.org/issue/58384>.
>
> Tested with "./pre-inst-env guix build openjpeg-data".
>
> Fixes: https://issues.guix.gnu.org/issue/58384
>
> * guix/build-system/copy.scm (copy-build): 'strip-flags' and
> '#:strip-directories' are G-exps, not S-exps, so don't use sexp->gexp.
> * guix/build-system/cmake.scm (copy-build): Likewise.
> * guix/build-system/glib-or-gtk.scm
> (glib-or-gtk-build,glib-or-gtk-cross-build): Likewise.
> * guix/build-system/maven.scm (maven-build): Likewise.
> * guix/build-system/meson.scm
> (meson-build,meson-cross-build): Likewise.

Oops. Applied, thanks for the quick fix!

Ludo’.
Closed
?
Your comment

This issue is archived.

To comment on this conversation send an email to 58384@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 58384
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch