Problem with glibc-locale recipe in yocto after the generic C.UTF-8 locale were introduced in glibc

Carlos O'Donell carlos@redhat.com
Mon Oct 18 14:43:14 GMT 2021


On 10/13/21 16:56, Joseph Myers wrote:
> On Wed, 13 Oct 2021, Lukasz Majewski wrote:
> 
>> Hi Carlos,
>>
>> I would like to report that the commit:
>> https://sourceware.org/git/?p=glibc.git;a=commit;h=466f2be6c08070e9113ae2fdc7acd5d8828cba50
>> "Add generic C.UTF-8 locale (Bug 17318)"
>>
>> causes some issues with Yocto/OE build environment, when glibc-locale
>> are build.
>>
>> PATH="/home/lukma/work/yocto/y2038/build/tmp/sysroots-uninative/x86_64-linux/usr/bin:/home/lukma/work/yocto/y2038/poky/scripts:/home/lukma/work/yocto/y2038/build/tmp/work/armv7vet2hf-neon-poky-linux-gnueabi/glibc-locale/2.34-r0/recipe-sys$
>> /home/lukma/work/yocto/y2038/build/tmp/work/armv7vet2hf-neon-poky-linux-gnueabi/glibc-locale/2.34-r0/locale-tree//usr/share/i18n/locales/C:60:
>> LC_COLLATE: syntax error
>> /home/lukma/work/yocto/y2038/build/tmp/work/armv7vet2hf-neon-poky-linux-gnueabi/glibc-locale/2.34-r0/locale-tree//usr/share/i18n/locales/C:61:
>> LC_COLLATE: empty category description not allowed [error] too many
>> errors; giving up
> 
> Yocto does its own funny things for cross-localedef.  Are you sure that's 
> using the same localedef sources as in the glibc version being built / has 
> been updated as necessary for the localedef changes involved in adding 
> C.UTF-8?
 
I agree this looks like you used an older localedef that doesn't support 'codepoint_collation'
as a new directive to enable C.UTF-8 with zero collation rules (strcmp/wcscmp sorting).

This is the error I get when I use glibc 2.33 to compile the glibc 2.34 C.UTF-8:

[carlos@athas glibc-rawhide]$ LOCPATH=/home/carlos/install/glibc-pristine/usr/lib64/locale I18NPATH=/home/carlos/src/glibc-pristine/localedata/ localedef -f UTF-8 -i C /home/carlos/install/glibc-pristine/usr/lib64/locale/C.UTF-8
/home/carlos/src/glibc-pristine/localedata//locales/C:60: LC_COLLATE: syntax error
/home/carlos/src/glibc-pristine/localedata//locales/C:61: LC_COLLATE: empty category description not allowed
[error] too many errors; giving up
[carlos@athas glibc-rawhide]$ echo $?
1

Which is exactly what is expected. We have a new directive and you must use the new localedef
to compiled the new locale.

-- 
Cheers,
Carlos.



More information about the Libc-alpha mailing list