Bug#427625: closed by Pierre Habouzit <madcoder@debian.org> (Re: Bug#427625: libc6: bindtextdomain not properly documented?)
On Tue, Jun 05, 2007 at 10:24:08AM +0000, Debian Bug Tracking System wrote:
> > When I strace this, it never looks in /home/joshua/ppx/locale. I tested
> > this on 3 Debian systems and 1 Gentoo system. Am I doing something
> > stupid? I keep reading the docs for bindtextdomain but I don't
> > understand what I'm doing wrong. For example:
>
> You may want to read the whole strace.
>
> When I run your program on my box it does:
>
> [...]
> open("/usr/lib/locale/locale-archive", O_RDONLY) = 3
> fstat(3, {st_mode=S_IFREG|0644, st_size=69697312, ...}) = 0
> mmap(NULL, 69697312, PROT_READ, MAP_PRIVATE, 3, 0) = 0x2b889a77a000
> close(3) = 0
> open("/usr/share/locale/locale.alias", O_RDONLY) = -1 ENOENT (No such file or directory)
> open("/home/joshua/ppx/locale/de_DE.UTF-8/LC_MESSAGES/ppx.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
> open("/home/joshua/ppx/locale/de_DE.utf8/LC_MESSAGES/ppx.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
> open("/home/joshua/ppx/locale/de_DE/LC_MESSAGES/ppx.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
> open("/home/joshua/ppx/locale/de.UTF-8/LC_MESSAGES/ppx.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
> open("/home/joshua/ppx/locale/de.utf8/LC_MESSAGES/ppx.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
> open("/home/joshua/ppx/locale/de/LC_MESSAGES/ppx.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
> [...]
>
> /usr/lib/locale/locale-archive is an index, and unrelated to your
> textdomain. Then when you perform your setlocale, you can obviously see
> the implementation look into the directory you previously set. It
> obviously does not work on my machine since the path does not exists,
> but it seems it looks for the correct files in order to find ppx.mo.
Yes, it indeed looks like it is doing the correct thing on your box.
I guess my compiler toolchain is broken.
Thanks.
> Your bug report is wrong.
Well, I wouldn't go that far. Have a nice day. ;-)
Reply to: