Need pixie dust for building Python 2.4 curses module on Solaris 8
skip at pobox.com
skip at pobox.com
Wed Jun 7 07:07:40 EDT 2006
John> Was libncurses.a compiled with -fpic (or -fPIC, if necessary)?
John> http://mail.python.org/pipermail/python-dev/2001-March/013510.html
When built shared the source was compiled with -fPIC. -fPIC is not used
when not built shared. I forced that in a non-shared build. It still gave
me the undefined acs32map error. I tried adding either termlib or termcap
to the link libraries, as they both provide that symbol:
bash-2.03$ nm -p /usr/lib/libtermcap.
libtermcap.a libtermcap.so libtermcap.so.1
bash-2.03$ nm -p /usr/lib/libtermcap.so | egrep acs32map
0000245332 B acs32map
bash-2.03$ nm -p /usr/lib/libtermcap.a | egrep acs32map
0000000004 D acs32map
0000000000 U acs32map
0000000000 U acs32map
0000000000 U acs32map
0000000000 U acs32map
0000000000 U acs32map
I got all sorts of warnings about various symbols having differing sizes:
ld: warning: symbol `acs_map' has differing sizes:
(file /opt/app/nonc++/ncurses-5.5/lib/libncurses.a(lib_acs.o) value=0x200; file /usr/ccs/lib/libtermcap.so value=0x4);
/opt/app/nonc++/ncurses-5.5/lib/libncurses.a(lib_acs.o) definition taken
ld: warning: symbol `numnames' has differing sizes:
(file /opt/app/nonc++/ncurses-5.5/lib/libncurses.a(names.o) value=0xa0; file /usr/ccs/lib/libtermcap.so value=0x88);
/opt/app/nonc++/ncurses-5.5/lib/libncurses.a(names.o) definition taken
...
The link succeeded when I added termcap and the generated _curses and
_curses_panel modules import successfully. The fact that both modules
appear to refer to /usr/lib/libcurses.so.1 now:
$ ldd build/lib.solaris-2.8-i86pc-2.4/_curses.so
libcurses.so.1 => /usr/lib/libcurses.so.1
libgcc_s.so.1 => /opt/app/nonc++/lib/libgcc_s.so.1
libc.so.1 => /usr/lib/libc.so.1
libdl.so.1 => /usr/lib/libdl.so.1
$ ldd build/lib.solaris-2.8-i86pc-2.4/_curses_panel.so
libcurses.so.1 => /usr/lib/libcurses.so.1
libgcc_s.so.1 => /opt/app/nonc++/lib/libgcc_s.so.1
libc.so.1 => /usr/lib/libc.so.1
libdl.so.1 => /usr/lib/libdl.so.1
bothers me since I explicitly asked to get the version I had installed and
(based on the warnings above) it appears to have retrieved many symbols from
that version. Also, running the unit test seems to hang. It certainly ties
up the xterm.
Skip
More information about the Python-list
mailing list