Skip to contentSkip to conversation

Question about ELDK and i18n...

DISCUSSION David Jander 2 participants 2 messages Sep 1, 2005

lore
Share & tools
lore
#0 lore raw

Hi,

I am using ELDK-3.1, and I am not getting i18n to work. I have looked at recent changelog of ELDK and newer (CVS) versions don't seem to fix any bug in that direction.
The installation seems ok, the locale-files are all there as it seems. I have tried this as a test:

# LANG=es_ES strace tar

in the output, I can see these relevant lines:

open("/usr/lib/locale/locale-archive", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)

- This does not matter.

open("/usr/share/locale/locale.alias", O_RDONLY) = 3

- OK, good. locale.alias is read

open("/usr/lib/locale/es_ES/LC_IDENTIFICATION", O_RDONLY) = 3

- Also looks fine, read the locales identification.

open("/usr/lib/locale/es/LC_IDENTIFICATION", O_RDONLY) = -1 ENOENT (No such file or directory)

- Here I am puzzled. Why? Maybe this is not important.

Then there are no more calls to open or stat with files in "/usr/lib/locale" nor "/usr/share/locale" as argument, and I can't figure out why. What am I doing wrong? Is this version of glibc in ELDK broken?

Best regards,

Signature · 1 line
David Jander
#1 lore raw

Dear David,

Quoted 4 lines · in message <[email protected]> you wrote:

I am using ELDK-3.1, and I am not getting i18n to work. I have looked at recent changelog of ELDK and newer (CVS) versions don't seem to fix any bug in that direction.

There is no fix yet, but the problem is known :-(

Quoted 1 line

The installation seems ok, the locale-files are all there as it seems.

No.

Quoted 10 lines

I have tried this as a test:

# LANG=es_ES strace tar

in the output, I can see these relevant lines:

open("/usr/lib/locale/locale-archive", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)

- This does not matter.

It does. For the setlocale() call to succeed, an additional file is needed, apart from the locale files themselves. It is a locale-archive file in the /usr/lib/locale directory on the target. This file is still missing in the ELDK glibc RPM.

Quoted 8 lines

open("/usr/share/locale/locale.alias", O_RDONLY) = 3

- OK, good. locale.alias is read

open("/usr/lib/locale/es_ES/LC_IDENTIFICATION", O_RDONLY) = 3

- Also looks fine, read the locales identification.

Quoted 8 lines

open("/usr/lib/locale/es/LC_IDENTIFICATION", O_RDONLY) = -1 ENOENT (No such file or directory)

- Here I am puzzled. Why? Maybe this is not important.

Then there are no more calls to open or stat with files in "/usr/lib/locale" nor "/usr/share/locale" as argument, and I can't figure out why. What am I doing wrong? Is this version of glibc in ELDK broken?

There is a problem with locale support. The contents of the 'locale-archive' file is endian-dependent. This means that we can't use the existing tools on the x86 (= little endian) ELDK build host to generate it for a big-endian target.

As a workaround, the locale files can be generated natively on the target, using for example the following command:

# localedef -i de_DE -f ISO-8859-1 de_DE

Hope this helps.

Best regards,

Wolfgang Denk

Signature · 5 lines
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: [email protected]
There is, however, a strange, musty smell in the air that reminds  me
of something...hmm...yes...I've got it...there's a VMS nearby, or I'm
a Blit.          - Larry Wall in Configure from the perl distribution