Revisiting ECW support to GDAL via plugins: a patch.

Posted by – Wednesday 2012-05-02

In the blog post “Adding ECW support to GDAL via plugins” (February 2011) I shared the experiences I had to get the GDAL library able to work with this proprietary format.

Some days ago I had to repeat the task, and that recipe did not work. Under Debian 6 I was unable to build libecwj2-3.3.tar.gz for GDAL 1.6.3 using GCC 4.4.5. One year ago the environment was different: Debian 5, GDAL 1.5.2 and GCC 4.3.2.

Fortunately, via Google I found “Patch to build libecwj2-3.3.tar.gz with GCC 4.1” on OSGeo’s gdal-dev mailing list, which gave me a clue to solve the problem.

Returning to the recipe, section 1 is modified to apply the attached patch. Make sure the Debian package patch is installed, copy the attached patch file to your $HOME directory, rename it to ‘libecwj2-3.3.patch’ and:

$ unzip libecwj2-3.3 (in your $HOME)
$ cd $HOME/libecwj2-3.3/
$ patch -p1 -i ../libecwj2-3.3.patch
$ sudo ./configure –prefix=/usr/local
$ sudo make
$ sudo make install
$ sudo checkinstall

Do not forget reading libecw’s license agreement!


  • libecwj2-3.3-patch.txt [txt file; ~2.8 kB]

0 Comments on Revisiting ECW support to GDAL via plugins: a patch.