HP-UX runtime loader does not support dynamic load of
shared libraries that contain (TLS) thread local
storage. As a result, when attempting to import
modules that contain TLS the following error is reported:
"/usr/lib/dld.sl: Can't shl_load() a library containing
Thread Local Storage"
This problem was discussed previously on the python.org
mail list:
http://mail.python.org/pipermail/python-list/2003-May/164024.html
There is another option: Use LD_PRELOAD environment
variable to cuase the runtime loader to 'pre-load' the
pthreads library (and dependancies of the pthread
library). See the dld.sl(5) man page for more info on
LD_PRELOAD.
But, I think a 5th option is ideal. If libpthread.sl
(and the dependancies of libpthread) are linked into
the python executable at build time then all of these
problems are avoided. I suggest that the HP-UX
(includes hp-ux on ia64) build process be modified so
that libpthead (and depends) are linked in. Or, at
least, make a note of this problem/solution in the
HP-UX section of the README file distributed with
python source.
Here is the process I use to work around the TLS problem:
HP-UX:
bash$ BASECFLAGS="-DTHREAD_STACK_SIZE=0x50000"; export
BASECFLAGS
bash$ ./configure --without-gcc --enable-shared
--with-libs='-lpthread -lstd_v2 -lCsup_v2 -lcl'
bash$ **Edit the Makefile and remove -O from the OPT line.
bash$ make
bash$ make test
bash$ make install
HP-UX on ia64:
bash$ CC=cc; export CC
bash$ CXX=aCC; export CXX
bash$ BASECFLAGS="+DD64 -DTHREAD_STACK_SIZE=0x50000";
export BASECFLAGS
bash$ LDFLAGS="+DD64"; export LDFLAGS
bash$ ./configure --without-gcc --enable-shared
--with-libs="-lpthread -lCsup -lstd_v2 -lunwind"
bash$ unset CC
bash$ unset CXX
bash$ unset BASECFLAGS
bash$ unset LDFLAGS
bash$ **Edit the Makefile and remove -O from the OPT line.
bash$ make
bash$ make test
bash$ make install
|