Mailing List Archive

Support open source code!


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

Re: tlug: GTK+-1.2.3 undefined ref to .Xsetlocale



>>>>> "ash" == Andrew S Howell <andy@example.com> writes:

    ash> The _Xsetlocale is being referred to in one of the libraries
    ash> or .o files. Use nm again to find out which. There is an
    ash> option for the linker to get it to tell you what it is doing,
    ash> "-t"

This is deep dark magic.  It's a good thing Chris isn't here to launch 
a tirade.

Note that if you purge references to _Xsetlocale from your libraries,
Japanese on X is highly likely to stop working (to be precise, show
random bugginess) in the near future, since glibc locale support for
Japanese is in, uh, flux.

<gory_details>
What happened is that as of X11R4, nobody had implemented the (to be)
POSIX locale standard.  The X Consortium wanted to make transition
relatively painless, so they kludged up enough of a hack to get what
they needed, and wrapped it in an #ifdef in /usr/X11/include/Xlocale.h.

If your libc has native support for the locales you need, you =do not= 
#define X_LOCALE (or something like that) in your build of libX11, and 
calls to Xsetlocale() are routed to the libc routine, and Xlib looks
in the usual places (as defined by the POSIX interface) for
locale-related stuff.

If libc loses (as all libcs currently do for Japanese, at least on
Linux) you #define X_LOCALE and calls are routed to _Xsetlocale(),
which uses the X11 subsystem.

An alternative would have been to use liblocale.so as muriyari
Netscape does, but X11 was not restricted to systems with DLLs, so
that was out for portability reasons.
</gory_details>

Some libcs (TL 2.x-J is not one of them according to Ulrich Drepper :(
) are now close to supporting Japanese (they need libwctombs.so in
addition to the libc stuff), but as of March they couldn't possibly do
it using the correct implementation (= the one that Uli hadn't yet
written at the time).  Sooooo....  Watch it, kidz.

Uli did promise that glibc 2.2 will have proper wctombs support.
Assuming RMS will let him release it ;-)

-- 
University of Tsukuba                Tennodai 1-1-1 Tsukuba 305-8573 JAPAN
Institute of Policy and Planning Sciences       Tel/fax: +81 (298) 53-5091
__________________________________________________________________________
__________________________________________________________________________
What are those two straight lines for?  "Free software rules."
-------------------------------------------------------------------
Next Nomikai: May 26 (Wed), 19:30                        Place: TBD
*** Special guest: Eric S. Raymond
Next Technical Meeting: June 12 (Sat), 12  :30   place: Temple Univ.
-------------------------------------------------------------------
more info: http://www.tlug.gr.jp        Sponsor: Global Online Japan


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links