From: Fredrik Salomonsson <plattfot@posteo.net>
To: help-guix <help-guix@gnu.org>
Subject: Problem building disk-image with guix from git
Date: Fri, 25 Sep 2020 18:05:57 -0700 [thread overview]
Message-ID: <87h7rlcpoq.fsf@posteo.net> (raw)
Hi guix,
See if I can send this to the right mailing list this time...
I thought I would test out the patch from https://issues.guix.info/43366
on my laptop. I cloned the guix repo (checksum: d48b17a), applied the
patch from 43366. Then followed the steps in the manual:
```
$ guix environment guix
$ ./bootstrap
$ ./configure --localstatedir=/var
$ make
```
Then launched the daemon in one shell:
```
$ sudo -E ./pre-inst-env guix-daemon --build-users-group=guixbuild
```
And tried to build the disk image in another
```
$ ./pre-inst-env guix system disk-image --file-system-type=iso9660 gnu/system/install.scm
```
But getting this error:
```
substitute: Backtrace:
substitute: In ice-9/boot-9.scm:
substitute: 3223:13 19 (_)
substitute: In ice-9/threads.scm:
substitute: 390:8 18 (_ _)
substitute: In ice-9/boot-9.scm:
substitute: 3507:20 17 (_)
substitute: 2806:4 16 (save-module-excursion _)
substitute: 3527:26 15 (_)
substitute: In unknown file:
substitute: 14 (primitive-load-path "guix/store" #<procedure 7f12fe96f…>)
substitute: In guix/store.scm:
substitute: 23:0 13 (_)
substitute: In ice-9/boot-9.scm:
substitute: 3380:4 12 (define-module* _ #:filename _ #:pure _ #:version _ # _ …)
substitute: 3393:24 11 (_)
substitute: 222:29 10 (map1 (((guix utils)) ((guix config)) ((guix #)) ((…)) …))
substitute: 222:29 9 (map1 (((guix config)) ((guix deprecation)) ((guix …)) …))
substitute: 222:29 8 (map1 (((guix deprecation)) ((guix memoization)) ((…)) …))
substitute: 222:29 7 (map1 (((guix memoization)) ((guix serialization)) (#) …))
substitute: 222:29 6 (map1 (((guix serialization)) ((guix monads)) ((# #)) …))
substitute: 222:29 5 (map1 (((guix monads)) ((guix records)) ((guix #)) (#) …))
substitute: 222:29 4 (map1 (((guix records)) ((guix base16)) ((guix #)) (#) …))
substitute: 222:29 3 (map1 (((guix base16)) ((guix base32)) ((gcrypt #)) # …))
substitute: 222:29 2 (map1 (((guix base32)) ((gcrypt hash)) ((guix #)) (#) …))
substitute: 222:17 1 (map1 (((gcrypt hash)) ((guix profiling)) ((rnrs #)) # …))
substitute: 3300:6 0 (resolve-interface (gcrypt hash) #:select _ #:hide _ # _ …)
substitute:
substitute: ice-9/boot-9.scm:3300:6: In procedure resolve-interface:
substitute: no code for module (gcrypt hash)
guix system: error: `/home/plattfot/projects/guix/scripts/guix substitute' died unexpectedly
```
I tried running the guix system command in a guix enviroment:
```
$ guix environment guix --ad-hoc guile guild-gcrypt
```
Same error.
This is what changed when I applied the patch:
```
$ git diff
diff --git a/guix/build/utils.scm b/guix/build/utils.scm
index 419c10195b..cd43c14eab 100644
--- a/guix/build/utils.scm
+++ b/guix/build/utils.scm
@@ -365,6 +365,16 @@ verbose output to the LOG port."
stat
lstat)))
+(define-syntax-rule (warn-on-error expr file)
+ (catch 'system-error
+ (lambda ()
+ expr)
+ (lambda args
+ (format (current-error-port)
+ "warning: failed to delete ~a: ~a~%"
+ file (strerror
+ (system-error-errno args))))))
+
(define* (delete-file-recursively dir
#:key follow-mounts?)
"Delete DIR recursively, like `rm -rf', without following symlinks. Don't
@@ -375,10 +385,10 @@ errors."
(or follow-mounts?
(= dev (stat:dev stat))))
(lambda (file stat result) ; leaf
- (delete-file file))
+ (warn-on-error (delete-file file) file))
(const #t) ; down
(lambda (dir stat result) ; up
- (rmdir dir))
+ (warn-on-error (rmdir dir) dir))
(const #t) ; skip
(lambda (file stat errno result)
(format (current-error-port)
```
Anyone have any pointers what I might have done wrong?
Thanks
--
s/Fred[re]+i[ck]+/Fredrik/g
reply other threads:[~2020-09-26 1:06 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=87h7rlcpoq.fsf@posteo.net \
--to=plattfot@posteo.net \
--cc=help-guix@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.
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).