need help with build on HP-UX

Philipp Jocham philipp.jocham at salomon.at
Tue Aug 29 07:23:25 EDT 2000


Jeremy Hylton <jeremy at beopen.com> wrote:
> We have a bug report for Python 1.5.2 that says building with threads
> enabled causes a core dump with the interpreter is started.

> #110650:
> http://sourceforge.net/bugs/?func=detailbug&bug_id=110650&group_id=5470

> I don't have access to an HP-UX box on which to text this problem.  If
> anyone does, could they verify whether the problem exists with the
> current code?

Python-1.6b1 on HP-UX 11.00 build with gcc-2.8.1

% ./configure --with-threads
[...]
checking for --with-thread... yes
checking for mach/cthreads.h... no
checking for pth_init in -lpth... no
checking for pthread_create in -lpthread... no
checking for pthread_detach... no
checking for kernel/OS.h... no
checking for pthread_create in -lpthreads... no
checking for pthread_create in -lc_r... no
checking for __d6_pthread_create in -lthread... no
checking for pthread_create in -lcma... yes
[...]
% make
% make test

yields

[...]
        PYTHONPATH= ./python -tt ./Lib/test/regrtest.py 
pthread_mutex_init: Invalid argument
sh: 5019 Memory fault(coredump)
*** Error exit code 139 (ignored)
	
I've experienced a similar problem with python-1.5.2
see
http://sourceforge.net/bugs/?group_id=5470&func=detailbug&bug_id=110665

The problem is the same. The function pthread_create is a macro
in sys/pthread.h and pointing to __pthread_create_system. Finally
pthread_create is detected in /usr/lib/libcma.a, which doesn't have
a compatible pthread_mutex_init function.

Hacking the Makefiles (after running configure) by changing
the LIBS= lines from
	LIBS=           -lnet -lnsl -ldld  -lcma
to
	LIBS=           -lnet -lnsl -ldld  -lpthread -lcl

links the object-files against the pthread library. 
This solution has worked for 1.5.2 and runs at least all tests
correctly for 1.6b1

A solution might be to add a test for 
	__pthread_create_system in /usr/lib/libpthread.a 
in the configure.in script.

Philipp
--
mailto: philipp.jocham at salomon.at



More information about the Python-list mailing list