[Python-bugs-list] [ python-Bugs-231377 ] [HP-UX] Python chokes on pthread_mutex_init

noreply@sourceforge.net noreply@sourceforge.net
Wed, 15 Aug 2001 23:48:49 -0700


Bugs item #231377, was opened at 2001-02-07 01:56
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=231377&group_id=5470

Category: Threads
Group: Platform-specific
Status: Open
Resolution: None
Priority: 3
Submitted By: Thomas Wallgram (twallgram)
Assigned to: Guido van Rossum (gvanrossum)
Summary: [HP-UX] Python chokes on pthread_mutex_init

Initial Comment:
Hello,
I need python 1.5.2 (only this version) on a HP-UX-System with threads. I started configure with the --with-threads-Option. Then I did the 'make'-command (No problems during the compilation). Then I started make test. See the output bellow:

# make test
        (cd Modules; make -f Makefile.pre Makefile)
`Makefile' is up to date.
making Makefile in subdirectory .
`Makefile' is up to date.
making Makefile in subdirectory Parser
`Makefile' is up to date.
making Makefile in subdirectory Objects
`Makefile' is up to date.
making Makefile in subdirectory Python
`Makefile' is up to date.
making Makefile in subdirectory Modules
        (rm -f Modules/hassignal; cd Modules; make hassignal)
        rm -f hassignal
        for i in threadmodule.o  regexmodule.o regexpr.o  pcremodule.o pypcre.o  posixmodule.o  signalmodule.o  arraymodule.o  cmathmodule.o  mathmodule.o  stropmodule.o  structmodule.o  timemodule.o  operator.o  fcntlmodule.o  pwdmodule.o  grpmodule.o  selectmodule.o  socketmodule.o  errnomodule.o  md5module.o md5c.o  shamodule.o  rotormodule.o  newmodule.o  binascii.o  parsermodule.o  cStringIO.o  cPickle.o config.o getpath.o main.o getbuildinfo.o; do \
                    if test "$i" = "signalmodule.o"; then \
                       echo yes >hassignal; break; \
                    fi; \
                done
        cd Parser ; make OPT="-g -O2" VERSION="1.5" \
                        prefix="/usr/local" exec_prefix="/usr/local" all
        cd Objects ; make OPT="-g -O2" VERSION="1.5" \
                        prefix="/usr/local" exec_prefix="/usr/local" all
        cd Python ; make OPT="-g -O2" VERSION="1.5" \
                        prefix="/usr/local" exec_prefix="/usr/local" all
        cd Modules ; make OPT="-g -O2" VERSION="1.5" \
                        prefix="/usr/local" exec_prefix="/usr/local" all
        if test ! -f libpython1.5.a; \
                then for i in Parser Objects Python Modules; do rm -f $i/add2lib; done; true; \
                else true; fi
        for i in Parser Objects Python Modules; do \
                        (cd $i; make VERSION="1.5" add2lib); done
`add2lib' is up to date.
`add2lib' is up to date.
`add2lib' is up to date.
`add2lib' is up to date.
        rm -f ./Lib/test/*.py[co]
        PYTHONPATH= ./python ./Lib/test/regrtest.py 
pthread_mutex_init: Invalid argument
sh: 11423 Memory fault(coredump)
*** Error exit code 139 (ignored)
        PYTHONPATH= ./python ./Lib/test/regrtest.py 
pthread_mutex_init: Invalid argument
sh: 11425 Memory fault(coredump)
*** Error exit code 139

Stop.

I need python 1.5.2 for compiling Zope 2.0 (which only needs python in this version with threads). It seems the same error as bug # 130029, but I can submit a coredump. Can anybody help me? You can use this HP-UX-machine for checking the compilation :-) 

bye Tom


----------------------------------------------------------------------

Comment By: Nobody/Anonymous (nobody)
Date: 2001-08-15 23:48

Message:
Logged In: NO 

I've got the same problem. 
The problem was solved by changes in makefiles.
You should specify some additional D-flags, and
one or more libraries.
If anybody need more details, I'l be responsible on
gpu@swisslog-service.de

regards,
gpu

----------------------------------------------------------------------

Comment By: T Farrell (glory_2_god)
Date: 2001-04-05 11:27

Message:
Logged In: YES 
user_id=11441

harripasanen has the solution nailed.  Unfortunately, just 
how to do this escapes many people.  I will explain a bit 
more thoroughly, so people who come across this by a google 
search (as I did) will have more info.
This is for HP-UX 11.00, Python-2.0, compiling with GNU 
tools:
./configure --with-threads
make
rm python
cd Modules
gcc -Wl,-E -Wl,+s -Wl,+b/lib/python2.0/lib-dynload \
    python.o ../libpython2.0.a -lnsl -ldld \
    -lpthread -lm -o python
mv python ..
make install

Happy Zoping :)
PS. If you built zope before, don't forget to 
python wo_pcgi.py

----------------------------------------------------------------------

Comment By: Harri Pasanen (harripasanen)
Date: 2001-04-04 07:19

Message:
Logged In: YES 
user_id=77088

If it is HP-UX 11.00, just perform the final link of python
manually, replacing -lcma with -lpthread

-Harri

----------------------------------------------------------------------

Comment By: Tim Peters (tim_one)
Date: 2001-02-09 15:50

Message:
Another for the eternal HP-UX pile.

----------------------------------------------------------------------

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=231377&group_id=5470