Building with MrSID SDK
MrSID driver needs LizardTech decoding software development kit (DSDK). It is not free software, but you can download it without charge at https://www.lizardtech.com/developer/ (you will have to register first). To enable file creation capability you need encoding SDK (ESDK). You should contact LizardTech to obtain it.
Build on Windows by setting MRSID_DIR in nmake.opt. For example,
MRSID_DIR = C:\path\to\MrSID_ESDK-188.8.131.5201
(Note that a full path is required for the MRSID_DIR value, when testing with GDAL 1.8.0 and SDK 8.0)
For MrSID SDK version 8+, this will configure both the mrsid and mrsid_lidar drivers. These drivers can still be configured individually for previous versions of the MrSID SDK:
MRSID_RASTER_DIR = C:\path\to\Geo_DSDK-184.108.40.2064 MRSID_LIDAR_DIR = C:\path\to\Lidar_DSDK-220.127.116.1114
The driver can also be configured to handle JPEG 2000 files by setting:
MRSID_JP2 = YES
The MrSID driver supports being built as a plugin:
MRSID_PLUGIN = YES MRSID_LIDAR_PLUGIN = YES
Build on Unix using the --with-mrsid and --with-mrsid_lidar options to configure. These should indicate the paths to the MrSID Raster SDK and the MrSID LiDAR SDK, respectively. Use the MrSID SDK to read JPEG 2000 files by specifying --with-jp2mrsid.
$ ./configure --with-mrsid=/path/to/MrSID_ESDK-18.104.22.16801/Raster_DSDK \ --with-mrsid_lidar=/path/to/MrSID_ESDK-22.214.171.12401/Lidar_DSDK \ --with-jp2mrsid
The DSDK is distributed in binary form and if you are using GCC, please, ensure that you have the same compiler as was used for DSDK compilation. It is C++ library, so you may get incompatibilities in C++ name mangling among different GCC versions (2.95.x and 3.x).
Note on using GNU Libtool, users have confirmed that GDAL with MrSID builds successfully with or without libtool support (configure options: --with-libtool and --without-libtool).
ABI incompatibilities with libgeotiff 1.3.0 or internal libgeotiff of GDAL 1.7.0 or later (historical)
Pre-8.0.0 MrSID SDK releases rely on the ABI of pre-1.3.0 libgeotiff. So when linking GDAL against libgeotiff >= 1.3.0 or internal libgeotiff of GDAL 1.7.0, you might encounter crashes on some platforms (verified on Fedora 12, 32 bit for example). A workaround is to compile GDAL with libgeotiff 1.2.5 or use a newer version of the MrSID SDK (version 8.0.0 or higher). See ticket 3309 for details.
Extra qualification error (historical)
There is an incompatibility of pre-7.0.0 versions of the MrSID SDK header lti_sceneBuffer.h with gcc 3.4+; it was not considered an error in previous versions of gcc. (Thanks to Mateusz Loskot for pointing it out to us originally.)
Has anyone made notes recently on compiling gdal with mrsid support. Here is what I did so far, but it failed. 1) download the DSDK from LizardTech 2) ./configure --with-mrsid=pathToDSDK 3)edited MRSID lines in nmake.opt to point to the DSDK directory 4)gmake I got this error: /home/pvandeus/downloads/gdal/Geo_DSDK-126.96.36.1997/include/base /lti_sceneBuffer.h:356: error: extra qualification 'LizardTech::LTISceneBuffer::' on member 'inWindow' gmake: *** [../o/mrsiddataset.o] Error 1 gmake: Leaving directory `/home/pvandeus/downloads/gdal/gdal-1.4.0/frmts/mrsid' gmake: *** [mrsid-install-obj] Error 2 gmake: Leaving directory `/home/pvandeus/downloads/gdal/gdal-1.4.0/frmts' gmake: *** [frmts-target] Error 2 This is on a system running Fedora Core 6.
This can be fixed manually in the header (lti_sceneBuffer.h) by removing the extra qualification from the inWindow declaration. Line 356 should look like this:
bool inWindow(lt_uint32 x, lt_uint32 y) const;
- When using MrSID for JP2K, JP2 metadata files are ignored