TCLUG Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [TCLUG:723] Netscape 4.5p1 and Redhat 5.0



Bob Tanner wrote:
> 
> I grabbed the Netscape 4.5p1 rpms from Redhat and I am getting the
> following error.
> 
> /usr/lib/netscape/netscape-communicator: error in loading shared
> libraries
> : undefined symbol: _Xsetlocale
> 
> Is this rpm for 5.1 or something? I have the latest version of all
> XFree libs.
Not really.  Xsetlocale is only defined if you're version of libc
doesn't do setlocale.  Glibc does, so XFree86 distributed with RedHat
doesn't.  Here's what I use to fix it.
/* This is to fix the Xsetlocale problem with some X libraries
   Install as:
   gcc -shared -o Xsetlocale.o Xsetlocale.c
   mv Xsetlocale.o /usr/local/lib

   and add the following line to youre .cshrc
   setenv LD_PRELOAD /usr/local/lib/Xsetlocale.o
   */

#include <locale.h>

char *_Xsetlocale(int category, char *name) {
   return setlocale(category, name);
}

-- 
Jon Schewe 
http://tcfreenet.org/~schewe
jpschewe@usa.net