Hello there,

I included --with-threads option into the configure script calling, which it 
failed to add the -D_REENTRANT into Makefile. So I manually added this into OPT 
of the Makefile. I ran make again and generated a new python binary. However, 
the new binary is still not able to start a new thread from the thread module. 

I reviewed the config.log file, I think this failure has caused the build with 
threads failed. Cthreads.h header file is missing. Should this be included in 
my HP UX Compiler or it comes from python source? In python source I only found 
pythread.h. Anyway, I am only guessing what is wrong. 

Hope to hear some feedback here, whether this is something missing or a bug. 

configure:8407: checking for --with-threads
configure:8427: result: yes
configure:8484: checking for _POSIX_THREADS in unistd.h
configure:8503: result: yes
configure:8508: checking cthreads.h usability
configure:8508: cc +DD64 -I/home/r32813/local/include -c -g  conftest.c >&5
"conftest.c", line 128: error #3696-D: cannot open source file "cthreads.h"
  #include <cthreads.h>
                       ^
1 error detected in the compilation of "conftest.c".

| #define HAVE_LIBDLD 1
| #define _REENTRANT 1
| /* end confdefs.h.  */
| #include <cthreads.h>
configure:8508: result: no
configure:8508: checking for cthreads.h
configure:8508: result: no
configure:8521: checking mach/cthreads.h usability
configure:8521: cc +DD64 -I/home/r32813/local/include -c -g  conftest.c >&5
"conftest.c", line 128: error #3696-D: cannot open source file "mach/cthreads.h"
  #include <mach/cthreads.h>
                            ^

1 error detected in the compilation of "conftest.c".
configure:8521: $? = 2
configure: failed program was:
| /* confdefs.h */
| #define _GNU_SOURCE 1

| #define HAVE_LIBDLD 1
| #define _REENTRANT 1
| /* end confdefs.h.  */
| #include <mach/cthreads.h>
configure:8521: result: no
configure:8521: checking for mach/cthreads.h
configure:8521: result: no
configure:8533: checking for --with-pth
configure:8548: result: no
configure:8556: checking for pthread_create in -lpthread
configure:8572: cc +DD64 -I/home/r32813/local/include -o conftest -g  
-L/home/r32813/local/lib -L/home/r32813/Build/2.7.1/Python-2.7.1 conftest.c -l
nsl -lrt -ldld -ldl  -lpthread >&5


Regards,
Wah Meng
Genesis Wafermap Support Ticket: 
To report a problem: 
http://dyno.freescale.net/Question/QuestionMain3.asp?location=zmy02&category=&tickettype=6820
To request a service: 
http://dyno.freescale.net/Question/Questionmain3.asp?location=74&category=2&tickettype=6819
Or if it is related to EWM or DSA: 
http://dyno.freescale.net/Question/Questionmain3.asp?location=ZMY02&tickettype=6539

-----Original Message-----
From: Wong Wah Meng-R32813 
Sent: Wednesday, September 28, 2011 4:37 PM
To: python-list@python.org
Subject: python 2.7.1 built not supporting thread? 


Hello there,

I couldn't detect this problem until I run my application that utilizes thread 
module in python that I just built on HP-UX 11.31 ia64 using aCC.

Could it be the build did not include enable thread option? _REENTRANT as 
stated in the README file? If yes, it looks like threading may not work "out of 
the box". 


>>> thread.start_new_thread(testing, ())
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
thread.error: can't start new thread
>>>

Excerpts from README file for python 2.7 build

HP-UX:  When using threading, you may have to add -D_REENTRANT to the
        OPT variable in the top-level Makefile; reported by Pat Knight,
        this seems to make a difference (at least for HP-UX 10.20)
        even though pyconfig.h defines it. This seems unnecessary when
        using HP/UX 11 and later - threading seems to work "out of the
        box".

 

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to