I'm trying to install the GDAL python package in a python 2.7.1 environment on RHEL 5. I am using the command 'pip install GDAL'. I have no problem installing other packages like numpy, etc. in this manner.
The installation fails with this error:
extensions/gdal_wrap.cpp: In function 'PyObject* _wrap_VSIFTruncateL(PyObject*, PyObject*)':
extensions/gdal_wrap.cpp:6845: error: 'VSIFTruncateL' was not declared in this scope
error: command 'gcc' failed with exit status 1
I also tried compiling GDAL 1.9.0 from source and running 'python setup.py build' (after setting the path to gdal-config in setup.cfg) and 'python setup.py install'. The GDAL python bindings seem to install okay, but I get the same 'VSIFTruncateL' error when trying to use GDAL...
>>> from osgeo import gdal
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "osgeo/__init__.py", line 21, in <module>
_gdal = swig_import_helper()
File "osgeo/__init__.py", line 17, in swig_import_helper
_mod = imp.load_module('_gdal', fp, pathname, description)
ImportError: osgeo/_gdal.so: undefined symbol: VSIFTruncateL