Subject: Re: [PATCH v2 0/2] Using the right locales on GNU/Hurd

From: Janneke Nieuwenhuizen <[email-masked]>
Date: Wed, 29 Nov 2023 18:39:56 +0100

Ludovic Courtès writes:

Hi!

This looks great...but I've added your patches to the bottom of
hurd-team, and also added a HACK commit with

--8<---------------cut here---------------start------------->8---
diff --git a/build-aux/compile-as-derivation.scm b/build-aux/compile-as-derivation.scm
index d945a8c79c..3bc4509f7a 100644
--- a/build-aux/compile-as-derivation.scm
+++ b/build-aux/compile-as-derivation.scm
@@ -51,7 +51,8 @@
            (mlet* %store-monad ((source (interned-file source "guix-source"
                                                        #:select? git?
                                                        #:recursive? #t))
-                                (drv    (build source #:pull-version 1)))
+                                (drv    (build source #:pull-version 1
+                                               #:system "i586-gnu")))
              (mbegin %store-monad
                (show-what-to-build* (list drv))
                (built-derivations (list drv))
--8<---------------cut here---------------end--------------->8---

...but running `make as-derivation' gives

--8<---------------cut here---------------start------------->8---
$ make as-derivation
Building Guix in Guix...
warning: 'nix-server-socket' is deprecated, use 'store-connection-socket' instead
warning: 'nix-server-major-version' is deprecated, use 'store-connection-major-version' instead
warning: 'nix-server-minor-version' is deprecated, use 'store-connection-minor-version' instead
Computing Guix derivation for 'i586-gnu'... |process 7189 acquired build slot '/var/guix/offload/kluit.dezyne.org:10022/0'
\normalized load on machine 'kluit.dezyne.org' is 0.91
waiting for locks or build slots...
|process 7189 acquired build slot '/var/guix/offload/kluit.dezyne.org:10022/0'
\normalized load on machine 'kluit.dezyne.org' is 0.64
\guix offload: sending 0 store items (0 MiB) to 'kluit.dezyne.org'...
offloading '/gnu/store/3hc9fardc4pwmcjh6x5x6mi1yicvy861-glibc-utf8-locales-2.37.drv' to 'kluit.dezyne.org'...
@ build-remote /gnu/store/3hc9fardc4pwmcjh6x5x6mi1yicvy861-glibc-utf8-locales-2.37.drv kluit.dezyne.org
retrieving 1 store item from 'kluit.dezyne.org'...
-importing file or directory '/gnu/store/30knn5niz8j43aqly8qy4k20755n92kv-glibc-utf8-locales-2.37'...
guix offload: error: corrupt input while restoring '/gnu/store/30knn5niz8j43aqly8qy4k20755n92kv-glibc-utf8-locales-2.37' from #<input-output: channel (open) 7f8c392faee0>
Backtrace:
cannot build derivation `/gnu/store/2d6gh47cnnsv8zf5dvznlsszai4ry5qc-guile-3.0.9.drv': 1 dependencies couldn't be built
          16 (primitive-load "/gnu/store/9glf45m6x8icvia8421jz5gapxkgr3zi-compute-guix-derivation")
In ice-9/eval.scm:
    155:9 15 (_ _)
    159:9 14 (_ #(#(#(#(#(#(#(#(#(#(#(#(#(#(#(#(#<directory (guile-u?> ?) ?) ?) ?) ?) ?) ?) ?) ?) ?) ?) ?) ?) ?) ?) ?))
In ice-9/boot-9.scm:
    152:2 13 (with-fluid* _ _ _)
    152:2 12 (with-fluid* _ _ _)
In ./guix/store.scm:
  2168:24 11 (run-with-store #<store-connection 256.99 7faed7dee280> #<procedure 7faec76a3d20 at ./guix/self.scm:13?> ?)
In ./guix/self.scm:
   1354:2 10 (_ #<store-connection 256.99 7faed7dee280>)
In ./guix/packages.scm:
  2033:17  9 (_ #<store-connection 256.99 7faed7dee280>)
In ./guix/store.scm:
  2168:24  8 (run-with-store #<store-connection 256.99 7faed7dee280> #<procedure 7faec76bfe40 at ./guix/store.scm:1?> ?)
   1996:8  7 (_ #<store-connection 256.99 7faed7dee280>)
  2040:38  6 (_ #<store-connection 256.99 7faec95b7aa0>)
In ./guix/grafts.scm:
   323:16  5 (graft-derivation #<store-connection 256.99 7faec95b7aa0> #<derivation /gnu/store/2d6gh47cnnsv8zf5dvzn?> ?)
    285:4  4 (_ #<vlist ()>)
    173:4  3 (non-self-references #<store-connection 256.99 7faec95b7aa0> #<derivation /gnu/store/2d6gh47cnnsv8zf5d?> ?)
   175:20  2 (_ #t)
In ./guix/store.scm:
  1417:15  1 (_ #<store-connection 256.99 7faec95b7aa0> ("/gnu/store/2d6gh47cnnsv8zf5dvznlsszai4ry5qc-guile-3.0.9.?") ?)
  1417:15  0 (loop #f)

./guix/store.scm:1417:15: In procedure loop:
ERROR:
  1. &store-protocol-error:
      message: "build of `/gnu/store/2d6gh47cnnsv8zf5dvznlsszai4ry5qc-guile-3.0.9.drv' failed"
      status: 1
error: You found a bug: the program '/gnu/store/9glf45m6x8icvia8421jz5gapxkgr3zi-compute-guix-derivation'
failed to compute the derivation for Guix (version: "20231129.17"; system: "i586-gnu";
host version: "1.4.0-13.e863274"; pull-version: 1).
Please report the COMPLETE output above by email to <[email-masked]>.

make: *** [Makefile:7125: as-derivation] Error 1
[2]18:23:55 janneke@drakenpad:~/src/guix/hurd-team [env]
--8<---------------cut here---------------end--------------->8---

What am I missing?

(Thanks a lot for looking into this and working on my patches!)

Greetings,
Janneke

-- 
Janneke Nieuwenhuizen <[email-masked]>  | GNU LilyPond https://LilyPond.org
Freelance IT https://www.JoyOfSource.com | Avatar® https://AvatarAcademy.com