GNU bug report logs - #67686
[PATCH core-updates 0/5] Update glibc to 2.38; make C.UTF-8 always available

Previous Next

Package: guix-patches;

Reported by: Ludovic Courtès <ludo <at> gnu.org>

Date: Thu, 7 Dec 2023 10:21:02 UTC

Severity: normal

Tags: patch

Done: Ludovic Courtès <ludo <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Ludovic Courtès <ludo <at> gnu.org>
To: 67686 <at> debbugs.gnu.org
Cc: Efraim Flashner <efraim <at> flashner.co.il>
Subject: [bug#67686] [PATCH core-updates 4/5] gnu: glibc: Install C.UTF-8 locale.
Date: Thu, 07 Dec 2023 22:26:36 +0100
Ludovic Courtès <ludo <at> gnu.org> skribis:

> Ludovic Courtès <ludo <at> gnu.org> skribis:
>
>> +                     ;; Install the C.UTF-8 locale so there's always a UTF-8
>> +                     ;; locale around.
>> +                     (let* ((out (assoc-ref outputs "out"))
>> +                            (bin (string-append out "/bin"))
>> +                            (locale (string-append out "/lib/locale/"
>> +                                                   ,(package-version
>> +                                                     this-package))))
>> +                       (mkdir-p locale)
>> +                       (invoke (string-append bin "/localedef")
>> +                               "--no-archive" "--prefix" locale
>> +                               "-i" "C" "-f" "UTF-8"
>> +                               (string-append locale "/C.UTF-8")))))
>
> I realize now that this cannot work when cross-compiling, because the
> this ‘localedef’ binary is not executable on the build machine.
>
> I suspect libc builds an additional ‘localedef’ for the build machine
> but I’m not sure where it is, hmm…

I was told on #glibc that (1) there’s no ‘localedef’ for the build
machine produced during cross-compilation, and (2) that more generally,
there’s no way to cross-build locale data, that endianness and other
things may matter.

I suspect #2 was about the locale archive and not locale data, because
evidence suggests that locale data is system-independent:

--8<---------------cut here---------------start------------->8---
$ for s in aarch64-linux powerpc64le-linux armhf-linux i686-linux ; do diff -r $(guix build glibc-locales <at> 2.35) $(guix build glibc-locales <at> 2.35 -s "$s") && echo "$s same as x86_64-linux" ; done
aarch64-linux same as x86_64-linux
powerpc64le-linux same as x86_64-linux
armhf-linux same as x86_64-linux
i686-linux same as x86_64-linux
$ guix describe
  guix 6e2dd51
    repository URL: https://git.savannah.gnu.org/git/guix.git
    branch: master
    commit: 6e2dd51df5f3f51e9056dd4f2e1b036195ab3caa
--8<---------------cut here---------------end--------------->8---

Efraim, could you check against powerpc-linux, which is the only
big-endian target we +/- support?

Ludo’.




This bug report was last modified 1 year and 167 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.