Bug 11671 - russian locale ru_RU:145: LC_TIME: syntax error
Summary: russian locale ru_RU:145: LC_TIME: syntax error
Status: RESOLVED FIXED
Alias: None
Product: buildroot
Classification: Unclassified
Component: Other (show other bugs)
Version: 2018.11.2
Hardware: PC Linux
: P5 major
Target Milestone: ---
Assignee: unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-02-08 15:36 UTC by Alexey
Modified: 2019-08-15 13:20 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alexey 2019-02-08 15:36:04 UTC
Hello!
I m need to build system with russian locale.

BR2_GENERATE_LOCALE="ru_RU"
# BR2_ENABLE_LOCALE_PURGE is not set
BR2_SYSTEM_ENABLE_NLS=y


But i have error:
Generating locale ru_RU.UTF-8
/home/alexey/dev/ktl/ramdisk/output/host/x86_64-buildroot1-linux-gnu/sysroot/usr/share/i18n/locales/ru_RU:121: LC_TIME: syntax error
/home/alexey/dev/ktl/ramdisk/output/host/x86_64-buildroot1-linux-gnu/sysroot/usr/share/i18n/locales/ru_RU:145: LC_TIME: syntax error
no output file produced because warnings were issued
make[1]: *** [Makefile:720: target-finalize] Error 4
make: *** [Makefile:84: _all] Error 2


What's i am doing wrong ang how to fix this error?r?
Comment 1 Peter Seiderer 2019-02-08 20:46:27 UTC
Apply the following two patches:

- host-localedef: Compile against glibc [1]
- localedef: update to glibc-2.28 and various fixes [2]

Fixed the problem for me, tested with raspberrypi3_defconfig, with the
following changes:

BR2_TOOLCHAIN_BUILDROOT_GLIBC=y
# BR2_ENABLE_LOCALE_PURGE is not set
BR2_GENERATE_LOCALE="ru_RU"
BR2_SYSTEM_ENABLE_NLS=y

Regards,
Peter

[1] https://patchwork.ozlabs.org/patch/950717
[2] https://patchwork.ozlabs.org/patch/1008984
Comment 2 Alexey 2019-02-12 14:10:26 UTC
Thanks a lot,Peter!

I applied your patches, and now building is comlited successful. 
But in don't have "locale" command in builded system.
May be anyone know, hot to set locale in system and how to add LOCALE command ?
Comment 3 Peter Seiderer 2019-02-12 19:28:05 UTC
The 'locale' command is not (yet) installed into the target image, but
you should find it under:

- build/glibc-glibc-2.28-69-g1e5c5303a522764d7e9d2302a60e4a32cdb902f1/build/locale/locale
- host/arm-buildroot-linux-gnueabihf/sysroot/usr/bin/locale

For examples on how to set (from program or from environment) see
hints at patch two...
Comment 4 Alexey 2019-02-15 11:18:45 UTC
Thanl you very match, Peter!
It's work!
Comment 5 Thomas Petazzoni 2019-08-15 13:20:14 UTC
This issue has been fixed by https://git.buildroot.org/buildroot/commit/package/localedef?id=0ec7169e6c8cfb4bb54defb685bd04bb1da0a2aa. Thanks!