Skip to contentSkip to conversation

New: Upgrade from glibc 2.26 to 2.27 broke some locales (ru_RU in particular)

Buildroot bugzilla at busybox.net 1 participant 7 messages Jun 12, 2018 – Jun 19, 2019

lore
Share & tools
lore
#0 lore raw

https://bugs.busybox.net/show_bug.cgi?id=11096

Bug ID: 11096
Summary: Upgrade from glibc 2.26 to 2.27 broke some locales
(ru_RU in particular)
Product: buildroot
Version: 2018.05
Hardware: All
OS: All
Status: NEW
Severity: major
Priority: P5
Component: Other
Assignee: unassigned at buildroot.uclibc.org
Reporter: psycho_dk at mail.ru
CC: buildroot at uclibc.org
Target Milestone: ---

Created attachment 7646
--> https://bugs.busybox.net/attachment.cgi?id=7646&action=edit
glibc downgrade patch

glibc 2.27 updated some locale definitions (added alt_mon, ab_lat_mon descriptions). See release notes:
https://sourceware.org/ml/libc-announce/2018/msg00000.html.

Buildroot uses host's localedef for locale compilation. It's foreign utility for glibc (from eglibc) and it doesn't support new descriptions. It cause error in the final stage:

Quoted 4 lines

for locale in ru_RU.UTF-8 ; do inputfile=echo ${locale} | cut -f1 -d'.' ; charmap=echo ${locale} | cut -f2 -d'.' -s ; if test -z "${charmap}" ; then charmap="UTF-8" ; fi ; echo "Generating locale ${inputfile}.${charmap}" ; I18NPATH=/home/hoxnox/devel/buildroot/output/host/x86_64-buildroot-linux-gnu/sysroot/usr/share/i18n:/usr/share/i18n /home/hoxnox/devel/buildroot/output/host/bin/localedef --prefix=/home/hoxnox/devel/buildroot/output/target --"little"-endian -i ${inputfile} -f ${charmap} ${locale} ; done Generating locale ru_RU.UTF-8
/home/hoxnox/devel/buildroot/output/host/x86_64-buildroot-linux-gnu/sysroot/usr/share/i18n/locales/ru_RU:125: LC_TIME: syntax error
/home/hoxnox/devel/buildroot/output/host/x86_64-buildroot-linux-gnu/sysroot/usr/share/i18n/locales/ru_RU:149: LC_TIME: syntax error

It's also the cause of no locale support by libc in the target system.

Downgrading to glibc-2.26 solves the problem (see attachment), but is not the solution.

Signature · 2 lines
You are receiving this mail because:
You are on the CC list for the bug.
#1 lore raw

[Buildroot] [Bug 11096] Upgrade from glibc 2.26 to 2.27 broke some locales (ru_RU in particular)

https://bugs.busybox.net/show_bug.cgi?id=11096

Thomas Petazzoni <[email protected]> changed:

What |Removed |Added
----------------------------------------------------------------------------
Assignee|unassigned at buildroot.uclibc |romain.naour at gmail.com
|.org |

Signature · 2 lines
You are receiving this mail because:
You are on the CC list for the bug.
#2 lore raw

[Buildroot] [Bug 11096] Upgrade from glibc 2.26 to 2.27 broke some locales (ru_RU in particular)

In reply to bugzilla at busybox.net

https://bugs.busybox.net/show_bug.cgi?id=11096

--- Comment #1 from romain.naour at gmail.com ---
Hi,

Are you sure that Buildroot is using localedef from the host? Buildroot is building it's own localedef version from [1] which is probably too old for glibc 2.27.
Maybe we have to bump localedef to [2] which is used by Yocto?

localedef is build by the glibc package but for the target, so we really need to build it outside of glibc package.

Best regards,
Romain

[1]
http://www.pengutronix.de/software/ptxdist/temporary-src/localedef-eglibc-2.14.1-r17443-ptx1.tar.bz2

[2] git://github.com/kraj/localedef

Signature · 2 lines
You are receiving this mail because:
You are on the CC list for the bug.
#3 lore raw

[Buildroot] [Bug 11096] Upgrade from glibc 2.26 to 2.27 broke some locales (ru_RU in particular)

In reply to bugzilla at busybox.net

https://bugs.busybox.net/show_bug.cgi?id=11096

--- Comment #2 from romain.naour at gmail.com ---
Hi,

So, we really have a problem with host-localedef...

Our current version is outdated (based on eglibc) and doesn't work with glibc 2.26. Localedef package version should be the same as glibc package because localedef program is part of glibc and building it require glibc sources.

Yocto and ptxdist maintain some "hack/workaround" to only build localedef for the host [1] [2].

Also, pre compiled toolchain doesn't provide localdef binary for the host along with glibc provided for the target.

I'm not sure if we should allow using BR2_GENERATE_LOCALE for external toolchains since there is no guaranties that localedef is compatible with toolchain locale.

Best regards,
Romain

[1]
https://git.pengutronix.de/cgit/ptxdist/tree/patches/localedef-glibc-2.27/0001-HACK-only-build-and-install-localedef.patch

[2] git://github.com/kraj/localedef and
http://git.yoctoproject.org/cgit.cgi/poky/tree/meta/recipes-core/glibc/cross-localedef-native_2.26.bb?id=rocko-18.0.3

Signature · 2 lines
You are receiving this mail because:
You are on the CC list for the bug.
#4 lore raw

[Buildroot] [Bug 11096] Upgrade from glibc 2.26 to 2.27 broke some locales (ru_RU in particular)

In reply to bugzilla at busybox.net

https://bugs.busybox.net/show_bug.cgi?id=11096

--- Comment #3 from Thomas Petazzoni <[email protected]> --- An initial proposal has been made to resolve this issue:
https://patchwork.ozlabs.org/patch/950717/. While the patch is not perfect, it shouldn't be too difficult to improve to make it acceptable.

Signature · 2 lines
You are receiving this mail because:
You are on the CC list for the bug.
#5 lore raw

[Buildroot] [Bug 11096] Upgrade from glibc 2.26 to 2.27 broke some locales (ru_RU in particular)

In reply to bugzilla at busybox.net

https://bugs.busybox.net/show_bug.cgi?id=11096

MR. JAMES <[email protected]> changed:

What |Removed |Added
----------------------------------------------------------------------------

   Target Milestone|---                         |2019.05
              Alias|                            |Jay, kumar
                URL|                            |Www.naourjamesbug.in
           Priority|P5                          |P4
Signature · 2 lines
You are receiving this mail because:
You are on the CC list for the bug.
#6 lore raw

[Buildroot] [Bug 11096] Upgrade from glibc 2.26 to 2.27 broke some locales (ru_RU in particular)

In reply to bugzilla at busybox.net

https://bugs.busybox.net/show_bug.cgi?id=11096

Thomas Petazzoni <[email protected]> changed:

What |Removed |Added
----------------------------------------------------------------------------

             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #4 from Thomas Petazzoni <[email protected]> --- Fixed by
https://git.buildroot.org/buildroot/commit/?id=0ec7169e6c8cfb4bb54defb685bd04bb1da0a2aa.

Signature · 2 lines
You are receiving this mail because:
You are on the CC list for the bug.