GNU bug report logs - #67735
[PATCH] build: Use -c when building C.utf8 locale for glibc 2.35

Previous Next

Package: guix-patches;

Reported by: Tomas Volf <~@wolfsden.cz>

Date: Sun, 10 Dec 2023 00:55:01 UTC

Severity: normal

Tags: patch

Done: Tomas Volf <~@wolfsden.cz>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 67735 in the body.
You can then email your comments to 67735 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#67735; Package guix-patches. (Sun, 10 Dec 2023 00:55:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Tomas Volf <~@wolfsden.cz>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Sun, 10 Dec 2023 00:55:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Tomas Volf <~@wolfsden.cz>
To: guix-patches <at> gnu.org
Cc: Tomas Volf <~@wolfsden.cz>
Subject: [PATCH] build: Use -c when building C.utf8 locale for glibc 2.35
Date: Sun, 10 Dec 2023 01:53:58 +0100
C.utf8 locale for glibc 2.35 does not build without errors.  However, if the
build is forced using -c, the resulting locale file works just fine.  It is a
recommended[0] workaround by the upstream.  More info can be found here[1].

0: https://sourceware.org/bugzilla/show_bug.cgi?id=28861
1: https://sourceware.org/bugzilla/show_bug.cgi?id=28845

* gnu/build/locale.scm (build-locale): Add -c when building C.utf8 for 2.35.

Change-Id: I7429b67b222bb8c0796209fd6f7c7a8720424c68
---
 gnu/build/locale.scm | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/gnu/build/locale.scm b/gnu/build/locale.scm
index 412759a320..b6f01bab0e 100644
--- a/gnu/build/locale.scm
+++ b/gnu/build/locale.scm
@@ -82,9 +82,15 @@ (define* (build-locale locale
   "Compute locale data for LOCALE and CODESET--e.g., \"en_US\" and
 \"UTF-8\"--with LOCALEDEF, and store it in DIRECTORY under NAME."
   (format #t "building locale '~a'...~%" name)
-  (invoke localedef "--no-archive" "--prefix" directory
-          "-i" locale "-f" codeset
-          (string-append directory "/" name)))
+  ;; In 2.35 the C.utf8 locale produces an error during a build.  The
+  ;; resulting locale works fine, so the error needs to be suppressed.
+  ;; https://sourceware.org/bugzilla/show_bug.cgi?id=28845
+  (define C.utf8 <at> 2.35? (and (string-suffix? "/2.35" directory)
+                            (string=? "C.utf8" name)))
+  (apply invoke localedef "--no-archive" "--prefix" directory
+         "-i" locale "-f" codeset
+         (append (if C.utf8 <at> 2.35? '("-c") '())
+                 (list (string-append directory "/" name)))))
 
 (define (locale->name+codeset locale)
   "Split a locale name such as \"aa_ER <at> saaho.UTF-8\" into two values: the

base-commit: 61f2d84e75c340c2ba528d392f522c51b8843f34
-- 
2.41.0





Information forwarded to guix-patches <at> gnu.org:
bug#67735; Package guix-patches. (Sun, 14 Jan 2024 16:19:02 GMT) Full text and rfc822 format available.

Message #8 received at 67735 <at> debbugs.gnu.org (full text, mbox):

From: Tomas Volf <~@wolfsden.cz>
To: 67735 <at> debbugs.gnu.org
Subject: Re: [bug#67735]
Date: Sun, 14 Jan 2024 17:18:17 +0100
[Message part 1 (text/plain, inline)]
Hi,

any feedback regarding this?

Thanks,
Tomas Volf

-- 
There are only two hard things in Computer Science:
cache invalidation, naming things and off-by-one errors.
[signature.asc (application/pgp-signature, inline)]

bug closed, send any further explanations to 67735 <at> debbugs.gnu.org and Tomas Volf <~@wolfsden.cz> Request was from Tomas Volf <~@wolfsden.cz> to control <at> debbugs.gnu.org. (Sun, 06 Oct 2024 16:13:04 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 04 Nov 2024 12:24:10 GMT) Full text and rfc822 format available.

This bug report was last modified 129 days ago.

Previous Next


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