[Python-bugs-list] [ python-Bugs-589427 ] standard include paths on command line

noreply@sourceforge.net noreply@sourceforge.net
Fri, 02 Aug 2002 05:54:12 -0700


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

Category: Build
Group: Python 2.3
Status: Open
Resolution: Invalid
Priority: 5
Submitted By: Matthias Klose (doko)
>Assigned to: Martin v. L÷wis (loewis)
Summary: standard include paths on command line

Initial Comment:
when compiling shared modules (using gcc-3.1.1), 
standard include paths are included (by setup.py?) in 
the include path, which can change the search order. 
gcc-3.1 warns about:

building 'xreadlines' extension
gcc-3.1 -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -
fPIC -I. -I/home/packages/pyt
hon2.3/python2.3-2.2.90/./Include -I/usr/include -
I/usr/local/include -I/home/pa
ckages/python2.3/python2.3-2.2.90/Include -
I/home/packages/python2.3/python2.3-2
.2.90/build-static -
c /home/packages/python2.3/python2.3-
2.2.90/Modules/xreadlin
esmodule.c -o build/temp.linux-i686-
2.3/xreadlinesmodule.o
gcc -shared build/temp.linux-i686-
2.3/xreadlinesmodule.o -L/usr/lib -L/usr/local
/lib -o build/lib.linux-i686-2.3/xreadlines.so
building 'array' extension
gcc-3.1 -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -
fPIC -I. -I/hocc1: warning: c
hanging search order for system 
directory "/usr/local/include"
cc1: warning:   as it has already been specified as a non-
system directory
cc1: warning: changing search order for system 
directory "/usr/include"
cc1: warning:   as it has already been specified as a non-
system directory
cc1: warning: changing search order for system 
directory "/usr/local/include"
cc1: warning:   as it has already been specified as a non-
system directory
cc1: warning: changing search order for system 
directory "/usr/include"
cc1: warning:   as it has already been specified as a non-
system directory
cc1: warning: changing search order for system 
directory "/usr/local/include"
cc1: warning:   as it has already been specified as a non-
system directory

In this case, /usr/include and /usr/local/include should 
not be included on the command line.


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

>Comment By: Michael Hudson (mwh)
Date: 2002-08-02 12:54

Message:
Logged In: YES 
user_id=6656

OK, can you try the attached patch?

Martin, does this look OK to you?

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

Comment By: Michael Hudson (mwh)
Date: 2002-08-02 08:53

Message:
Logged In: YES 
user_id=6656

Ah, sorry!

Hmm.  Now I don't see the problem, i.e. for me
-I/usr/include is not part of the command line passed to the
compiler.

Are you building from up-to-date CVS?  Though I don't recall
any recent changes in this area.  Ahh, you're running
".../configure --prefix=/usr", right?

I'll dig.

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

Comment By: Matthias Klose (doko)
Date: 2002-08-01 20:23

Message:
Logged In: YES 
user_id=60903

I disagree. The discussion is on /usr/local/include. We are 
talking about /usr/include, which is a system include dir on 
almost all systems.

See the thread "gcc 3.2's cpp breaks configure scripts" at 
http://gcc.gnu.org/ml/gcc/2002-07/, i.e.:

http://gcc.gnu.org/ml/gcc/2002-07/msg01527.html

Inclusion of /usr/include can lead to errors, as explained in:
http://gcc.gnu.org/ml/gcc/2002-07/msg01541.html

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

Comment By: Michael Hudson (mwh)
Date: 2002-08-01 09:08

Message:
Logged In: YES 
user_id=6656

This has been deemed a bug in gcc, see this thread:

http://mail.python.org/pipermail/python-dev/2002-June/025990.html

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

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