bug-glibc
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

glibc 2.2.5 + gettext() problem


From: rasca
Subject: glibc 2.2.5 + gettext() problem
Date: Sat, 27 Jul 2002 12:18:44 +0200
User-agent: Mutt/1.2.5i

Hi bug hunters - please help!

I've a strange problem with gettext() and cause I can't help
my self I write you this email.

On my Linux box gettext() seems not to work, e.g. using
gimp and a LC_MESSAGE env variable. I double checked compiling
and installation and I traced down the problem to the glibc
library.

First let me list my current configuration:
 * PC with K6 AMD CPU
 * Linux kernel 2.4.18
 * gcc 2.95.3
 * glibc 2.2.5
 * gdb 5.2

With a 3-line program using textdomain() and gettext()
I tried to debug the glibc functions. The reason for this
was, cause using "strace -e open ctest" with the sample test
application didn't list any access to *.mo-files.

Please note, that I'm not a debugger profi, so may be there
is a better way to trace the problem.

With the gdb i see inside the dcigettext() function
(dcigettext.c) that the first memcpy() fails:

 search = (struct known_translation_t *)
       alloca (offsetof (struct known_translation_t, msgid) + msgid_len);
 memcpy (search->msgid, msgid1, msgid_len);

before these lines msgid equals to "Image". But after memcpy()
the search->msgid contains only garbage:

Breakpoint 1, __dcigettext (domainname=0x80a5268 "gimp", 
    msgid1=0x808be56 "Image", msgid2=0x0, plural=0, n=0, category=5)
    at dcigettext.c:430
430       search->category = category;

(gdb) print search->msgid
$1 = 0xbffff3ac "hR\n\bã\210\004\b \036\n\b\020"

So, for me the question is, what is going wrong? may be some
incompabilities with the offsetof() function with gcc and the
k6 cpu?
I don't know how to trace memcpy() - may be it's a macro?

any ideas?

ps: I compiled glibc with the following parameters:

CFLAGS="-O -g" ../glibc-2.2.5/configure  \
    --prefix=/usr \
    --enable-add-ons \
    --host=k6-pc-linux-gnu \
    --enable-profile

cu
 rasca

-- 
_ /#- Internet eMail: address@hidden, WWWeb: rasca.home.pages.de -#\_
  \#- please do NOT quote these lines or other useless stuff! -#/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]