Opened 3 years ago

Closed 3 years ago

Last modified 2 years ago

#5390 closed enhancement (fixed)

Update configure script to pick up ECW JP2 SDK 5.1.

Reported by: jcztery Owned by: warmerdam
Priority: normal Milestone: 1.11.3
Component: ConfigBuild Version: unspecified
Severity: normal Keywords:
Cc:

Description (last modified by jcztery)

ECW JP2 SDK 5.1. will add(restore) support for Mac OS X, iOS and Android. As of current ECW JP2 SDK on Mac OS X comes as static library dependent on libc++ standard C++ library.

  1. Provide instructions and requirements for GDAL to be compiled with Ecw Jp2 SDK support on Mac OSX.
  2. Modify configure.in script so that it will pick up default 5.1. locations and names.

Attachments (2)

EcwJp2SDKMac.patch (3.3 KB) - added by jcztery 3 years ago.
Patch for configure on MAC.
CONFIGURE_ECW.patch (7.5 KB) - added by jcztery 3 years ago.
Patch for Linux and Mac OS X configure scripts.

Download all attachments as: .zip

Change History (8)

comment:1 Changed 3 years ago by jcztery

Description: modified (diff)

Changed 3 years ago by jcztery

Attachment: EcwJp2SDKMac.patch added

Patch for configure on MAC.

comment:2 Changed 3 years ago by jcztery

As said above, because Ecw Jp2 is compiled using libc++ GDAL has to be compiled with libc++ as well.
On Mac OSX Maverics(10.9) this will just work (even with default gcc/g++). On older platforms(10.8) i have had some success specifying the following command:

./configure CXX=clang++ CC=clang CXXFLAGS=-stdlib=libc++ LDFLAGS=-lc++


Note that lc++ is supported on Mac OSX 10.7 or later. Please comment if there are reasons to still use libstdc++ on Mac OSX.

As for iOS the compilation for iOS wasn't tested but this should just work, as static library for iOS architecture comes as the same fat libEcwJp2SDK.a fat file (with 4 architectures: armv7, armv7s, i386, x86_64).

comment:3 Changed 3 years ago by Even Rouault

I suppose you're an Intergraph employee since I can't see 5.1 available for download ? I've applied the patch in trunk r26958 "Unix build: Update configure script to pick up ECW JP2 SDK 5.1 (#5390)" , but I'm wondering : is $with_ecw/lib/libEcwJp2SDK.a specific to Mac version of SDK 5.1 or something generic that would also apply to Linux version of SDK 5.1 ? If generic, then " -framework Cocoa" would not be appropriate.

As far as libstdc++ vs libc++, this is a topic I don't master. I don't see any explicit linking to libstdc++ in the configure.in but I might have been overlooked something. It might be a complex issue if there are other dependencies requiring libstdc++ and other libc++...

Changed 3 years ago by jcztery

Attachment: CONFIGURE_ECW.patch added

Patch for Linux and Mac OS X configure scripts.

comment:4 Changed 3 years ago by jcztery

Please apply another patch to address some of the issues mentioned here (-framework Cocoa) not being appropriate.
Also this issue will detect the many license types available on Linux or Mac:
Desktop_Read-Write,Server_Read-Only_EndUser,Server_Read-Only,Server_Read-Write,Desktop_Read-Only. From now on there is no need to provide the license type (unless specific license type is required) just provide patch to SDK root as parameter to --with-ecw=

comment:5 Changed 3 years ago by Even Rouault

Milestone: 2.0
Resolution: fixed
Status: newclosed

trunk r28265 "configure: add support for ECW SDK 5.1 (patch by jcztery, #5390)"

comment:6 Changed 2 years ago by Even Rouault

Milestone: 2.01.11.3

branches/1.11 r28600 "configure: backport trunk fix for detection of ECW SDK 5.1 on Mac (#5867, #5390)"

Note: See TracTickets for help on using tickets.