Hello,

> I don't know much about locales. Try running your program with strace so
> you can see which file it tries to open.

Thanks for this hint, seems to be helpful. The output of the relevant part
is:


write(3, "before setlocale: Success\n", 26) = 26
close(3)                                = 0
munmap(0x400a4000, 4096)                = 0
open("/usr/lib/locale/locale-archive", O_RDONLY|O_LARGEFILE) = 3
fstat64(3, {st_mode=S_IFREG|0755, st_size=592624, ...}) = 0
mmap2(NULL, 592624, PROT_READ, MAP_PRIVATE, 3, 0) = 0x40456000
close(3)                                = 0
open("/usr/share/locale/locale.alias", O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=2570, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0)
= 0x40065000
read(3, "# Locale name alias data base.\n#"..., 4096) = 2570
read(3, "", 4096)                       = 0
close(3)                                = 0
munmap(0x40065000, 4096)                = 0
open("/usr/lib/locale/de_DE/LC_IDENTIFICATION", O_RDONLY) = -1 ENOENT (No
such file or directory)
open("/usr/lib/locale/de/LC_IDENTIFICATION", O_RDONLY) = -1 ENOENT (No
such file or directory)
dup(2)                                  = 3
fcntl64(3, F_GETFL)                     = 0x2 (flags O_RDWR)
fstat64(3, {st_mode=S_IFCHR|0600, st_rdev=makedev(4, 64), ...}) = 0
ioctl(3, SNDCTL_TMR_TIMEBASE or TCGETS, {B115200 opost isig icanon echo
...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0)
= 0x4002f000
_llseek(3, 0, 0xbe8b6b48, SEEK_CUR)     = -1 ESPIPE (Illegal seek)
write(3, "after setlocale: No such file or"..., 43) = 43
close(3)                                = 0


You see there are two successful open calls to
/usr/lib/locale/locale-archive and /usr/share/locale/locale.alias --
however the next open call to files in /usr/lib/locale/de_DE or
/usr/lib/locale/de fails because this directory just contains the file
locale-archive and nothing more (on a Ubuntu Desktop there are some
directories below containing the files which are not found here).

I activated PTXCONF_GLIBC_I18N_BIN_LOCALEDEF=y now and see how far I
get with this. Thanks anyway, I didn't know strace before and it seems
to be a very helpful tool. :-)

Greets
Alex



-- 
ptxdist mailing list
ptxdist@pengutronix.de

Reply via email to