In working on getting a 64-bit Python to build and pass the test suites on a Itanium 2 system running HP-UX 11, there were two major issues that needed to be resolved: - on ia64 HP-UX, unistd.h does not define _POSIX_THREADS and therefore Python/thread.c was not including thread_pthreads.h even though enough of the posix threading API is available to support threads in Python. - isnan() was not being called to check floating point numbers and math.sqrt(-1) would not throw a ValueError. The attached patch make the following changes: - modifies Python/thread.c to check for __hpux and _SC_THREADS and if they're defined, then define _POSIX_THREADS. - modifies Include/pyport.h to check for __hpux and __ia64 in the macro that defines _Py_SET_EDOM_FOR_NAN. - modifies Readme to include details on how to build a 64-bit version of Python on a HP-UX based Itanium 2 system. The patch file was created by running: cvs diff -c | tee ~/hpux_ia64_port.patch from python/dist/src on a current CVS tree. The current Readme also states that there is optimization problems when building Python on an ia64 based HP-UX system using HP's C compiler. I have not found this to be a problem. Should this note be removed or marked as out of date?
Logged In: YES user_id=21627 The patch looks good, but I have one comment: it would be better if the user would not have to specify flags explicitly. Python should build out of the box on the platform, with not having to set environment variables. Ideally, it should built forall of the most likely configurations, i.e. c89/aCC and gcc, both 64 bits (I guess nobody would want to build an ia32 binary even if this is possible).
Logged In: YES user_id=6380 Checked into HEAD and 2.4 branch, in time for 2.4.2. We didn't get to the automatic detection feature that Martin requested; sorry. We (Elemental Security) have mailed a contributor agreement to the PSF.