diff mbox

[bug#67507,v2,0/2] Using the right locales on GNU/Hurd

Message ID 87wmu0bgr7.fsf@gnu.org
State New
Headers show

Commit Message

Janneke Nieuwenhuizen Nov. 29, 2023, 5:39 p.m. UTC
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---
--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 <bug-guix@gnu.org>.

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

Comments

Ludovic Courtès Nov. 30, 2023, 9:43 p.m. UTC | #1
Hello!

Janneke Nieuwenhuizen <janneke@gnu.org> skribis:

> $ 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.
[...]

>   1. &store-protocol-error:
>       message: "build of `/gnu/store/2d6gh47cnnsv8zf5dvznlsszai4ry5qc-guile-3.0.9.drv' failed"
>       status: 1

This looks like an offloading issue.

What happens if you do this beforehand:

  guix build /gnu/store/2d6gh47cnnsv8zf5dvznlsszai4ry5qc-guile-3.0.9.drv

?

(Note that I tested on ‘master’ though, so I’m not sure if there are
relevant differences between the two branches; I guess I should know
better…)

Thanks for testing!

Ludo’.
Janneke Nieuwenhuizen Dec. 1, 2023, 7:49 p.m. UTC | #2
Ludovic Courtès writes:

Hi!

> Janneke Nieuwenhuizen <janneke@gnu.org> skribis:
>
>> $ 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.
> [...]
>
>>   1. &store-protocol-error:
>>       message: "build of `/gnu/store/2d6gh47cnnsv8zf5dvznlsszai4ry5qc-guile-3.0.9.drv' failed"
>>       status: 1
>
> This looks like an offloading issue.

Yes, somehow I didn't have the correct chilhurd signging-key registered.

> (Note that I tested on ‘master’ though, so I’m not sure if there are
> relevant differences between the two branches; I guess I should know
> better…)
>
> Thanks for testing!

So, I created a new VM (needed to create yet another guix package update
commit on hurd-team to avoid the circular dependency thing), and (with
my curl fix from yesterday), now "guix shell -D guix" works again; and
without any glibc-2.35 afaics (there's only one x86_64-linux glibc-2.35
in the hurd's store, I guess that's to be expected).

I also tested on hurd-team using the `make as-derivation' trick with
#:system "i586-gnu" in compile-as-derivation.scm, which now fails with

--8<---------------cut here---------------start------------->8---
offloading '/gnu/store/qy6l0gjjpc40frz57fv08shpwj4pssfd-bash-minimal-5.1.16.drv' to 'kluit.dezyne.org'...
@ build-remote /gnu/store/qy6l0gjjpc40frz57fv08shpwj4pssfd-bash-minimal-5.1.16.drv kluit.dezyne.org
Backtrace:
In ice-9/boot-9.scm:
 160: 10 [catch #t #<catch-closure 1ba1510> ...]
In unknown file:
   ?: 9 [apply-smob/1 #<catch-closure 1ba1510>]
In ice-9/boot-9.scm:
  66: 8 [call-with-prompt prompt0 ...]
In ice-9/eval.scm:
 432: 7 [eval # #]
In ice-9/boot-9.scm:
2412: 6 [save-module-excursion #<procedure 1bb2c00 at ice-9/boot-9.scm:4084:3 ()>]
4089: 5 [#<procedure 1bb2c00 at ice-9/boot-9.scm:4084:3 ()>]
1734: 4 [%start-stack load-stack ...]
1739: 3 [#<procedure 1bbb930 ()>]
In unknown file:
   ?: 2 [primitive-load "/gnu/store/dljmqd3db20j9z9bbqlha71p3jzj7cvk-bash-minimal-5.1.16-builder"]
In ice-9/eval.scm:
 432: 1 [eval # ()]
In unknown file:
   ?: 0 [setlocale 6 "en_US.utf8"]

ERROR: In procedure setlocale:
ERROR: In procedure setlocale: Invalid argument
builder for `/gnu/store/qy6l0gjjpc40frz57fv08shpwj4pssfd-bash-minimal-5.1.16.drv' failed with exit code 1
derivation '/gnu/store/qy6l0gjjpc40frz57fv08shpwj4pssfd-bash-minimal-5.1.16.drv' offloaded to 'kluit.dezyne.org' failed: build of `/gnu/store/qy6l0gjjpc40frz57fv08shpwj4pssfd-bash-minimal-5.1.16.drv' failed
--8<---------------cut here---------------end--------------->8---

Not sure where that comes from or if that's a problem

Greetings,
Janneke
Ludovic Courtès Dec. 2, 2023, 11:39 a.m. UTC | #3
Hi,

Janneke Nieuwenhuizen <janneke@gnu.org> skribis:

> So, I created a new VM (needed to create yet another guix package update
> commit on hurd-team to avoid the circular dependency thing), and (with
> my curl fix from yesterday), now "guix shell -D guix" works again; and
> without any glibc-2.35 afaics (there's only one x86_64-linux glibc-2.35
> in the hurd's store, I guess that's to be expected).

Good.

> I also tested on hurd-team using the `make as-derivation' trick with
> #:system "i586-gnu" in compile-as-derivation.scm, which now fails with
>
> offloading '/gnu/store/qy6l0gjjpc40frz57fv08shpwj4pssfd-bash-minimal-5.1.16.drv' to 'kluit.dezyne.org'...
> @ build-remote /gnu/store/qy6l0gjjpc40frz57fv08shpwj4pssfd-bash-minimal-5.1.16.drv kluit.dezyne.org
> Backtrace:
> In ice-9/boot-9.scm:
>  160: 10 [catch #t #<catch-closure 1ba1510> ...]
> In unknown file:
>    ?: 9 [apply-smob/1 #<catch-closure 1ba1510>]
> In ice-9/boot-9.scm:
>   66: 8 [call-with-prompt prompt0 ...]
> In ice-9/eval.scm:
>  432: 7 [eval # #]
> In ice-9/boot-9.scm:
> 2412: 6 [save-module-excursion #<procedure 1bb2c00 at ice-9/boot-9.scm:4084:3 ()>]
> 4089: 5 [#<procedure 1bb2c00 at ice-9/boot-9.scm:4084:3 ()>]
> 1734: 4 [%start-stack load-stack ...]
> 1739: 3 [#<procedure 1bbb930 ()>]
> In unknown file:
>    ?: 2 [primitive-load "/gnu/store/dljmqd3db20j9z9bbqlha71p3jzj7cvk-bash-minimal-5.1.16-builder"]
> In ice-9/eval.scm:
>  432: 1 [eval # ()]
> In unknown file:
>    ?: 0 [setlocale 6 "en_US.utf8"]
>
> ERROR: In procedure setlocale:
> ERROR: In procedure setlocale: Invalid argument
> builder for `/gnu/store/qy6l0gjjpc40frz57fv08shpwj4pssfd-bash-minimal-5.1.16.drv' failed with exit code 1

It builds for me now on ‘master’:

--8<---------------cut here---------------start------------->8---
$ ./pre-inst-env guix build bash-minimal -s i586-gnu  --no-grafts
/gnu/store/0iw3v18ar8vy1yknnf84lv0jzmq6gjhm-bash-minimal-5.1.16-doc
/gnu/store/1gsf6zrl3fmbrip98nsqpkjykfhahmvd-bash-minimal-5.1.16
$ git log |head -1
commit aeb494322ca9dec4a4d66a7d063239c8536bd538
--8<---------------cut here---------------end--------------->8---

\o/

Christopher Baines <mail@cbaines.net> skribis:

> These changes look good to me.
>
> For the data service instances, it would be good to fix the infinite
> loop issue sooner rather than later. For affected revisions, I think the
> data service is effectively waiting until the relevant processes run out
> of memory and crash, and this is slowing down processing revisions.

Yeah.

Pushed as b0715d7cd2a74bc231751f8afc9dffb2047501ac.

Let’s do some more testing from here and see how it goes.

Thanks!

Ludo’.
Janneke Nieuwenhuizen Dec. 2, 2023, 2:38 p.m. UTC | #4
Ludovic Courtès writes:

Hi,

> Janneke Nieuwenhuizen <janneke@gnu.org> skribis:
>
>> I also tested on hurd-team using the `make as-derivation' trick with
>> #:system "i586-gnu" in compile-as-derivation.scm, which now fails with
[..]
>> ERROR: In procedure setlocale:
>> ERROR: In procedure setlocale: Invalid argument
>> builder for `/gnu/store/qy6l0gjjpc40frz57fv08shpwj4pssfd-bash-minimal-5.1.16.drv' failed with exit code 1
>
> It builds for me now on ‘master’:
>
> $ ./pre-inst-env guix build bash-minimal -s i586-gnu  --no-grafts
> /gnu/store/0iw3v18ar8vy1yknnf84lv0jzmq6gjhm-bash-minimal-5.1.16-doc
> /gnu/store/1gsf6zrl3fmbrip98nsqpkjykfhahmvd-bash-minimal-5.1.16
> $ git log |head -1
> commit aeb494322ca9dec4a4d66a7d063239c8536bd538
>
> \o/

Yeah, for me too; it's the grafting that seems to be implicit in `make
as-derivation'...so maybe that's not a great way to test this?

> Christopher Baines <mail@cbaines.net> skribis:
>
>> These changes look good to me.
>>
>> For the data service instances, it would be good to fix the infinite
>> loop issue sooner rather than later. For affected revisions, I think the
>> data service is effectively waiting until the relevant processes run out
>> of memory and crash, and this is slowing down processing revisions.
>
> Yeah.
>
> Pushed as b0715d7cd2a74bc231751f8afc9dffb2047501ac.
>
> Let’s do some more testing from here and see how it goes.

Great, thanks all!  For `guix shell -D guix' to work with this (i.e.,
not hang resolving the circular dependency), I updated the guix package
once again.

Does hurd-packages need to be enabled again at https://ci.guix.gnu.org/?

Greetings,
Janneke
itd Dec. 4, 2023, 7:34 p.m. UTC | #5
Dear all,

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

> Let’s do some more testing from here and see how it goes.

there was some discussion on IRC which, I think, is related to this
issue:
- https://logs.guix.gnu.org/guix/2023-12-03.log#104632
- https://logs.guix.gnu.org/guix/2023-12-04.log#165604

In short, people observe issues such as: "package glibc-locales@2.37
does not support x86_64-linux".  There is also #67586 describing this.

I am sharing it in case it is related and with the hope that it helps.

Best regards
itd
diff mbox

Patch

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))