[Python-bugs-list] [Bug #114324] Minor build problems on HPUX for 2.0b1

noreply@sourceforge.net noreply@sourceforge.net
Fri, 22 Sep 2000 13:18:24 -0700


Bug #114324, was updated on 2000-Sep-13 02:20
Here is a current snapshot of the bug.

Project: Python
Category: Build
Status: Open
Resolution: None
Bug Group: Platform-specific
Priority: 4
Summary: Minor build problems on HPUX for 2.0b1

Details: Build problems on HPUX10.20/HPUX11.00:

  - There seems to be no prototype for "fdatasync" in any include file
    although it has a man page and it is present in libc (so HAVE_FDATASYNC
    is set). As a result posixmodule.c fails to compile.
   
    Adding a prototype "extern int fdatasync(int);" to posixmodule.c solves 
    this problem, but it may not be portable.
    
  - Modules/mmapmodule.c is missing a "#include <limits.h>"
  
Build problems on HPUX10.20 only:

  - When configured with threading support (default), the cast to (long)
    on line 181 of Python/thread_pthread.h fails. The reason is that
    pthread_t is a struct type. The "configure" test that tries to find out
    the size of pthread_t failed because it tries to cast '0' to a pthread_t,
    so SIZEOF_PTHREAD_T remains undefined.
    
    I suggest changing this line in configure.in:
    
    AC_TRY_COMPILE([#include <pthread.h>], [pthread_t x; x = (pthread_t)0;], have_pthread_t=yes)
    
    to
    
    AC_TRY_COMPILE([#include <pthread.h>], [pthread_t x; x = *(pthread_t*)0;], have_pthread_t=yes)
    
My compiler settings:

   setenv CC 'c89 +DA1.1 +Onolimit -D_HPUX_SOURCE'

Regards,

Eddy

Follow-Ups:

Date: 2000-Sep-16 10:01
By: gvanrossum

Comment:
Randomly assigned to Jeremy for further investigation.
-------------------------------------------------------

Date: 2000-Sep-22 03:04
By: gvanrossum

Comment:
Assigned back to me because I'm planning to tackle HP build problems.
-------------------------------------------------------

Date: 2000-Sep-22 09:04
By: gvanrossum

Comment:
I've checked in a fix for fdatasync. Can you test that?
I'm also working on the thread config, that'll take longer.
-------------------------------------------------------

Date: 2000-Sep-22 09:41
By: edg

Comment:
The fix for fdatasync works.
However, I think it's better to use __hpux instead of __hppa to detect HP-UX.
(__hppa identifies the processor architecture).

FYI: The native cc/c89 compiler defines both __hppa and __hpux.
Gcc additionally defines hppa and hpux.

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

Date: 2000-Sep-22 12:44
By: gvanrossum

Comment:
I *think* I've squashed this bug with my latest checkin to configure.in and configure. Thanks for the suggestion! Please test so I can close this bug report.
-------------------------------------------------------

Date: 2000-Sep-22 13:18
By: edg

Comment:
I can't test it before Monday, but it looks like you've
made a typo:

Configure.in, line 2522:
  ... *(pthread_t)*0; 

should be:

  ... *(pthread_t*)0; 

BTW: Modules/mmapmodule.c still misses 

#ifdef HAVE_LIMITS_H
#include <limits.h>
#endif

Without this, INT_MAX is undefined on HP-UX.

I'll test it first thing Monday morning.

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

For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=114324&group_id=5470