I have previously built the ECW/JP2ECW drivers as a plugin (using 5.0 or 5.1 
SDK) on 
Ubuntu 12.04 (GDAL 1.10) using the gdal-ecw-build script from from the 
ubuntugis-unstable libgdal-ecw package.

Now that I have upgraded my PC to Ubuntu 14.04, I built the ECW/JP2ECW drivers 
as a plugin (using 5.1 SDK) by usinging the makefile/configure scripts from the 
12.04
 ubuntugis-unstable libgdal-ecw package against a vanilla GDAL 1.11 source 
tree (frmts/ecw), compiling and installing to /usr/lib/gdalplugins/1.11.


On Ubuntu 12.04 (with the plugin built using the gdal-ecw-build script and 
provided source package), 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)

On Ubuntu 14.04 the install looks ok when running gdal utilities, though the 
ECW and JP2ECW drivers also do not work in python and there are different 
undefined symbol errors:
$ gdalinfo --formats|grep -i ecw
  ECW (rw+): ERDAS Compressed Wavelets (SDK 5.1)
  JP2ECW (rw+v): ERDAS JPEG2000 (SDK 5.1)

$ 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)

I reported the issue with 12.04 to UbuntuGIS 
(http://trac.osgeo.org/ubuntugis/ticket/34) last year, but there has been no 
resolution. However, this may have been missed as this ticket wasn't 
specifically about python, just about getting the 5+ SDK working with the 
libgdal-ecw package.

I can build gdal itself from source with ECW 
support without any problems with the drivers in python, but I'd like to easily 
build ECW support as a plugin so I can 
just rely on my package manager to keep everything else up to date.

Can anybody provide some guidance on how to compile the ECW/JP2ECW drivers as a 
plugin and get them working in python on Linux?


Regards
Luke
_______________________________________________
UbuntuGIS mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/ubuntu
http://trac.osgeo.org/ubuntugis/wiki

Reply via email to