I have a Centos 6.6 VM with the Python 2.7 SCL. I have gdal and gdal-devel installed.
If I start the scl with sudo scl enable python27 bash
and do a pip install gdal
it fails on:
gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -I../../port -I../../gcore -I../../alg -I../../ogr/ -I/opt/rh/python27/root/usr/include/python2.7 -I. -I/usr/include -c extensions/gdal_wrap.cpp -o build/temp.linux-x86_64-2.7/extensions/gdal_wrap.o
extensions/gdal_wrap.cpp:2855:22: error: cpl_port.h: No such file or directory
extensions/gdal_wrap.cpp:2856:24: error: cpl_string.h: No such file or directory
extensions/gdal_wrap.cpp:2857:27: error: cpl_multiproc.h: No such file or directory
extensions/gdal_wrap.cpp:2858:22: error: cpl_http.h: No such file or directory
extensions/gdal_wrap.cpp:2860:18: error: gdal.h: No such file or directory
extensions/gdal_wrap.cpp:2861:23: error: gdal_priv.h: No such file or directory
extensions/gdal_wrap.cpp:2862:22: error: gdal_alg.h: No such file or directory
extensions/gdal_wrap.cpp:2863:24: error: gdalwarper.h: No such file or directory
extensions/gdal_wrap.cpp:4870:22: error: gdalgrid.h: No such file or directory
extensions/gdal_wrap.cpp:2880: error: ‘CPLErrorHandler’ does not name a type
extensions/gdal_wrap.cpp:2883: error: expected initializer before ‘PythonBindingErrorHandler’
extensions/gdal_wrap.cpp:2755: warning: ‘swig_module’ defined but not used
error: command 'gcc' failed with exit status 1
What's the right way to get gdal in /opt/rh/python27/root/usr/include/ or make pip point gcc to /usr/include/?