[PATCH] build: Use -c when building C.utf8 locale for glibc 2.35

  • Open
  • quality assurance status badge
Details
One participant
  • Tomas Volf
Owner
unassigned
Submitted by
Tomas Volf
Severity
normal
T
T
Tomas Volf wrote on 10 Dec 2023 01:53
(address . guix-patches@gnu.org)(name . Tomas Volf)(address . ~@wolfsden.cz)
dfee8f0c4ab5c5c72ea8a6204c5de693229594d9.1702169638.git.~@wolfsden.cz
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].


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

Toggle diff (27 lines)
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
T
T
Tomas Volf wrote on 14 Jan 17:18 +0100
Re: [bug#67735]
(address . 67735@debbugs.gnu.org)
ZaQJSfPTBkHWjyeI@ws
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.
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEt4NJs4wUfTYpiGikL7/ufbZ/wakFAmWkCUkACgkQL7/ufbZ/
walawxAAklM095KYygXRPU8eTZ2z+mZDHE8tcL5pX0x6kdFQldY/7hKJw7A468IG
jQF8X1hNR1KMHo4I7uDwN0lxl7Qg77iaHoJ/dFY9OJ9bNhNslEBUV1mwNrzlxZub
9ZTN3S6QniVh5eVGIj27yezzp2QCEs80TvNYA9SaCIMqkU35YXHRsQZeSpuUv7Jv
9Aah6tq3JLVl2Ki0wAeOnuBoWlzlUn09vPReoavu3EV/cM8fYHxNzFk5wrqUkHuL
SE9i4Uhvp+GNW77C+6avpNNG1IX0QhzIfncCkUoMFe2LUZla1dZ0KNdTCuuvPsAd
iIVK7p9hAbh/4y0cfSzml2iJkDs5Exd7isy0Ma6qPK1Zj0qX7Sur6RRue2UFCS8N
jeyN1uo975rBquj1TYlnrf5sozjnppt5xneKYNZC8Y1XCXgBI8CHcJXFJOv4zvWW
MbCwjZYn5NZhRGgat8I6qcdNbMt7T7HysSUGue/Kyla8dT9HGeLSPY0st+EGEkem
tIqSsjj5IXIB4MwaODgZo4FE3IgAI7IKAZI2wTge6Y+SOgq8zcbeSpXO4WWHRnnd
IwrpaoJl9BWuOdGSrYNd2U4Ig5m8aYfnP6fIE4bF6vLvNjdqQ7MuFmIFkxv87SWn
7DOPYHMr+67lPCVAlprrFtVcY5WU8fCTtKE60QV7RQDAbEPe6VA=
=F5S1
-----END PGP SIGNATURE-----


?