unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / Atom feed
* bug#43618: Problem building disk-image with guix from git
@ 2020-09-25 18:11 Fredrik Salomonsson
  2020-09-26  1:04 ` Fredrik Salomonsson
  2020-10-05 12:28 ` Ludovic Courtès
  0 siblings, 2 replies; 6+ messages in thread
From: Fredrik Salomonsson @ 2020-09-25 18:11 UTC (permalink / raw)
  To: 43618


Hi guix,

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] 6+ messages in thread

* bug#43618: Problem building disk-image with guix from git
  2020-09-25 18:11 bug#43618: Problem building disk-image with guix from git Fredrik Salomonsson
@ 2020-09-26  1:04 ` Fredrik Salomonsson
  2020-09-26 15:35   ` Andreas Enge
  2020-10-05 12:28 ` Ludovic Courtès
  1 sibling, 1 reply; 6+ messages in thread
From: Fredrik Salomonsson @ 2020-09-26  1:04 UTC (permalink / raw)
  To: 43618


Please close this issue.

Sent it to the wrong mailing list...

Thanks

-- 
s/Fred[re]+i[ck]+/Fredrik/g




^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#43618: Problem building disk-image with guix from git
  2020-09-26  1:04 ` Fredrik Salomonsson
@ 2020-09-26 15:35   ` Andreas Enge
  0 siblings, 0 replies; 6+ messages in thread
From: Andreas Enge @ 2020-09-26 15:35 UTC (permalink / raw)
  To: Fredrik Salomonsson; +Cc: 43618-done

On Fri, Sep 25, 2020 at 06:04:53PM -0700, Fredrik Salomonsson wrote:
> Please close this issue.
> Sent it to the wrong mailing list...

Done, by sending a message to the address in cc.

Andreas





^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#43618: Problem building disk-image with guix from git
  2020-09-25 18:11 bug#43618: Problem building disk-image with guix from git Fredrik Salomonsson
  2020-09-26  1:04 ` Fredrik Salomonsson
@ 2020-10-05 12:28 ` Ludovic Courtès
  2020-10-05 17:12   ` Fredrik Salomonsson
  1 sibling, 1 reply; 6+ messages in thread
From: Ludovic Courtès @ 2020-10-05 12:28 UTC (permalink / raw)
  To: Fredrik Salomonsson; +Cc: 43618

Hi,

Fredrik Salomonsson <plattfot@posteo.net> skribis:

> $ 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
> ```

[...]

> 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

This is ‘guix substitute’, invoked by ‘guix-daemon’, telling you that it
can’t find guile-gcrypt on its load path.  ‘sudo -E’ should preserve
GUILE_LOAD_PATH from your environment, but was guile-gcrypt in
$GUILE_LOAD_PATH in the first place?

HTH,
Ludo’.




^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#43618: Problem building disk-image with guix from git
  2020-10-05 12:28 ` Ludovic Courtès
@ 2020-10-05 17:12   ` Fredrik Salomonsson
  2020-10-06  7:40     ` Andreas Enge
  0 siblings, 1 reply; 6+ messages in thread
From: Fredrik Salomonsson @ 2020-10-05 17:12 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: 43618


Hi,

Ludovic Courtès <ludo@gnu.org> writes:

> This is ‘guix substitute’, invoked by ‘guix-daemon’, telling you that it
> can’t find guile-gcrypt on its load path.  ‘sudo -E’ should preserve
> GUILE_LOAD_PATH from your environment, but was guile-gcrypt in
> $GUILE_LOAD_PATH in the first place?

Ah, I was running the `guix-daemon` outside the `guix environment guix`
thinking `pre-inst-env` would setup the correct environment. It works
fine now when I launched the `guix-daemon` in the correct environment.

Thanks!

-- 
s/Fred[re]+i[ck]+/Fredrik/g




^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#43618: Problem building disk-image with guix from git
  2020-10-05 17:12   ` Fredrik Salomonsson
@ 2020-10-06  7:40     ` Andreas Enge
  0 siblings, 0 replies; 6+ messages in thread
From: Andreas Enge @ 2020-10-06  7:40 UTC (permalink / raw)
  To: Fredrik Salomonsson; +Cc: 43618-done

On Mon, Oct 05, 2020 at 10:12:00AM -0700, Fredrik Salomonsson wrote:
> It works
> fine now when I launched the `guix-daemon` in the correct environment.

Closing the bug then by sending a message to 43618-done@debbugs.gnu.org.

Andreas





^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-10-06  7:44 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-25 18:11 bug#43618: Problem building disk-image with guix from git Fredrik Salomonsson
2020-09-26  1:04 ` Fredrik Salomonsson
2020-09-26 15:35   ` Andreas Enge
2020-10-05 12:28 ` Ludovic Courtès
2020-10-05 17:12   ` Fredrik Salomonsson
2020-10-06  7:40     ` Andreas Enge

unofficial mirror of bug-guix@gnu.org 

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://yhetil.org/guix-bugs/0 guix-bugs/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-bugs guix-bugs/ https://yhetil.org/guix-bugs \
		bug-guix@gnu.org
	public-inbox-index guix-bugs

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


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