[Buildroot] [RFC PATCH] host-localedef: Compile against glibc

Thomas Petazzoni thomas.petazzoni at bootlin.com
Wed Aug 1 06:39:38 UTC 2018


Hello,

On Wed, 01 Aug 2018 11:31:16 +1000, Samuel Mendoza-Jonas wrote:

> I think it's a bit of both; 2.27 introduces new locale descriptions which
> localedef can't handle, eg:
> 
> Generating locale ru_RU.UTF-8
> /scratch/jenkins-workspace/op-build-upstream/output/host/powerpc64le-buildroot-linux-gnu/sysroot/usr/share/i18n/locales/ru_RU:125: LC_TIME:syntax error
> /scratch/jenkins-workspace/op-build-upstream/output/host/powerpc64le-buildroot-linux-gnu/sysroot/usr/share/i18n/locales/ru_RU:149: LC_TIME:syntax error

Ah, so I guess this update of localedef is going to fix
https://bugs.busybox.net/show_bug.cgi?id=11096.

> And we fall back to the C locale at runtime (at least in my environment).
> I'll stare at the glibc release notes / bug report a bit more and see if
> I can make a more legible explanation.

Would be nice, though it generally makes sense to have a localedef
implementation that is in sync with glibc.

> > See how they are doing it in PTXdist:
> > https://git.pengutronix.de/cgit/ptxdist/tree/rules/host-localedef.make.
> > Most likely using the locale/others make target will help cut the build
> > time significantly.  
> 
> Yes this is the contentious part, we're building a whole glibc. Unfortunately
> if we want to build just the locale/others target like PTXdist we also need
> their bonus patch to glibc:
> https://git.pengutronix.de/cgit/ptxdist/tree/patches/localedef-glibc-2.27/0001-HACK-only-build-and-install-localedef.patch
> 
> Otherwise the build fails with, for example:
> 
> make[4]: *** No rule to make target '/scratch/builds/locales/build/host-localedef-glibc-2.27-57-g6c99e37f6fb640a50a3113b2dbee5d5389843c1e/build/elf/soinit.os', needed by '/scratch/builds/locales/build/host-localedef-glibc-2.27-57-g6c99e37f6fb640a50a3113b2dbee5d5389843c1e/build/libc.so'.  Stop.
> Makefile:215: recipe for target 'locale/others' failed
> make[3]: *** [locale/others] Error 2
> Makefile:9: recipe for target 'locale/others' failed
> make[2]: *** [locale/others] Error 2
> 
> So the tradeoff is adding a few minutes of extra build time versus carrying
> a bit of a hack to enable just the localedef/others target.

Their patch is not that crazy IMO, it should be too complicated to
maintain. Perhaps we could even improve it a bit further to make it
acceptable upstream ?

Best regards,

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com


More information about the buildroot mailing list