[issue7573] Python build issue on Ubuntu 9.10

2010-02-26 Thread instigate_team

instigate_team narine_martiros...@instigatedesign.com added the comment:

This is a solution in case if an application contains only several files, where 
I can control the includes consequence. But if application has many files, 
directories, in this case the hierarchy of the files includes can not be traced.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7573
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue7573] Python build issue on Ubuntu 9.10

2010-02-26 Thread Brian Curtin

Brian Curtin cur...@acm.org added the comment:

That solution will work if you have 1 file or 1000 files. The note on the 
documentation is very clear on what has to happen.

--
nosy: +brian.curtin

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7573
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue7573] Python build issue on Ubuntu 9.10

2010-02-22 Thread Stefan Krah

Stefan Krah stefan-use...@bytereef.org added the comment:

This is documented, so I'd recommend to close this issue.

http://docs.python.org/3.1/c-api/intro.html#include-files

--
nosy: +skrah

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7573
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue7573] Python build issue on Ubuntu 9.10

2009-12-24 Thread instigate_team

New submission from instigate_team narine_martiros...@instigatedesign.com:

Hello Python development team!

We encountered problem concerning Python 3.1 usage.

Platform info:

Ubuntu 9.10 32/64bit, glibc v. 2.10.1, gcc v. 4.4.0, Python 3.1.

Problem description:

  Below is given the C++ program text causing the warning:
   
#include string
#include Python.h

int main()
{
 return 0;
}

Compilation result is the following:

In file included from /usr/include/python3.1/Python.h:8,
 from main.cpp:3:
/usr/include/python3.1/pyconfig.h:1108:1: warning: _POSIX_C_SOURCE
redefined
In file included from
/usr/include/c++/4.4/i486-linux-gnu/bits/os_defines.h:39,
 from
/usr/include/c++/4.4/i486-linux-gnu/bits/c++config.h:243,
 from /usr/include/c++/4.4/string:40,
 from main.cpp:2:
/usr/include/features.h:158:1: warning: this is the location of the
previous definition
In file included from /usr/include/python3.1/Python.h:8,
 from main.cpp:3:
/usr/include/python3.1/pyconfig.h:1130:1: warning: _XOPEN_SOURCE redefined
In file included from
/usr/include/c++/4.4/i486-linux-gnu/bits/os_defines.h:39,
 from
/usr/include/c++/4.4/i486-linux-gnu/bits/c++config.h:243,
 from /usr/include/c++/4.4/string:40,
 from main.cpp:2:
/usr/include/features.h:160:1: warning: this is the location of the
previous definition

Analyzing the error:

We find out that the includes sequence influences on the application
build. We have no problem in case if Python header is included before
string file.
The problem is concerning the conflict of pyconfig.h  and features.h
(/usr/include/features.h, which is the part of glibc), which is included
in string header file. We have the same result with any header file,
which includes features.h file.

File features.h defines _POSIX_C_SOURCE in case of some conditions are true.

In its turn pyconfig.h contains the following code in line 1108

#define _POSIX_C_SOURCE 200112L

And we get redefinition warning. Our projects are working with gcc
-Werror flags, so this is the blocking problem.

The same happened with _XOPEN_SOURCE.

Any help from your side will be very much appreciated.

--
components: Build
messages: 96852
nosy: instigate_team
severity: normal
status: open
title: Python build issue on Ubuntu 9.10
type: compile error
versions: Python 3.1

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7573
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue7573] Python build issue on Ubuntu 9.10

2009-12-24 Thread Martin v . Löwis

Martin v. Löwis mar...@v.loewis.de added the comment:

If you do reorder the include statements, will then the warning go away?

--
nosy: +loewis

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7573
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue7573] Python build issue on Ubuntu 9.10

2009-12-24 Thread instigate_team

instigate_team narine_martiros...@instigatedesign.com added the comment:

Yes, We have no warnings after changing the include sequence.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7573
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com