[Python-bugs-list] [ python-Bugs-663397 ] Tru64 Unix macro problems

SourceForge.net noreply@sourceforge.net
Tue, 07 Jan 2003 04:59:19 -0800


Bugs item #663397, was opened at 2003-01-07 00:43
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=663397&group_id=5470

Category: Extension Modules
Group: Python 2.3
Status: Open
Resolution: None
Priority: 5
Submitted By: Ralf W. Grosse-Kunstleve (rwgk)
Assigned to: Nobody/Anonymous (nobody)
Summary: Tru64 Unix macro problems

Initial Comment:
Commands used for installing Python 2.3a1:

./configure --prefix=/usr/local_cci/Python-2.3a1
make
make install

Compilation of C++ code (Boost.Python library) fails.
Here is a minimal example:

% cat trouble.cpp 
#include <standards.h>
#include <sys/time.h>
#include <Python.h>

% cxx -std strict_ansi -msg_disable 450 -
I/usr/local_cci/Python-2.3a1/include/python2.3 -c 
trouble.cpp
cxx: Warning: /usr/local_cci/Python-
2.3a1/include/python2.3/pyconfig.h, line 797: 
          incompatible redefinition of macro "_OSF_SOURCE" 
(declared at line
          206 of "/usr/include/standards.h")
#define _OSF_SOURCE 1
--------^
cxx: Warning: /usr/local_cci/Python-
2.3a1/include/python2.3/pyconfig.h, line 804: 
          incompatible redefinition of 
macro "_POSIX_C_SOURCE" (declared at
          line 198 of "/usr/include/standards.h")
#define _POSIX_C_SOURCE 200112L
--------^
cxx: Warning: /usr/local_cci/Python-
2.3a1/include/python2.3/pyconfig.h, line 816: 
          incompatible redefinition of 
macro "_XOPEN_SOURCE" (declared at line
          188 of "/usr/include/standards.h")
#define _XOPEN_SOURCE 600
--------^
cxx: Error: /usr/include/sys/stat.h, line 204: 
identifier "blksize_t" is
          undefined
        __F64_STAT
--------^
cxx: Error: /usr/include/sys/stat.h, line 204: 
identifier "blkcnt_t" is
          undefined
        __F64_STAT
--------^
cxx: Info: 2 errors detected in the compilation 
of "trouble.cpp".

I am glad to open an account on our machine if this could 
help in correcting the problem.

Thanks,
Ralf


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

>Comment By: Martin v. Löwis (loewis)
Date: 2003-01-07 13:59

Message:
Logged In: YES 
user_id=21627

That's an error in your code. You must always include 
Python.h as the first header file.

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

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