[gdal-dev] ECW support on Fedora Linux - error

Johan Hedin johan.o.hedin at gmail.com
Wed Sep 12 13:09:31 PDT 2012


I had the same problem with libecwj2-3.3 and Fedora 17 64-bit
yesterday. I tracked this down and it is a bug in libecwj2 itself
regarding wchar_t handling in the file NCSPrefsXML.cpp.

I have attached a patch to this mail to fix this. It is a super simple fix :-)

Another way around this is to just define the environment variable
NCS_USER_PREFS to point to some bogus file name. If this is done the
code take another path in libecwj2 and the bug is not triggered. But
fixing the bug is of course better.

BTW, this has apparently always been a bug and I guess that is has
started to show now due to updates to libstdc++, c++ compilers etc. In
the beginning of Fedora 16 this worked but on a up-to-date Fedora 16
today the behaviour is the same as on Fedora 17.

All distributions that are updating c++ and/or libstdc++ in the future
will probably see this bug as well. My patch is not fedora specific.

Pleas report back here if this patch is working for you as well!

(Small disclaimer: I'm recreating the patch from my head. I don't have
the running instance of gdal with ECW support on this computer)

Regards Johan

2012/9/11 lanufabi <dasfabirad at googlemail.com>:
>  In reply to this post by jkadlec
> Hey,
>
> I compiled libecwj2 and gdal 1.9.1 on arch linux like "jkadlec" did and get
> the same error when i use gdalinfo for ecw files:
> terminate called after throwing an instance of 'std::length_error' what():
> basic_string::_S_create
>
> gdalinfo --formats puts out that ECW is supported.
>
> What can I do to identify the problem? Do you know a solution?
>
> Thanks
>
>
>
> --
> View this message in context: http://osgeo-org.1560.n6.nabble.com/ECW-support-on-Fedora-Linux-error-tp4991388p5001142.html
> Sent from the GDAL - Dev mailing list archive at Nabble.com.
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
-------------- next part --------------
A non-text attachment was scrubbed...
Name: libecwj2-3.3-wcharfix.patch
Type: text/x-patch
Size: 677 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20120912/cc5fcd90/attachment.bin>


More information about the gdal-dev mailing list