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

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


Thanks for the hint Jeff. I will definitely update the ECW wiki as
soon as I get time!

I'm working on collecting as many patches regarding libecwj2 and linux
as I can find to get the lib to build cleanly on modern linux
distributions.

Regards Johan

2012/9/12 Jeff McKenna <jmckenna at gatewaygeomatics.com>:
> You might add your notes (and even attach your patch) to the ECW
> buildhints wiki page for GDAL yourself:
> http://trac.osgeo.org/gdal/wiki/ECW  (otherwise emails are long forgotten)
>
> Works great for your FOSS4G karma as well!
>
> Thanks,
>
> -jeff
>
>
>
> On 12-09-12 5:09 PM, Johan Hedin wrote:
>> 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
>>>
>
>
> --
> Jeff McKenna
> MapServer Consulting and Training Services
> http://www.gatewaygeomatics.com/
>
>
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev


More information about the gdal-dev mailing list