unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
* Problem building disk-image with guix from git
@ 2020-09-26  1:05 Fredrik Salomonsson
  0 siblings, 0 replies; only message in thread
From: Fredrik Salomonsson @ 2020-09-26  1:05 UTC (permalink / raw)
  To: help-guix

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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-09-26  1:06 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-26  1:05 Problem building disk-image with guix from git Fredrik Salomonsson

unofficial mirror of help-guix@gnu.org 

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://yhetil.org/guix-user/0 guix-user/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 guix-user guix-user/ https://yhetil.org/guix-user \
		help-guix@gnu.org
	public-inbox-index guix-user

Example config snippet for mirrors.
Newsgroups are available over NNTP:
	nntp://news.yhetil.org/yhetil.gnu.guix.user
	nntp://news.gmane.io/gmane.comp.gnu.guix.user


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git