Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

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

11 views
Skip to first unread message

henning....@arcor.de

unread,
May 5, 2009, 9:16:38 AM5/5/09
to
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

henning....@arcor.de

unread,
May 13, 2009, 3:18:54 AM5/13/09
to
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.
>>> import threading
>>> threading._test()
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

Aahz

unread,
May 13, 2009, 10:25:05 AM5/13/09
to
In article <51d1dd3f-322d-47fa...@e20g2000vbc.googlegroups.com>,

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.
--
Aahz (aa...@pythoncraft.com) <*> http://www.pythoncraft.com/

"It is easier to optimize correct code than to correct optimized code."
--Bill Harlan

ajaksu

unread,
May 13, 2009, 3:42:24 PM5/13/09
to
henning.vonbar wrote:
> 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

henning....@arcor.de

unread,
May 19, 2009, 3:11:04 AM5/19/09
to
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

Aahz

unread,
May 19, 2009, 8:57:34 AM5/19/09
to
In article <fc58e391-7979-4220...@21g2000vbk.googlegroups.com>,

<henning....@arcor.de> wrote:
>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...

Try finding a usergroup/list for HP, you will probably have better luck
there.

"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

Lawrence D'Oliveiro

unread,
May 21, 2009, 7:18:15 AM5/21/09
to
In message <fc58e391-7979-4220-b6c9-
a06c23...@21g2000vbk.googlegroups.com>, henning....@arcor.de wrote:

> 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.

0 new messages