[gdal-dev] Compiling GDAL with MrSID support

stefano.costa stefano.costa at geo-solutions.it
Wed Jul 22 02:29:09 PDT 2015


Hi all,I'm having issues trying to compile GDAL with MrSID support.


A preliminary question I have is: is MrSID write support available in GDAL, provided one has LizardTech's encoding SDK (ESDK)?
The documentation is a bit confusing on this point, e.g. on this page http://www.gdal.org/formats_list.html MrSID creation support is denied, whereas on this page https://trac.osgeo.org/gdal/wiki/MrSID it is stated that it requires an ESDK.


I have two versions of the MrSID SDK from LizardTech, Geo_ESDK-7.0.0.2167 (both encoding and decoding) and MrSID_DSDK-9.1.0.4045 (decoding only).
The platform I'm building on is:
CentOS 5.11 64-bit
gcc 4.1.2 20080704 (Red Hat 4.1.2-55)


I tried several versions of GDAL, 1.7.1, 1.7.3, 1.9.2, 2.0.0 but I keep getting the same error, when linking to Geo_ESDK-7.0.0.2167:
g++  gdalinfo.o  -L/root/gdal/gdal-1.7.1 -lgdal  -ljpeg -ltiff -lpng -lz  -lm -lrt -ldl     -L/root/gdal/Geo_ESDK-7.0.0.2167/lib/Release -L/root/gdal/Geo_ESDK-7.0.0.2167/3rd-party/lib/Release -lltidsdk -lpthread -llt_kakadu -lxmlparse    -o gdalinfo
/root/gdal/Geo_ESDK-7.0.0.2167/lib/Release/libltidsdk.so: undefined reference to `LizardTech::MG3MessageWriter::writeMessage(LizardTech::MG3Message&)'
/root/gdal/Geo_ESDK-7.0.0.2167/lib/Release/libltidsdk.so: undefined reference to `QuantizeBuffer'
/root/gdal/Geo_ESDK-7.0.0.2167/lib/Release/libltidsdk.so: undefined reference to `LizardTech::MG3VersionRequestMessage::MG3VersionRequestMessage()'
/root/gdal/Geo_ESDK-7.0.0.2167/lib/Release/libltidsdk.so: undefined reference to `LizardTech::MG3MessageWriter::initialize()'
/root/gdal/Geo_ESDK-7.0.0.2167/lib/Release/libltidsdk.so: undefined reference to `LizardTech::MG3DataRequestMessage::MG3DataRequestMessage()'
/root/gdal/Geo_ESDK-7.0.0.2167/lib/Release/libltidsdk.so: undefined reference to `LizardTech::MG3PacketRequestMessage::MG3PacketRequestMessage()'
/root/gdal/Geo_ESDK-7.0.0.2167/lib/Release/libltidsdk.so: undefined reference to `LizardTech::MG3DataReplyMessage::MG3DataReplyMessage(unsigned int, LizardTech::LTIOStreamInf*)'
/root/gdal/Geo_ESDK-7.0.0.2167/lib/Release/libltidsdk.so: undefined reference to `LizardTech::MG3MSEReplyMessage::~MG3MSEReplyMessage()'
/root/gdal/Geo_ESDK-7.0.0.2167/lib/Release/libltidsdk.so: undefined reference to `LizardTech::MG3MessageReader::nextMessage()'
/root/gdal/Geo_ESDK-7.0.0.2167/lib/Release/libltidsdk.so: undefined reference to `LizardTech::MG3MSEReplyMessage::MG3MSEReplyMessage(unsigned int, LizardTech::LTIOStreamInf*)'
/root/gdal/Geo_ESDK-7.0.0.2167/lib/Release/libltidsdk.so: undefined reference to `LizardTech::MG3MessageReader::initialize()'
/root/gdal/Geo_ESDK-7.0.0.2167/lib/Release/libltidsdk.so: undefined reference to `LizardTech::MG3PacketReplyMessage::MG3PacketReplyMessage(unsigned int, LizardTech::MG3PacketType const&, LizardTech::MG3Packet*)'
/root/gdal/Geo_ESDK-7.0.0.2167/lib/Release/libltidsdk.so: undefined reference to `LizardTech::MG3PlaneRangeDecoder::nextRange(unsigned long long&, bool&)'
/root/gdal/Geo_ESDK-7.0.0.2167/lib/Release/libltidsdk.so: undefined reference to `LizardTech::MG3VersionRequestMessage::~MG3VersionRequestMessage()'
/root/gdal/Geo_ESDK-7.0.0.2167/lib/Release/libltidsdk.so: undefined reference to `LizardTech::MSEAdjuster::nominalMSE(LizardTech::MG3PlaneDesc const&, LizardTech::MG3ImageInfo const&)'
/root/gdal/Geo_ESDK-7.0.0.2167/lib/Release/libltidsdk.so: undefined reference to `LizardTech::MG3DataRequestMessage::~MG3DataRequestMessage()'
/root/gdal/Geo_ESDK-7.0.0.2167/lib/Release/libltidsdk.so: undefined reference to `LizardTech::MG3PacketReplyMessage::~MG3PacketReplyMessage()'
/root/gdal/Geo_ESDK-7.0.0.2167/lib/Release/libltidsdk.so: undefined reference to `LizardTech::MG3DataReplyMessage::~MG3DataReplyMessage()'
/root/gdal/Geo_ESDK-7.0.0.2167/lib/Release/libltidsdk.so: undefined reference to `LizardTech::MG3MSERequestMessage::MG3MSERequestMessage()'
/root/gdal/Geo_ESDK-7.0.0.2167/lib/Release/libltidsdk.so: undefined reference to `LizardTech::MG3PacketRequestMessage::~MG3PacketRequestMessage()'
/root/gdal/Geo_ESDK-7.0.0.2167/lib/Release/libltidsdk.so: undefined reference to `LizardTech::MG3MessageReader::MG3MessageReader(LizardTech::LTIOStreamInf&)'
/root/gdal/Geo_ESDK-7.0.0.2167/lib/Release/libltidsdk.so: undefined reference to `LizardTech::MG3PlaneRangeDecoder::done()'
/root/gdal/Geo_ESDK-7.0.0.2167/lib/Release/libltidsdk.so: undefined reference to `LizardTech::MG3MessageReader::skipMessageBody()'
/root/gdal/Geo_ESDK-7.0.0.2167/lib/Release/libltidsdk.so: undefined reference to `LizardTech::MG3VersionReplyMessage::~MG3VersionReplyMessage()'
/root/gdal/Geo_ESDK-7.0.0.2167/lib/Release/libltidsdk.so: undefined reference to `LizardTech::MG3PlaneRangeDecoder::begin()'
/root/gdal/Geo_ESDK-7.0.0.2167/lib/Release/libltidsdk.so: undefined reference to `LizardTech::MG3VersionReplyMessage::MG3VersionReplyMessage(LizardTech::MG3Version const*)'
/root/gdal/Geo_ESDK-7.0.0.2167/lib/Release/libltidsdk.so: undefined reference to `LizardTech::MG3MessageWriter::~MG3MessageWriter()'
/root/gdal/Geo_ESDK-7.0.0.2167/lib/Release/libltidsdk.so: undefined reference to `LizardTech::MG3PlaneRangeEncoder::nextRange(unsigned long long, bool)'
/root/gdal/Geo_ESDK-7.0.0.2167/lib/Release/libltidsdk.so: undefined reference to `LizardTech::MG3MessageReader::~MG3MessageReader()'
/root/gdal/Geo_ESDK-7.0.0.2167/lib/Release/libltidsdk.so: undefined reference to `LizardTech::MG3MSERequestMessage::~MG3MSERequestMessage()'
/root/gdal/Geo_ESDK-7.0.0.2167/lib/Release/libltidsdk.so: undefined reference to `LizardTech::MG3MessageReader::getMessageBody(LizardTech::MG3Message&)'
/root/gdal/Geo_ESDK-7.0.0.2167/lib/Release/libltidsdk.so: undefined reference to `LizardTech::MG3MessageWriter::done()'
/root/gdal/Geo_ESDK-7.0.0.2167/lib/Release/libltidsdk.so: undefined reference to `LizardTech::MG3MessageWriter::MG3MessageWriter(LizardTech::LTIOStreamInf&)'


I tried both --with-libtool and --without-libtool options and I get the same error. Looks like libltidsdk.so contains undefined references to functions... which should be defined in the library itself?


If I try to link to MrSID_DSDK-9.1.0.4045 (gcc41 version), I get a different error on GDAL 1.7.1 through 1.9.2:
/bin/sh /root/gdal/gdal-1.9.2/libtool --mode=link	g++  gdalinfo.lo  /root/gdal/gdal-1.9.2/libgdal.la -o gdalinfo
libtool: link: g++ .libs/gdalinfo.o -o .libs/gdalinfo  /root/gdal/gdal-1.9.2/.libs/libgdal.so -L/root/gdal/MrSID_DSDK-9.1.0.4045-linux.x86-64.gcc41/Raster_DSDK//3rd-party/lib -L/root/gdal/MrSID_DSDK-9.1.0.4045-linux.x86-64.gcc41/Raster_DSDK//lib -ljpeg -lpng -lz -lrt -ldl -lltidsdk -lpthread  -Wl,-rpath -Wl,/usr/local/lib
/root/gdal/gdal-1.9.2/.libs/libgdal.so: undefined reference to `LizardTech::LTISceneBuffer::LTISceneBuffer(LizardTech::LTIPixel const&, unsigned int, unsigned int, void**)'
/root/gdal/gdal-1.9.2/.libs/libgdal.so: undefined reference to `LizardTech::LTISceneBuffer::LTISceneBuffer(LizardTech::LTIPixel const&, unsigned int, unsigned int, void**)'
/root/gdal/gdal-1.9.2/.libs/libgdal.so: undefined reference to `LizardTech::LTISceneBuffer::getTotalBandData(unsigned short) const'
/root/gdal/gdal-1.9.2/.libs/libgdal.so: undefined reference to `LizardTech::J2KImageReader::initialize(LizardTech::LTIOStreamInf&, bool, float, bool, int)'


The only successful combination I found so far has been GDAL 2.0.0 and MrSID_DSDK-9.1.0.4045: it's something, but I'd very much prefer to link with Geo_ESDK-7.0.0.2167 to have read / write support.




Has anybody experienced the same issues?


Best regards,
Stefano Costa
 
==
GeoServer Professional Services from the experts! Visit
http://goo.gl/it488V for more information.
==
Dott. Stefano Costa
Senior Software Engineer
 
GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054  Massarosa (LU)
Italy
phone: +39 0584 962313
fax:     +39 0584 1660272
 
http://www.geo-solutions.it
http://twitter.com/geosolutions_it
 
-------------------------------------------------------
AVVERTENZE AI SENSI DEL D.Lgs. 196/2003
Le informazioni contenute in questo messaggio di posta elettronica e/o
nel/i file/s allegato/i sono da considerarsi strettamente riservate.
Il loro utilizzo è consentito esclusivamente al destinatario del
messaggio, per le finalità indicate nel messaggio stesso. Qualora
riceviate questo messaggio senza esserne il destinatario, Vi preghiamo
cortesemente di darcene notizia via e-mail e di procedere alla
distruzione del messaggio stesso, cancellandolo dal Vostro sistema.
Conservare il messaggio stesso, divulgarlo anche in parte,
distribuirlo ad altri soggetti, copiarlo, od utilizzarlo per finalità
diverse, costituisce comportamento contrario ai principi dettati dal
D.Lgs. 196/2003.
 
The information in this message and/or attachments, is intended solely
for the attention and use of the named addressee(s) and may be
confidential or proprietary in nature or covered by the provisions of
privacy act (Legislative Decree June, 30 2003, no.196 - Italy's New
Data Protection Code).Any use not in accord with its purpose, any
disclosure, reproduction, copying, distribution, or either
dissemination, either whole or partial, is strictly forbidden except
previous formal approval of the named addressee(s). If you are not the
intended recipient, please contact immediately the sender by
telephone, fax or e-mail and delete the information in this message
that has been received in error. The sender does not give any warranty
or accept liability as the content, accuracy or completeness of sent
messages and accepts no responsibility  for changes made after they
were sent or for other risks which arise as a result of e-mail
transmission, viruses, etc.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20150722/a77a4414/attachment.html>


More information about the gdal-dev mailing list