Opened 13 years ago

Last modified 13 years ago

#1508 closed defect (fixed)

configure should check for Python.h before enabling Python — at Initial Version

Reported by: Daniel Morissette Owned by: Mateusz Łoskot
Priority: highest Milestone: 1.4.2
Component: PythonBindings Version: 1.4.0
Severity: blocker Keywords:
Cc:

Description

I have a system here on which GDAL's configure decides to enable the Python bindings by default, but my build fails because I do not have Python.h on my system. I have to explicitly set --without-python for my build to complete.

I think the AM_PATH_PYTHON macro (m4/acinclude.m4) should check that Python.h is present before enabling this option.

Here is the error I get at build time:

gcc -fPIC   -Wall -fPIC -O2   -I/home/mapgears/fgs-dev/src/gdal-1.3.2/port -I/home/mapgears/fgs-dev/src/gdal-1.3.2/gcore -I/home/mapgears/fgs-dev/src/gdal-1.3.2/alg -I/home/mapgears/fgs-dev/src/gdal-1.3.2/ogr -I/home/mapgears/fgs-dev/src/gdal-1.3.2/ogr/ogrsf_frmts -I/usr/include/python2.4 -I/usr/include/python2.4 -DOGR_ENABLED -I/home/mapgears/fgs-dev/src/gdal-1.3.2/port -I/home/mapgears/fgs-dev/built/unixODBC -I/home/mapgears/fgs-dev/built/unixODBC/include -I/home/mapgears/fgs-dev/built/libecw//include -I/home/mapgears/fgs-dev/built/jpeg -I/home/mapgears/fgs-dev/built/jpeg/include -I/home/mapgears/fgs-dev/built/libgeotiff/include -I/home/mapgears/fgs-dev/built/tiff/include -I/home/mapgears/fgs-dev/built/libpng -I/home/mapgears/fgs-dev/built/libpng/include -I/home/mapgears/fgs-dev/built/netcdf -I/home/mapgears/fgs-dev/built/netcdf/include  -c -o gdal_wrap.o gdal_wrap.c
gdal_wrap.c:44:20: error: Python.h: No such file or directory
gdal_wrap.c:78: error: expected specifier-qualifier-list before ‘PyObject’
gdal_wrap.c:83: error: expected specifier-qualifier-list before ‘PyObject_HEAD’
...
... followed by hundreds of errors/warnings...

Change History (0)

Note: See TracTickets for help on using tickets.