[ python-Bugs-1071597 ] configure problem on HP-UX 11.11
SourceForge.net
noreply at sourceforge.net
Tue Nov 23 11:30:50 CET 2004
Bugs item #1071597, was opened at 2004-11-23 10:30
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1071597&group_id=5470
Category: Build
Group: Platform-specific
Status: Open
Resolution: None
Priority: 5
Submitted By: Harri Pasanen (harripasanen)
Assigned to: Nobody/Anonymous (nobody)
Summary: configure problem on HP-UX 11.11
Initial Comment:
Python 2.4c1 has this problem (but if I recall, so did 2.3.3)_
Using gcc 3.3.3 to build on HP-UX 11.11, the
configure out of the box is a bit off, resulting in a failed build, due
to missing thread symbols:
/usr/ccs/bin/ld: Unsatisfied symbols:
PyThread_acquire_lock (first referenced in
libpython2.4.a(import.o)) (code)
PyThread_exit_thread (first referenced in
libpython2.4.a(threadmodule.o)) (code)
PyThread_allocate_lock (first referenced in
libpython2.4.a(import.o)) (code)
PyThread_free_lock (first referenced in
libpython2.4.a(threadmodule.o)) (code)
PyThread_start_new_thread (first referenced in
libpython2.4.a(threadmodule.o)) (code)
PyThread_release_lock (first referenced in
libpython2.4.a(import.o)) (code)
PyThread_get_thread_ident (first referenced in
libpython2.4.a(import.o)) (code)
PyThread__init_thread (first referenced in
libpython2.4.a(thread.o)) (code)
collect2: ld returned 1 exit status
A workaround is to manually edit pyconfig.h, adding
#define _POSIX_THREADS
(The reason it is not picked up is that unistd.h on HP-UX has this
comment:
/************************************************************************
* The following defines are specified in the standard, but are not
yet
* implemented:
*
* _POSIX_THREADS can't be defined until all
* features are implemented
)
The implementation seems however to be sufficiently complete
to permit compiling and running Python with _POSIX_THREADS.
While I'm editing pyconfig.h, I also comment out
_POSIX_C_SOURCE definition, as it will result in lots of
compilation warnings, of the style:
gcc -pthread -c -fno-strict-aliasing -DNDEBUG -g -O3 -Wall
-Wstrict-prototypes -I. -I../Python-2.4c1/Include
-DPy_BUILD_CORE -o
Objects/frameobject.o ../Python-2.4c1/Objects/frameobject.c
In file included from ../Python-2.4c1/Include/Python.h:8,
from ../Python-2.4c1/Objects/frameobject.c:4:
pyconfig.h:835:1: warning: "_POSIX_C_SOURCE" redefined
<command line>:6:1: warning: this is the location of the
previous definition
------------
So, to recapitulate: After configure, add
#define _POSIX_THREADS
and comment out
#define _POSIX_C_SOURCE 200112L
That will give you a Python working rather well,
with "make test" producing:
251 tests OK.
1 test failed:
test_pty
38 tests skipped:
test_aepack test_al test_applesingle test_bsddb
test_bsddb185
test_bsddb3 test_cd test_cl test_codecmaps_cn
test_codecmaps_hk
test_codecmaps_jp test_codecmaps_kr test_codecmaps_tw
test_curses
test_dl test_gdbm test_gl test_imgfile test_largefile
test_linuxaudiodev test_locale test_macfs test_macostools
test_nis
test_normalization test_ossaudiodev test_pep277 test_plistlib
test_scriptpackages test_socket_ssl test_socketserver
test_sunaudiodev test_tcl test_timeout test_urllib2net
test_urllibnet test_winreg test_winsound
1 skip unexpected on hp-ux11:
test_tcl
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1071597&group_id=5470
More information about the Python-bugs-list
mailing list