unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#67735] [PATCH] build: Use -c when building C.utf8 locale for glibc 2.35
@ 2023-12-10  0:53 Tomas Volf
  2024-01-14 16:18 ` [bug#67735] Tomas Volf
  0 siblings, 1 reply; 2+ messages in thread
From: Tomas Volf @ 2023-12-10  0:53 UTC (permalink / raw)
  To: 67735; +Cc: Tomas Volf

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@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@2.35? '("-c") '())
+                 (list (string-append directory "/" name)))))
 
 (define (locale->name+codeset locale)
   "Split a locale name such as \"aa_ER@saaho.UTF-8\" into two values: the

base-commit: 61f2d84e75c340c2ba528d392f522c51b8843f34
-- 
2.41.0





^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [bug#67735]
  2023-12-10  0:53 [bug#67735] [PATCH] build: Use -c when building C.utf8 locale for glibc 2.35 Tomas Volf
@ 2024-01-14 16:18 ` Tomas Volf
  0 siblings, 0 replies; 2+ messages in thread
From: Tomas Volf @ 2024-01-14 16:18 UTC (permalink / raw)
  To: 67735

[-- Attachment #1: Type: text/plain, Size: 178 bytes --]

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.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-01-14 16:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-12-10  0:53 [bug#67735] [PATCH] build: Use -c when building C.utf8 locale for glibc 2.35 Tomas Volf
2024-01-14 16:18 ` [bug#67735] Tomas Volf

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).