[Python-bugs-list] [ python-Bugs-435446 ] Python.h not found while building extent

noreply@sourceforge.net noreply@sourceforge.net
Fri, 22 Jun 2001 05:40:06 -0700


Bugs item #435446, was updated on 2001-06-22 05:40
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=435446&group_id=5470

Category: Extension Modules
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Gilles Civario (gcivario)
Assigned to: Nobody/Anonymous (nobody)
Summary: Python.h not found while building extent

Initial Comment:
I've got an extention module which installation was simple whith python1.5.2
With python2.1, an error occure :

$ make -f Makefile.pre.in boot
$ make static
cc -O -I/luna/civario/prodtmp/include/python2.1 -I/luna/civario/prodtmp/include/python2.1 
-DHAVE_CONFIG_H -c config.c
cc   -O  -DSunOS -DHAVE_CONFIG_H -I../../SUNTOOL/sources -L../../SUNTOOL/Solaris/bin 
-lsuntool -lF77 -lsunmath -lM77 -lfui -lfai -lfai2 -lfsumai -lfprodai -lfminlai -lfmaxlai -lfminvai 
-lfmaxvai -lfsu -lsunmath -lm -c ././../../SUNTOOL/sources/lcmmodule.c -o ./lcmmodule.o
"././../../SUNTOOL/sources/lcmp.h", line 40: cannot find include file: "Python.h"
cc: acomp failed for ././../../SUNTOOL/sources/lcmmodule.c
*** Error code 2
make: Fatal error: Command failed for target `lcmmodule.o'


The Setup file look so :
-----8<--------------------------------------------------------------
PLATFORM=Solaris
MACH=SunOS
F7LIBS= -lF77 -lsunmath -lM77 -lfui -lfai -lfai2 -lfsumai -lfprodai -lfminlai -lfmaxlai -lfminvai 
-lfmaxvai -lfsu -lsunmath -lm
F9LIBS= -lF77 -lsunmath -lM77 -lfui -lfai -lfai2 -lfsumai -lfprodai -lfminlai -lfmaxlai -lfminvai 
-lfmaxvai -lfsu -lsunmath -lm
LCM_IMPORT=
LIBAUT = bin/libdragon.a
MYLIBS= -L../../SUNTOOL/$(PLATFORM)/bin -lsuntool

FLAGS= -O $(LCM_IMPORT) -D$(MACH) -DHAVE_CONFIG_H -I../../SUNTOOL/sources

lcm ../../SUNTOOL/sources/lcmmodule.c $(FLAGS) $(MYLIBS) $(F7LIBS)
sunset ../sources/sunsetmodule.c $(FLAGS) $(LIBAUT) $(MYLIBS) $(F7LIBS)
-----8<--------------------------------------------------------------

Finaly, I found a workarround by changing the PY_CFLAGS in CFLAGS in the Makefile :

-----8<--------------------------------------------------------------
# Rules appended by makedepend

./lcmmodule.o: $(srcdir)/./../../SUNTOOL/sources/lcmmodule.c; $(CC) $(PY_CFLAGS)  $(FLAGS) 
$(MYLIBS) $(F7LIBS) -c $(srcdir)/./../../SUNTOOL/sources/lcmmodule.c -o ./lcmmodule.o
./lcmmodule$(SO):  ./lcmmodule.o; $(LDSHARED)  ./lcmmodule.o  $(FLAGS) $(MYLIBS) $(F7LIBS)  
-o ./lcmmodule$(SO)
./sunsetmodule.o: $(srcdir)/./../sources/sunsetmodule.c; $(CC) $(PY_CFLAGS)  $(FLAGS) 
$(LIBAUT) $(MYLIBS) $(F7LIBS) -c $(srcdir)/./../sources/sunsetmodule.c -o ./sunsetmodule.o
./sunsetmodule$(SO):  ./sunsetmodule.o; $(LDSHARED)  ./sunsetmodule.o  $(FLAGS) $(LIBAUT) 
$(MYLIBS) $(F7LIBS)  -o ./sunsetmodule$(SO)
-----8<--------------------------------------------------------------

Should I change my Setup file, or is it a bug ?

$ uname -a
SunOS saturne 5.7 Generic_106541-12 sun4u sparc SUNW,Ultra-60
$ python
Python 2.1 (#1, Jun 21 2001, 16:05:32) [C] on sunos5
Type "copyright", "credits" or "license" for more information.


Gilles.



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

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