[ python-Bugs-1071597 ] configure problem on HP-UX 11.11

SourceForge.net noreply at sourceforge.net
Tue Mar 7 04:26:02 CET 2006


Bugs item #1071597, was opened at 11/23/04 02:30
Message generated for change (Settings changed) made by sf-robot
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1071597&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Build
Group: Platform-specific
>Status: Closed
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 
 
 
 

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

>Comment By: SourceForge Robot (sf-robot)
Date: 03/06/06 19:25

Message:
Logged In: YES 
user_id=1312539

This Tracker item was closed automatically by the system. It was
previously set to a Pending status, and the original submitter
did not respond within 14 days (the time period specified by
the administrator of this Tracker).

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

Comment By: Georg Brandl (birkenfeld)
Date: 02/20/06 02:27

Message:
Logged In: YES 
user_id=1188172

cbeatley: your problem should be fixed as the pwd module is
now builtin.

OP: do you still have problems with recent releases?

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

Comment By: Cameron Beatley (cbeatley)
Date: 06/15/05 13:18

Message:
Logged In: YES 
user_id=991535

I have the same problems. When I edit the pyconfig.h file as 
described and run Make again, I get the following

Traceback (most recent call last):
  File "./setup.py", line 1184, in ?
    main()
  File "./setup.py", line 1178, in main
    scripts = ['Tools/scripts/pydoc', 'Tools/scripts/idle',
  File "/CVS/apps/Python-2.4.1/Lib/distutils/core.py", line 
123, in setup
    dist.parse_config_files()
  File "/CVS/apps/Python-2.4.1/Lib/distutils/dist.py", line 339, 
in parse_config_files
    filenames = self.find_config_files()
  File "/CVS/apps/Python-2.4.1/Lib/distutils/dist.py", line 302, 
in find_config_files
    check_environ()
  File "/CVS/apps/Python-2.4.1/Lib/distutils/util.py", line 155, 
in check_environ
    import pwd
ImportError: No module named pwd
*** Error exit code 1


any idea what THIS is?

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

Comment By: Harri Pasanen (harripasanen)
Date: 01/06/05 03:01

Message:
Logged In: YES 
user_id=77088

Note that the _POSIX_C_SOURCE is also defined for gcc 3.4.3 on 
HP-UX 11.23 (Itanium).   I don't know if it defined for all the gcc 
platforms, as it would only show up if the definition in pyconfig.h is 
different from what the gcc driver uses. 

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

Comment By: Harri Pasanen (harripasanen)
Date: 01/05/05 06:46

Message:
Logged In: YES 
user_id=77088

_POSIX_C_SOURCE appears to come from the gcc driver, along with a 
few other macros. 
 
If I add "-v" to compilation, the output expands to: 
 
Reading specs 
from /usr/local/lib/gcc-lib/hppa2.0w-hp-hpux11.11/3.3.3/specs 
Configured 
with: /scratch/zack/pkgbuild/3.3.1/hpux-11/gcc-3.3.3/configure 
--enable-languages=c,c++ --enable-threads=posix --disable-nls 
--with-gnu-as --without-gnu-ld --with-as=/usr/local/bin/as 
--prefix=/usr/local 
Thread model: posix 
gcc version 3.3.3 
 /usr/local/lib/gcc-lib/hppa2.0w-hp-hpux11.11/3.3.3/cc1 -quiet -v -I. 
-I./Include -D__GNUC__=3 -D__GNUC_MINOR__=3 
-D__GNUC_PATCHLEVEL__=3 -D_REENTRANT -D_THREAD_SAFE 
-D_POSIX_C_SOURCE=199506L -DNDEBUG -DPy_BUILD_CORE 
Modules/python.c -quiet -dumpbase python.c -auxbase-strip 
Modules/python.o -g -O3 -Wall -Wstrict-prototypes -version 
-fno-strict-aliasing -o /var/tmp//ccLnAhZ0.s 
GNU C version 3.3.3 (hppa2.0w-hp-hpux11.11) 
        compiled by GNU C version 3.3.3. 
GGC heuristics: --param ggc-min-expand=100 --param 
ggc-min-heapsize=131072 
ignoring nonexistent directory 
"/usr/local/hppa2.0w-hp-hpux11.11/include" 
#include "..." search starts here: 
#include <...> search starts here: 
 . 
 Include 
 /usr/local/include 
 /usr/local/lib/gcc-lib/hppa2.0w-hp-hpux11.11/3.3.3/include 
 /usr/include 
End of search list. 
In file included from Include/Python.h:8, 
                 from Modules/python.c:3: 
pyconfig.h:835:1: warning: "_POSIX_C_SOURCE" redefined 
<command line>:6:1: warning: this is the location of the previous 
definition 
 /usr/local/bin/as --traditional-format -o 
Modules/python.o /var/tmp//ccLnAhZ0.s 
 

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

Comment By: Martin v. Löwis (loewis)
Date: 12/23/04 15:50

Message:
Logged In: YES 
user_id=21627

Can you find out why gcc says that "_POSIX_C_SOURCE" is
defined on the command line? On the command line you
provide, it isn't.

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

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