Python on HP-UX

Westlund, David david.westlund at hp.com
Thu Aug 27 04:19:26 EDT 2009


Hi

I'm trying to compile Python on an HP-UX v11.23 running on an Itanium. I have tried with both gcc and cc, and python versions 2.5.4, 2.6.2 as well as an SVN checkout. In all cases, alloca.h needs to be included. On most systems I'm guessing it is already included from stdlib.h, but not on HP-UX. The following code in the right header file solves that problem:
#ifdef __hpux
#include <alloca.h>
#endif

My problem is that ctypes keeps seg faulting:

./python -v Lib/ctypes/test/runtests.py
[...]
# Python-2.5.4/Lib/encodings/ascii.pyc matches /Python-2.5.4/Lib/encodings/ascii.py
import encodings.ascii # precompiled from Python-2.5.4/Lib/encodings/ascii.pyc
....Segmentation fault (core dumped)

./python -v ./Lib/ctypes/test/runtests.py
[...]
# Python-2.6.2/Lib/ctypes/test/test_numbers.pyc matches Python-2.6.2/Lib/ctypes/test/test_numbers.py
import ctypes.test.test_numbers # precompiled from Python-2.6.2/Lib/ctypes/test/test_numbers.pyc
....Segmentation fault

Have people managed to get a working ctypes installation on HP-UX?

BR,
David Westlund


More information about the Python-list mailing list