Stewart C. Strait wrote: > On Sat, Nov 17, 2007 at 08:17:48PM -0800, James G. Sack (jim) wrote: >> Stewart C. Strait wrote: >>> I'm trying to link an ncurses C application that built ok on RH 7, >>> but on Ubuntu 7.10 I get the fatal link error: >>> >>> undefined reference to '__ctype_b' > ... >>> A claimed fix, but perhaps not general purpose is: >>> >>> http://oss.sgi.com/archives/info-inventor-dev/2004-02/msg00004.html > > I tried this, but it used nonexistent gcc options (typos? maybe > even mine?). I probably > was able to approximate their intentions, but they seemed to > only deal with the case where __ctype_b wasn't actually used at > runtime. Part of my code worked, but getting farther with this > particular plan probably implies emulating the part of glibc > that handles __ctype_b . > ... >> I have no idea whether this is your problem, but it seems it might be >> related. I went hunting around for library files containing (defining) >> the symbol __ctype_b and find it in >> >> /lib64/libc.so.6| >> /lib/libc.so.6| >> >> I used nm -D to list symbols and made sure of a 'D' flag in the output. >> >> If you have libc with __ctype_b but ncurses doesn't find it, maybe you >> need to get the ncurses source package and recompile locally. >> >> Probably need deb/ubu guru-advice for that. In my experience (from a few >> years ago) ncurses is somewhat fussy to build, so be prepared. > > It's the other way around. ncurses has __ctype_b, > libc does not. It has a newer replacement for it. It looks > like ncurses needs rewriting to build with this libc, but I'm not > sure. Where are these gurus? Is there a Google search that > would reveal any of their writings? >
What version of libc does ubu 7.10 have? Just for the record, on 7.04 I get - - - ls -l /lib/libc.* .. 2007-07-27 11:51 /lib/libc.so.6 -> libc-2.5.so and that's where I saw __ctype_b defined nm -D /lib/libc.so.6 |grep ctype_b 001283f4 D __ctype_b 000230b0 T __ctype_b_loc and for ncurses ls -l /lib/libncurses.* .. 2007-07-27 11:51 /lib/libncurses.so.5 -> libncurses.so.5.5 .. 268600 2007-06-21 07:10 /lib/libncurses.so.5.5 then nm -D /lib/libncurses.so.5.5|grep ctype_b U __ctype_b_loc - - - Regards, ..jim -- [email protected] http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-lpsg
