Opened 10 years ago
Closed 8 years ago
#44 closed defect (invalid)
libgdal-ecw drivers not working in python bindings
Reported by: | lpinner | Owned by: | |
---|---|---|---|
Component: | GDAL | Severity: | normal |
Keywords: | ECW PYTHON | Cc: |
Description
On Ubuntu 12.04 (with the libgdal-ecw plugin built using the gdal-ecw-build script and provided source package and the Intergrapgh/ERDAS ECW/JP2 5.0 and 5.1 SDK), the install looks ok when running gdal utilities, however the following undefined symbol errors are reported when importing gdal in python and the ECW/JP2ECW drivers are not available.
$ gdalinfo --formats|grep -i ecw ECW (rw+): ERDAS Compressed Wavelets (SDK 5.0) JP2ECW (rw+v): ERDAS JPEG2000 (SDK 5.0) $ python -c "from osgeo import gdal; print repr((gdal.GetDriverByName('ECW'),gdal.GetDriverByName('JP2ECW')))" ERROR 1: /usr/lib/gdalplugins/1.10/gdal_ECW_JP2ECW.so: undefined symbol: _ZTI14GDALPamDataset ERROR 1: /usr/lib/gdalplugins/1.10/gdal_ECW_JP2ECW.so: undefined symbol: _ZTI14GDALPamDataset (None, None)
If gdal is built completely from source (using --with-ecw=/path/to/ecw/sdk) the ECW/JP2ECW drivers are available and work fine in the python swig bindings.
Note: not directly related to this ticket, but just for info if you are planning to distribute a libgdal-ecw package in Ubuntu 14.04:
Using your libgdal-ecw build scripts on a vanilla gdal 1.11 source tree in Ubuntu 14.04 also works for the gdal utilies, but generates different errors in python.
$ python -c "from osgeo import gdal; print repr((gdal.GetDriverByName(' ECW'),gdal.GetDriverByName('JP2ECW')))" ERROR 1: /usr/lib/gdalplugins/1.11/gdal_ECW_JP2ECW.so: undefined symbol: GDALRegisterMe ERROR 1: /usr/lib/gdalplugins/1.11/gdal_ECW_JP2ECW.so: undefined symbol: _ZTI22GDALJP2AbstractDataset (None, None)
The ECW plugin is not supported.