[bug#67824,core-updates,0/6] Run builds in C.UTF-8 locale

Message ID cover.1702550735.git.ludo@gnu.org
Headers
Series Run builds in C.UTF-8 locale |

Message

Ludovic Courtès Dec. 14, 2023, 10:51 a.m. UTC
Hello,

This is the logical followup to <https://issues.guix.gnu.org/67686>:
running builds in the C.UTF-8 locale (instead of en_US.UTF-8) and
removing ‘glibc-utf8-locales’ from the set of implicit inputs.

Tested on x86_64-linux with:

  guix build texinfo nss-certs
  make check TESTS=tests/profiles.scm

I’d like to merge it soon so we can move forward.

Let me know what you think!

Ludo’.

Ludovic Courtès (6):
  packages: Remove reference to ‘glibc-utf8-locales’ in
    ‘patch-and-repack’.
  build-system/gnu: Change default locale to C.UTF-8.
  gnu: commencement: Remove ‘glibc-utf8-locales’ from ‘%final-inputs’.
  profiles: Use C.UTF-8 instead of ‘glibc-utf8-locales’ where possible.
  packages: Output and error ports are line-buffered in
    ‘patch-and-repack’.
  gnu: glibc-utf8-locales: Add the C.UTF-8 locale.

 gnu/packages/base.scm         | 23 ++++++++++++++++++-----
 gnu/packages/commencement.scm | 31 +++++++++++++++----------------
 gnu/packages/gawk.scm         |  6 +++++-
 gnu/packages/texinfo.scm      |  7 +++++--
 guix/build-system/gnu.scm     |  4 ++--
 guix/packages.scm             | 34 +++++++++++++++++-----------------
 guix/profiles.scm             | 33 +++++----------------------------
 tests/profiles.scm            |  7 +------
 8 files changed, 68 insertions(+), 77 deletions(-)


base-commit: e4013b31266b40dc9cb250c44b2088d3931cb3b3
  

Comments

Janneke Nieuwenhuizen Dec. 16, 2023, 8:49 a.m. UTC | #1
Ludovic Courtès writes:

Hi,

> This is the logical followup to <https://issues.guix.gnu.org/67686>:
> running builds in the C.UTF-8 locale (instead of en_US.UTF-8) and
> removing ‘glibc-utf8-locales’ from the set of implicit inputs.
>
> Tested on x86_64-linux with:
>
>   guix build texinfo nss-certs
>   make check TESTS=tests/profiles.scm
>
> I’d like to merge it soon so we can move forward.
>
> Let me know what you think!

I like the idea but I cannot build it, i.e., building gcc-mesboot1 hangs
for me in the gmp configure:

--8<---------------cut here---------------start------------->8---
./pre-inst-env guix build '(@@ (gnu packages commencement) gcc-mesboot1)'
[..]
(Configuring in host-i686-unknown-linux-gnu/gmp)
checking whether sscanf needs writable input... no
checking for struct pst_processor.psp_iticksperclktick... no
<hang>
--8<---------------cut here---------------end--------------->8---

I've tried at least 6 times.  Gash running configure just hangs.

On a related note, I found that running

--8<---------------cut here---------------start------------->8---
./pre-inst-env guix shell --bootstrap --no-grafts  -e '(@@ (gnu packages commencement) gcc-mesboot1)'
--8<---------------cut here---------------end--------------->8---

wants to build gcc-mesboot1 when attempting to easily create a shell in
which to run and debug the hanging configure command.

I guess someone needs to patch gcc-mesboot1 and dive into it.

Greetings,
Janneke
  
Ludovic Courtès Dec. 16, 2023, 11:27 a.m. UTC | #2
Hi!

Janneke Nieuwenhuizen <janneke@gnu.org> skribis:

> I like the idea but I cannot build it, i.e., building gcc-mesboot1 hangs
> for me in the gmp configure:
>
> ./pre-inst-env guix build '(@@ (gnu packages commencement) gcc-mesboot1)'
> [..]
> (Configuring in host-i686-unknown-linux-gnu/gmp)
> checking whether sscanf needs writable input... no
> checking for struct pst_processor.psp_iticksperclktick... no
> <hang>

Hmm it works for me, weird.

Now I realize I forgot to change the default value of #:locale in
‘gnu-build-system.scm’ plus a couple of other things, so I’m starting
another round of rebuilds to test it.

It’s all about patience.  :-)

Ludo’.
  
Ludovic Courtès Dec. 16, 2023, 4:47 p.m. UTC | #3
Janneke Nieuwenhuizen <janneke@gnu.org> skribis:

> I like the idea but I cannot build it, i.e., building gcc-mesboot1 hangs
> for me in the gmp configure:
>
> ./pre-inst-env guix build '(@@ (gnu packages commencement) gcc-mesboot1)'
> [..]
> (Configuring in host-i686-unknown-linux-gnu/gmp)
> checking whether sscanf needs writable input... no
> checking for struct pst_processor.psp_iticksperclktick... no
> <hang>
>
>
> I've tried at least 6 times.  Gash running configure just hangs.

I experienced a similar thing just now (I had removed #:parallel-build?
#f from ‘binutils-mesboot0’):

--8<---------------cut here---------------start------------->8---
$ pstree -p 29600
.guile-real(29600)─┬─conftest(45270)
                   ├─make(34404)───.guile-real(34406)───make(34421)───.guile-real(6216)───.guile-real(6247)───make(629+
                   └─{.guile-real}(29610)
ludo@guix-hpc5 ~$ sudo cat /proc/29600/cmdline |xargs -0
/gnu/store/lgi9x15a0w35mcpd7g1kb9274r6wy4pv-guile-bootstrap-2.0/bin/guile --no-auto-compile -L /gnu/store/4zibvq0ffm75xrmmkm0997rnwl3i835p-module-import -C /gnu/store/idi8frs4vz0ympplpm1kddp8932kgkr1-module-import-compiled /gnu/store/kj2wyb3w6c6zqdjfmizv826rgfb383rf-binutils-mesboot0-2.20.1a-builder
$ sudo guix processes |guix shell recutils -- recsel -e 'LockHeld ~ "binutils"'
SessionPID: 17495
ClientPID: 17477
ClientCommand: /gnu/store/n2amn1hpl41r403n0rq7cjbawvzfx51m-guix-1.4.0-16.aeb4943/libexec/guix/guile \ /run/current-system/profile/bin/guix build -c32 -M3 /gnu/store/icfjxv22fysqpip9zxfqv7xjdahziv94-hello-2.12.1.drv
LockHeld: /gnu/store/pkaxhawivjhhff55ncglr30c6d9dzlaz-binutils-mesboot0-2.20.1a.lock
ChildPID: 17496
ChildCommand: : /gnu/store/n2amn1hpl41r403n0rq7cjbawvzfx51m-guix-1.4.0-16.aeb4943/libexec/guix/guile \ /gnu/store/n2amn1hpl41r403n0rq7cjbawvzfx51m-guix-1.4.0-16.aeb4943/bin/guix substitute --query
ChildPID: 17522
ChildCommand: : /gnu/store/n2amn1hpl41r403n0rq7cjbawvzfx51m-guix-1.4.0-16.aeb4943/libexec/guix/guile \ /gnu/store/n2amn1hpl41r403n0rq7cjbawvzfx51m-guix-1.4.0-16.aeb4943/bin/guix offload x86_64-linux 0 1 0
ChildPID: 29600
ChildCommand: : /gnu/store/lgi9x15a0w35mcpd7g1kb9274r6wy4pv-guile-bootstrap-2.0/bin/guile --no-auto-compile -L /gnu/store/4zibvq0ffm75xrmmkm0997rnwl3i835p-module-import -C /gnu/store/idi8frs4vz0ympplpm1kddp8932kgkr1-module-import-compiled /gnu/store/kj2wyb3w6c6zqdjfmizv826rgfb383rf-binutils-mesboot0-2.20.1a-builder
--8<---------------cut here---------------end--------------->8---

Here ‘conftest’ is a zombie, which means that the shell running
./configure (gash-boot-0.3.0) did not call ‘waitpid’ (bug #1).  There’s
another bunch of .guile-real zombie processes (child processes of ‘make
DESTDIR= RPATH_ENVVAR=LD_LIBRARY_PATH
TARGET_SUBDIR=i686-unknown-linux-gnu
bindir=/gnu/store/pkaxhawivjhhff55ncglr30c6d9dzlaz-binutils-mesboot0-2.20.1a/bin
[…]’).

Thus the ‘conftest’ process got reparented to the Guile process that
runs the build script (PID 1), and then we run into (bug #2):

  https://issues.guix.gnu.org/30948

Ludo’.