How to build Python 2.6.2 on HP-UX Itanium with thread support?

  • Thread starter henning.vonbargen
  • Start date
H

henning.vonbargen

Our program that makes use of cx_Oracle and multi-threading (and works
fine on Windows, Linux and other platforms, including HP-UX PA-RISC),
fails to run on HP-UX Itanium.
When trying to start the first daemon thread, the program raises an
exception:
....
File "/usr/local/lib/python2.6/threading.py", line 471, in start
_start_new_thread(self.__bootstrap, ())
error: can't start new thread

I guess there's something wrong with the way we built Python, but I
have absolutely no clue what (I'm not too familiar with HP-UX).
From what I found in the internet, it's probably something about the
threading libraries at the C level.

So the question is:
Which steps are necessary to build Python 2.6.2 (32bit or 64bit) on HP-
UX Itanium 11.31 with working multi-threading support?

Note:
For whatever reasons, in order to get cx_Oracle 5.0.1 to work on HP-
UX, I have to build it as a built-in module. That's why I have to
build Python myself (and unfortunately there's no Python 2.6.2 binary
distribution for HP-UX itanium available). Everything works fine
except multi-threading.

Before running configure and make, I set up the environment like this:
export PATH=$PATH:/usr/local/bin
export CPPFLAGS=-I/opt/openssl/0.9.8/include
export LDFLAGS="-L/usr/lib/hpux32 -L/usr/local/lib/hpux32 -L/opt/
openssl/0.9.8/lib"

I have the files generated by configure and make available, but it's
too much to post it all, as as I don't know what is relevant and what
not.
So, here's just the first few lines of the config.log output:

This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

It was created by python configure 2.6, which was
generated by GNU Autoconf 2.61. Invocation command line was

$ ./configure --with-zlib --with-openssl

## --------- ##
## Platform. ##
## --------- ##

hostname = polref4
uname -m = ia64
uname -r = B.11.31
uname -s = HP-UX
uname -v = U
 
H

henning.vonbargen

New info: The problem is not related to the specific program - it is
definitely a build problem, as the following test shows:
Python 2.6.2 (r262:71600, Apr 28 2009, 17:38:15)
[GCC 4.2.3] on hp-ux11
Type "help", "copyright", "credits" or "license" for more information.Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python2.6/threading.py", line 952, in _test
t.start()
File "/usr/local/lib/python2.6/threading.py", line 471, in start
_start_new_thread(self.__bootstrap, ())
thread.error: can't start new thread

The compiler I used was GCC 4.2.3
 
A

Aahz

New info: The problem is not related to the specific program - it is
definitely a build problem, as the following test shows:
Python 2.6.2 (r262:71600, Apr 28 2009, 17:38:15)
[GCC 4.2.3] on hp-ux11
Type "help", "copyright", "credits" or "license" for more information.Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python2.6/threading.py", line 952, in _test
t.start()
File "/usr/local/lib/python2.6/threading.py", line 471, in start
_start_new_thread(self.__bootstrap, ())
thread.error: can't start new thread
The compiler I used was GCC 4.2.3

You probably want to start by figuring out which threading library is
being used -- Python normally wants Posix threads, but IIRC, that's not
the default on HP-UX, and you may need to fix the build process to use
Posix.
 
A

ajaksu

henning.vonbar said:
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python2.6/threading.py", line 952, in _test
    t.start()
  File "/usr/local/lib/python2.6/threading.py", line 471, in start
    _start_new_thread(self.__bootstrap, ())
thread.error: can't start new thread

What do you get with:
import thread
thread.start_new_thread(int, ('1',2))

?

Daniel
 
H

henning.vonbargen

Daniel:
What do you get with:
import thread
thread.start_new_thread(int, ('1',2))

This results in the same error message:
thread.error: can't start new thread

Aahz:
You probably want to start by figuring out which threading library is
being used -- Python normally wants Posix threads, but IIRC, that's not
the default on HP-UX, and you may need to fix the build process to use
Posix.

You're probably right, but I'm lost here, since I'm neither a *nix nor
a HP-UX expert in building software from source. I'm used to
"configure; make; make install", which usually works well on other
platforms...

Henning
 
A

Aahz

Aahz:

You're probably right, but I'm lost here, since I'm neither a *nix nor
a HP-UX expert in building software from source. I'm used to
"configure; make; make install", which usually works well on other
platforms...

Try finding a usergroup/list for HP, you will probably have better luck
there.
--
Aahz ([email protected]) <*> http://www.pythoncraft.com/

"In 1968 it took the computing power of 2 C-64's to fly a rocket to the moon.
Now, in 1998 it takes the Power of a Pentium 200 to run Microsoft Windows 98.
Something must have gone wrong." --/bin/fortune
 
L

Lawrence D'Oliveiro

In message <fc58e391-7979-4220-b6c9-
I'm used to "configure; make; make install", which usually works well on
other platforms...

It's often worthwhile to try

./configure --help

and see if any of the options might be relevant.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,009
Latest member
GidgetGamb

Latest Threads

Top