Looking for help applying patch to NEdit
Keith Distin
keithdistin at arrktechnical.com
Wed Nov 21 15:34:17 CET 2007
Tony Balinski wrote:
> Hmmm. I expect the __ctype_... stuff is the static data used by the
<ctype.h>
> "functions" (toupper, isascii etc). These can be implemented as
macros, or
> maybe as inline functions; I expect that's what's happening here, and
that the
> linker cannot find this data reference. I would have thought this
should be in
> the standard C library (libc.so). Pretty fundamental!
I have seen this error with other applications. It happens when a third party library has been compiled with a glibc older than version 2.3.2 (I think) when you then compile your application and try to link to glibc version newer that this the _ctype_ symbols are undefined.
If you search on Google you'll find various references to this. Some people claim it is a glibc bug, but the glibc developers jut sya they've changed how it works. They recommend that your old library should be compiled against the same glibc that you've currently got.
In this case installing up to date libXm should solve the problem.
If you can't install a new library a work around that I found is to define the following:
#include <ctype.h>
__const unsigned short int *__ctype_b;
__const __int32_t *__ctype_tolower;
__const __int32_t *__ctype_toupper;
void ctSetup()
{
__ctype_b = *(__ctype_b_loc());
__ctype_toupper = *(__ctype_toupper_loc());
__ctype_tolower = *(__ctype_tolower_loc());
}
and call ctSetup(); near the beginning of main()
I hope this helps,
Keith
--
Dr Keith Distin <mailto:keithdistin at arrktechnical.com>
Technical Specialist, Safety CAE
ARRK Technical Services Limited
Direct Tel: +44 (0) 2476 20 7391
Mobile: +44 (0) 7733 188 343
Website: www.arrktechnical.com <http://www.arrktechnical.com/>
This message is confidential. If you are not the intended recipient please notify ARRK TECHNICAL SERVICES LIMITED immediately. You may not use this message for any purpose or disclose its contents to any other person. ARRK TECHNICAL SERVICES LIMITED has a company policy that it does not enter into any legally binding purchase contract via the internet. No such contract will therefore be binding on ARRK TECHNICAL SERVICES LIMITED unless it is concluded in writing and signed by a Director of the Company. Any expression of opinion in this communication is the opinion of the individual sender and not of ARRK TECHNICAL SERVICES LIMITED which accepts no liability for the opinions expressed by its employees.
Registered in England No. 5372267
Registered Office: 1 Little New Street, London, EC4A 3TR. VAT No. GB 859013812
More information about the Discuss
mailing list