[gdal-dev] Compiling with ECW/JP2ECW support enabled

Jonathan Williams jonvwill at verizon.net
Wed Feb 17 10:41:22 PST 2016


I do, though I'm afraid to admit I may have discovered a simple path
issue with an early compilation run that may have been obscuring
subsequent work.

If that's the case, I'll send my apologies.

Best
Jonathan

On 2/17/2016 1:20 PM, Even Rouault wrote:
> Le mercredi 17 février 2016 18:13:02, Jonathan Williams a écrit :
>> That's exactly correct, for the plugin attempt. I tried it just to see
>> if it would get anywhere, as I couldn't find a plugin build script that
>> supported GDAL >2.0.
>>
>> As for trying to build the ecw/jp2ecw support into GDAL 2.0.2 itself,
>> I've now tried the old libecwj2 3.3 code in lieu of the SDK 5.2.1
>> libraries; as usual, it configures and compiles without complaint, but
>> the ecw support is simply absent in the final product.
> In case you do multiple ./configure attempts, do you do "make clean" after 
> running ./configure ? ( "touch frmts/gdalallregister.cpp" should be sufficient 
> for just new drivers )
>
>> I'd like to use some of the GDAL >2.0 features, but if I'm not able to
>> get ecw and OpenCL working, I may drop back to the <2.0 series to see if
>> that helps.
>>
>> Best,
>> Jonathan
>>
>> On 2/17/2016 11:47 AM, Even Rouault wrote:
>>> Le mercredi 17 février 2016 16:38:30, Jonathan Williams a écrit :
>>>> I have tried this; I've added the Ubuntu-GIS repository, but none of the
>>>> builds are for 64 bit 14.04 LTS, from what I've seen.
>>>>
>>>> I've also tried to force the issue with the instructions here:
>>>> http://gis.stackexchange.com/a/102088
>>>>
>>>> However, the build fails, perhaps because I'm using version 5.2.1 of
>>>> ERDAS' SDK with libNCSEcw.so.5.2.1, or perhaps because I'm using Gdal
>>>> 2.0.2? the compile messages indicate a couple of errors.
>>>>
>>>>
>>>> /usr/local/include/gdal_priv.h:226:19: error: ‘char**
>>>> GDALOpenInfo::papszSiblingFiles’ is private
>>>>
>>>>      char        **papszSiblingFiles;
>>>>      
>>>>                    ^
>>>>
>>>> ecwdataset.cpp:2526:48: error: within this context
>>>>
>>>>                                     poOpenInfo->papszSiblingFiles, NULL
>>>>                                     );
>>>>                                     
>>>>                                                 ^
>>>>
>>>> make: *** [ecwdataset.o] Error 1
>>>>
>>>> ...as well as...
>>>>
>>>> ecwdataset.cpp:440:91: error: no matching function for call to
>>>> ‘ECWRasterBand::SetDefaultHistogram(double&, double&, int&, int*&)’
>>> My bet is that you are building the ECW driver code from GDAL 1.X against
>>> GDAL 2.X headers.
>>>
>>>> Note that I did *not* attempt to install QGIS or libgdal-dev, as I was
>>>> concerned some of the other dependencies might regress work that I'd
>>>> done with compiling Jasper, etc.
>>>>
>>>> Best,
>>>> Jonathan
>>>>
>>>> On 2/17/2016 12:26 AM, Tomaka, Jacek wrote:
>>>>> HI Jonathan,
>>>>> Have you tried compiling in  ECW/JP2 support as a plugin?
>>>>> Regards.
>>>>> Jacek Tomaka
>>>>>
>>>>> -----Original Message-----
>>>>> From: gdal-dev [mailto:gdal-dev-bounces at lists.osgeo.org] On Behalf Of
>>>>> Jonathan Williams Sent: Wednesday, 17 February 2016 4:51 AM
>>>>> To: gdal-dev at lists.osgeo.org
>>>>> Subject: [gdal-dev] Compiling with ECW/JP2ECW support enabled
>>>>>
>>>>> Hello,
>>>>> In addition to my previous question regarding OpenCL support
>>>>> bafflement, I've run into difficulty compiling GDAL 2.02 with ECW
>>>>> support.
>>>>>
>>>>> I've compiled with "--with-ecw=/usr/local/hexagon", as the 5.2 SDK is
>>>>> located there, and symlinked the
>>>>> /usr/local/hexagon/lib/(x64|x86)/release/libNCSEcw.so library to
>>>>> /usr/local/lib/libNCSEcw.so .
>>>>>
>>>>> Configuration completes with no errors, as does compilation. The
>>>>> ./configure output indicates that support is selected, and config.log
>>>>> says all libraries were found.
>>>>>
>>>>> However, the completed utilities do not list ecw as a readable format,
>>>>> and indeed, they cannot read ecw files (much less jpeg2000 ones).
>>>>>
>>>>> I understand there have been libgdal-ecw scripts that some have run to
>>>>> enable support; however, I haven't found one for this situation (Ubuntu
>>>>> desktop 14.04.3 LTS 64 bit, with gdal 2.02).
>>>>>
>>>>> Is it the case that these scripts also need to be run to enable ecw
>>>>> support? or am I foolishly missing something?
>>>>>
>>>>> I see in the config.log that -ECW_FLAGS are set to
>>>>> '-DHAVE_ECW_BUILDNUMBER_H -DLINUX -DX86 -DPOSIX -DHAVE_COMPRESS
>>>>> -DECW_COMPRESS_RW_SDK_VERSION', and thought perhaps a 32 bit library
>>>>> had been selected; however, manually modifying the flag "DX86" to
>>>>> "DX64" simply produced an error.
>>>>>
>>>>> Any insight would be appreciated.
>>>>>
>>>>> Best regards,
>>>>> Jonathan Williams
>>>>>
>>>>> _______________________________________________
>>>>> gdal-dev mailing list
>>>>> gdal-dev at lists.osgeo.org
>>>>> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>>>> _______________________________________________
>>>> gdal-dev mailing list
>>>> gdal-dev at lists.osgeo.org
>>>> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>> _______________________________________________
>> 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