guix pull: error: build of `/gnu/store/njrsv4nw8v750zn6ajdcn8495592q6jb-compute-guix-derivation.drv' failed

  • Done
  • quality assurance status badge
Details
3 participants
  • Peter Kois
  • Ludovic Courtès
  • Maxime Devos
Owner
unassigned
Submitted by
Peter Kois
Severity
normal
P
P
Peter Kois wrote on 24 Jan 2022 07:24
(address . bug-guix@gnu.org)
f1fe7a3f-0c34-33a1-6b54-3afa794e5554@gmail.com
While trying to upgrade guix, I did encounter to this error:

root@timelinex:~# guix pull
guile: warning: failed to install locale
hint: Consider installing the `glibc-utf8-locales' or `glibc-locales'
package and defining `GUIX_LOCPATH', along these lines:

     guix package -i glibc-utf8-locales
     export GUIX_LOCPATH="$HOME/.guix-profile/lib/locale"

See the "Application Setup" section in the manual, for more info.

Updating channel 'guix' from Git repository at
Building from this channel:
substitute: updating substitutes from 'https://ci.guix.gnu.org'... 100.0%
The following derivations will be built:
   /gnu/store/rxlkjpigq9i7a81g5p1gkvxmybsmcxgx-module-import-compiled.drv
   /gnu/store/njrsv4nw8v750zn6ajdcn8495592q6jb-compute-guix-derivation.drv
building
/gnu/store/rxlkjpigq9i7a81g5p1gkvxmybsmcxgx-module-import-compiled.drv...
  4%
[#######                                                                                                                                                                               
]builder for
`/gnu/store/rxlkjpigq9i7a81g5p1gkvxmybsmcxgx-module-import-compiled.drv'
failed with exit code 1
build of
/gnu/store/rxlkjpigq9i7a81g5p1gkvxmybsmcxgx-module-import-compiled.drv
failed
View build log at
'/var/log/guix/drvs/rx/lkjpigq9i7a81g5p1gkvxmybsmcxgx-module-import-compiled.drv.bz2'.
cannot build derivation
`/gnu/store/njrsv4nw8v750zn6ajdcn8495592q6jb-compute-guix-derivation.drv':
1 dependencies couldn't be built
guix pull: error: build of
`/gnu/store/njrsv4nw8v750zn6ajdcn8495592q6jb-compute-guix-derivation.drv'
failed


Full log:


[ 1/78] Loading './gcrypt/hash.scm'...
[ 2/78] Loading './git.scm'...
[ 3/78] Loading './gnu/packages/bootstrap.scm'...
;;; Failed to autoload make-zlib-input-port in (zlib):
;;; missing interface for module (zlib)
;;; Failed to autoload make-zlib-input-port in (zlib):
;;; missing interface for module (zlib)
;;; Failed to autoload make-zlib-output-port in (zlib):
;;; missing interface for module (zlib)
;;; Failed to autoload make-zlib-output-port in (zlib):
;;; missing interface for module (zlib)
/gnu/store/p5si0c0k25raxc2zibiii4v531hk0waa-module-import/guix/grafts.scm:137:7:
warning: 'build-expression->derivation' is deprecated, use
'gexp->derivation' instead
Backtrace:
In ice-9/boot-9.scm:
   2312:4 19 (save-module-excursion _)
  3014:26 18 (_)
In unknown file:
          17 (primitive-load-path "gnu/packages" #<procedure 7afd20 ?>)
In ice-9/eval.scm:
   721:20 16 (primitive-eval _)
In ice-9/psyntax.scm:
  1235:36 15 (expand-top-sequence _ _ _ #f _ _ _)
  1182:24 14 (parse _ (("placeholder" placeholder)) ((top) #(# # ?)) ?)
   285:10 13 (parse _ (("placeholder" placeholder)) (()) _ c&e (eval) ?)
In ice-9/eval.scm:
   293:34 12 (_ #<module (#{ g74}#) b28c80>)
In ice-9/boot-9.scm:
   2874:4 11 (define-module* _ #:filename _ #:pure _ #:version _ # _ ?)
  2887:24 10 (_)
   222:17  9 (map1 (((guix packages)) ((guix ui)) ((guix utils)) # ?))
  2800:17  8 (resolve-interface (guix packages) #:select _ #:hide _ # ?)
In ice-9/threads.scm:
    390:8  7 (_ _)
In ice-9/boot-9.scm:
  2726:13  6 (_)
In ice-9/threads.scm:
    390:8  5 (_ _)
In ice-9/boot-9.scm:
  2994:20  4 (_)
   2312:4  3 (save-module-excursion _)
  3014:26  2 (_)
In unknown file:
           1 (primitive-load-path "guix/packages" #<procedure 790020?>)
In ice-9/boot-9.scm:
   3492:0  0 (module-re-export! #<directory (guix packages) b28960> # ?)

ice-9/boot-9.scm:3492:0: In procedure module-re-export!:
Wrong number of arguments to #<procedure module-re-export! (m names)>


Sincerely, Peter Kois
M
M
Maxime Devos wrote on 19 Mar 2022 23:20
guix pull from 1.1.0 --> 29091731a0c6cb649cdfd72297575fe2bb2a9591 fails
(address . 53496@debbugs.gnu.org)
861ffd27bf4ada1dd6c1d37208d818b3df83e0cd.camel@telenet.be
Hi,

I got the exact same error, but with time-machine, when travelling
from 1.1.0 to 29091731a0c6cb649cdfd72297575fe2bb2a9591 (actually,
29091731a0c6cb649cdfd72297575fe2bb2a9591 + a patch, but that probably
does not matter).

TBI ...

Greetings,
Maxime.
-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYjZXGxccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7mOSAQD9BIwqabK+OdHeQftUgiouxrcE
LL4AV2raw1G9bYV9UgEAwLv5iU/2KvbJ5T1VakVcAg7Fu4kW7MRkpenH+v4dqAY=
=EwwK
-----END PGP SIGNATURE-----


M
M
Maxime Devos wrote on 19 Mar 2022 23:28
(address . 53496@debbugs.gnu.org)
0d089b384be80e404ade7f9cf1647432aa1877f1.camel@telenet.be
Maxime Devos schreef op za 19-03-2022 om 23:20 [+0100]:
Toggle quote (9 lines)
> Hi,
>
> I got the exact same error, but with time-machine, when travelling
> from 1.1.0 to 29091731a0c6cb649cdfd72297575fe2bb2a9591 (actually,
> 29091731a0c6cb649cdfd72297575fe2bb2a9591 + a patch, but that probably
> does not matter).
>
> TBI ...

The only use of 'module-re-export!' in current Guix is

(module-re-export! (current-module) '(delete) #:replace? #t)

from (guix packages).

Probably the issue is that 'module-re-export!' did not always support
#:replace?, and that 1.1.0 uses an old version of Guile with the old
calling convention when computing the derivation ... (I don't know
if these details are actually true, it's a bit of a guess.)

I guess the patch from e89f767ce8990f4959616031e3c98fbfe92a008b, while
fixing time-travelling from v1.2.0 to current Guix, broke time-
travelling from v1.1.0 to current Guix.

Toggle quote (2 lines)
> Greetings,
> Maxime.
-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYjZZChccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7vLXAP4mC3PFhe8yGRku8Y887Hn+gwNY
JQSbW20ois6D/6B3VwD+J3Lw0EiwiGAVQp+H2e5NkfzGxvdOrFzDZ2yPBF+RvAw=
=segV
-----END PGP SIGNATURE-----


M
M
Maxime Devos wrote on 19 Mar 2022 23:33
(address . 53496@debbugs.gnu.org)
63a594ce58660df56b8a9437f4be00e438ceb295.camel@telenet.be
Maxime Devos schreef op za 19-03-2022 om 23:28 [+0100]:
Toggle quote (11 lines)
> The only use of 'module-re-export!' in current Guix is
>
>   (module-re-export! (current-module) '(delete) #:replace? #t)
>
> from (guix packages).
>
> Probably the issue is that 'module-re-export!' did not always support
> #:replace?, and that 1.1.0 uses an old version of Guile with the old
> calling convention when computing the derivation ... (I don't know
> if these details are actually true, it's a bit of a guess.)

The extra argument of module-re-export! was introduced with commit
cf08dbdc189f0005cab6f2ec7b23ed9d150ec43d in Guile. It seems like the
first Guile version after this commit is v2.2.7. Let's try
making the '#:replace? ...' conditional upon Guile>2.2 ...
-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYjZaOhccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7ujQAQD/sYQ0st/eF7IAb4HIALPXe1af
9Ayx5kcpNJnBmNKiyAEAyUJUvkZJ+EONeGHDF3q2d3tMu8N+oASs/hlFppkGmgE=
=b0YL
-----END PGP SIGNATURE-----


M
M
Maxime Devos wrote on 19 Mar 2022 23:58
Re: bug#53496: guix pull from 1.1.0 --> 29091731a0c6cb649cdfd72297575fe2bb2a9591 fails
(address . 53496@debbugs.gnu.org)
8a7f6754a266ee4f1c91cac87b96a877de0fb2af.camel@telenet.be
Maxime Devos schreef op za 19-03-2022 om 23:33 [+0100]:
Toggle quote (17 lines)
> Maxime Devos schreef op za 19-03-2022 om 23:28 [+0100]:
> > The only use of 'module-re-export!' in current Guix is
> >
> >   (module-re-export! (current-module) '(delete) #:replace? #t)
> >
> > from (guix packages).
> >
> > Probably the issue is that 'module-re-export!' did not always support
> > #:replace?, and that 1.1.0 uses an old version of Guile with the old
> > calling convention when computing the derivation ... (I don't know
> > if these details are actually true, it's a bit of a guess.)
>
> The extra argument of module-re-export! was introduced with commit
> cf08dbdc189f0005cab6f2ec7b23ed9d150ec43d in Guile. It seems like the
> first Guile version after this commit is v2.2.7. Let's try
> making the '#:replace? ...' conditional upon Guile>2.2 ...

I think I have a fix, see attached patch. Currently it's at ‘building
...-module-import-compiled.drv’ (97%).

Greetings,
Maxime.
From f9a53bb4bccb55bb6d0f55daed778ee86eb50f5e Mon Sep 17 00:00:00 2001
From: Maxime Devos <maximedevos@telenet.be>
Date: Sat, 19 Mar 2022 22:39:33 +0000
Subject: [PATCH] packages: Fix time-travel from Guix 1.1.0 / Guile < 2.2.7.

* guix/packages.scm: Only set #:replace? #true when Guile is >= 2.2.7.

Reported-By: Peter Kois <kangus@gmail.com>
---
guix/packages.scm | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)

Toggle diff (35 lines)
diff --git a/guix/packages.scm b/guix/packages.scm
index 9d5b23eb8a..37f5a6aa5f 100644
--- a/guix/packages.scm
+++ b/guix/packages.scm
@@ -7,6 +7,7 @@
;;; Copyright © 2019 Marius Bakke <mbakke@fastmail.com>
;;; Copyright © 2020, 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;; Copyright © 2021 Chris Marusich <cmmarusich@gmail.com>
+;;; Copyright © 2022 Maxime Devos <maximedevos@telenet.be>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -182,8 +183,16 @@
;; The 'source-module-closure' procedure ca. 1.2.0 did not recognize
;; #:re-export-and-replace: <https://issues.guix.gnu.org/52694>.
-;; Work around it.
-(module-re-export! (current-module) '(delete) #:replace? #t)
+;; Work around it. The #:replace? argument is only supported by
+;; Guile 2.2.7 and later, work-around it if necessary to allow
+;; time-travel from 1.1.0, see <https://issues.guix.gnu.org/53765>.
+(let ((major (string->number (major-version))))
+ (if (or (>= major 3)
+ (and (= major 2)
+ (= (string->number (minor-version)) 2) ; there is no Guile 2.3.X
+ (>= (string->number (micro-version)) 7)))
+ (module-re-export! (current-module) '(delete) #:replace? #t)
+ (module-re-export! (current-module) '(delete))))
;;; Commentary:
;;;

base-commit: 29091731a0c6cb649cdfd72297575fe2bb2a9591
--
2.30.2
-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYjZgBRccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7gVEAP0RBlLPMJprVAD2ZVTzambfJU2k
4vWyDJ3F/3fam4rtFQEAjj1t43+mEF3yrgWHbiuBmQdpIfpQyQ3qdG+0883HIAo=
=KagS
-----END PGP SIGNATURE-----


M
M
Maxime Devos wrote on 20 Mar 2022 10:03
(address . 53496@debbugs.gnu.org)
edc9eccb022ee03bb44635cc627c10dc60ee5b7a.camel@telenet.be
Maxime Devos schreef op za 19-03-2022 om 23:58 [+0100]:
I think I have a fix, see attached patch.  Currently it's at
‘building
...-module-import-compiled.drv’ (97%).

It completed successfully!

# in a v1.1.0 checkout
$ ./pre-inst-env guix time-machine -C ch.scm --url=$PWD/../guix --commit=[latest commit] -- describe
Toggle quote (1 lines)
> [...]
guix f9a53bb
repository URL: $HOME/guix-old-testing/../guix
commit: f9a53bb4bccb55bb6d0f55daed778ee86eb50f5e

Greetings,
Maxime.
-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYjbtxRccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7t2OAQC0le+OuATxBN6+OiKEq11WpL3k
FSaYupJL6QfyBP5YagD/WsoFlYWhc5uSRSoyMOkdiAWwUosbk0/5GIn82r1lpAc=
=iKZ9
-----END PGP SIGNATURE-----


L
L
Ludovic Courtès wrote on 21 Mar 2022 16:19
(name . Maxime Devos)(address . maximedevos@telenet.be)
878rt3jpt9.fsf@gnu.org
Hi,

Maxime Devos <maximedevos@telenet.be> skribis:

Toggle quote (10 lines)
> From f9a53bb4bccb55bb6d0f55daed778ee86eb50f5e Mon Sep 17 00:00:00 2001
> From: Maxime Devos <maximedevos@telenet.be>
> Date: Sat, 19 Mar 2022 22:39:33 +0000
> Subject: [PATCH] packages: Fix time-travel from Guix 1.1.0 / Guile < 2.2.7.
>
> * guix/packages.scm: Only set #:replace? #true when Guile is >= 2.2.7.
>
> Fixes: <https://issues.guix.gnu.org/53765>
> Reported-By: Peter Kois <kangus@gmail.com>

Woow, great investigative work! I’ve applied the patch now.

I’d really like to have that tested in continuous integration…

Thanks!

Ludo’.
Closed
M
M
Maxime Devos wrote on 21 Mar 2022 19:33
(name . Ludovic Courtès)(address . ludo@gnu.org)
0d449cdc07ed6813ba83ab11bbda208342bd401b.camel@telenet.be
Ludovic Courtès schreef op ma 21-03-2022 om 16:19 [+0100]:
Toggle quote (6 lines)
> > * guix/packages.scm: Only set #:replace? #true when Guile is >=
> > 2.2.7.
> >
> > Fixes: <https://issues.guix.gnu.org/53765>
> > Reported-By: Peter Kois <kangus@gmail.com>

Oops that was the wrong bug number ...
-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYjjFCBccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7ru0AP99dhzpj3ceKMBKzciJpYhcH7YE
Txa0jP4xK6SrV087NQD+JTWjO+JJFhDQyfepkvnZaVxZn7w8HUEqxDqbwC8/+AE=
=1bJj
-----END PGP SIGNATURE-----


?