1

I am trying to get MrSID support in QGIS 2.4 in Ubuntu 14.04. According to the this tutorial you have to rebuild libgdal against MrSID SDK from LizardTech. But I cannot find the package libgdal-mrsid-src as mentioned in the instructions. However, it appears that this may have been merged into the libgdal-dev package. When I attempt to install this package, I am told that I have to install libmysqlclient-dev but cannot install libmysqlclient-dev since I have MariaDB 10 installed.

Full error message is:

    Some packages could not be installed. This may mean that you have
    requested an impossible situation or if you are using the unstable
    distribution that some required packages have not yet been created
    or been moved out of Incoming.
    The following information may help to resolve the situation:

    The following packages have unmet dependencies:   
     libmysqlclient-dev : Depends: libmysqlclient18 (= 5.5.38-0ubuntu0.14.04.1) but
 10.0.10+maria-1~saucy is to be installed
    E: Unable to correct problems, you have held broken packages

So here are my original two questions:

  1. Am I correct about the libgdal-mrsid-src package being merged with the libgdal-dev package?

    Answer: Yes but you have to use apt-get source libgdal-dev

  2. If the answer to 1 is yes, then how do I correct conflict and still keep MariaDB 10?

    Answer: This seems to be more of a red herring as I am uncertain that libgdal-dev really needs to be installed. However, if you run apt-get install libgdal-dev libmariadbclient-dev the dependencies appear to be met.

Now I am to the point where I getting unsure of my steps. In the gdal-1.10.1+dfsg directory that is created from installing the sources, I run

./configure --with-gdal=/usr/bin/gdal-config \
            --with-mrsid=/path/to/MrSID_DSDK/Raster_DSDK \
            --with-mrsid_lidar=/path/to/MrSID_DSDK/Lidar_DSDK \
            --with-jp2mrsid=yes --with-geotiff=yes

make
make install

However, this builds the full gdal package and installs it in /usr/local/bin instead of /usr/bin (apt-get install location). This package also does not have mysql support (guess question 2 may not be such a red herring after all). Not to mention, it is not my intention to build the full package from source.

The other option that I tried was to just compile the mrsid plugin for gdal. Stopping the above instructions after the configure command, I changed to the /gdal-1.10.1+dfsg/frmts/mrsid directory and ran make plugin libgdal-mrsid which produced the following error:

/bin/bash /root/gdal-1.10.1+dfsg/libtool --mode=compile --tag=CXX g++ -g -O2 -DHAVE_SSE_AT_COMPILE_TIME  -Wall  -I/root/gdal-1.10.1+dfsg/port -I/root/gdal-1.10.1+dfsg/gcore -I/root/gdal-1.10.1+dfsg/alg -I/root/gdal-1.10.1+dfsg/ogr -I/root/gdal-1.10.1+dfsg/ogr/ogrsf_frmts -DMRSID_J2K  -I/usr/share/MrSID_DSDK-9.1.0.4045/Raster_DSDK/include -I../../frmts/gtiff/libgeotiff -DOGR_ENABLED -D_REENTRANT  -I/root/gdal-1.10.1+dfsg/port   -c -o mrsiddataset.o mrsiddataset.cpp
libtool: compile:  g++ -g -O2 -DHAVE_SSE_AT_COMPILE_TIME -Wall -I/root/gdal-1.10.1+dfsg/port -I/root/gdal-1.10.1+dfsg/gcore -I/root/gdal-1.10.1+dfsg/alg -I/root/gdal-1.10.1+dfsg/ogr -I/root/gdal-1.10.1+dfsg/ogr/ogrsf_frmts -DMRSID_J2K -I/usr/share/MrSID_DSDK-9.1.0.4045/Raster_DSDK/include -I../../frmts/gtiff/libgeotiff -DOGR_ENABLED -D_REENTRANT -I/root/gdal-1.10.1+dfsg/port -c mrsiddataset.cpp  -fPIC -DPIC -o .libs/mrsiddataset.o
mrsiddataset.cpp: In member function 'virtual CPLErr MrSIDRasterBand::IReadBlock(int, int, void*)':
mrsiddataset.cpp:552:64: warning: 'void* LizardTech::LTISceneBuffer::getTotalBandData(lt_uint16) const' is deprecated (declared at /usr/share/MrSID_DSDK-9.1.0.4045/Raster_DSDK/include/lti_sceneBuffer.h:565) [-Wdeprecated-declarations]
     memcpy( pImage, poGDS->poBuffer->getTotalBandData(nBand - 1), 
                                                                ^
mrsiddataset.cpp: In member function 'virtual CPLErr MrSIDDataset::IRasterIO(GDALRWFlag, int, int, int, int, void*, int, int, GDALDataType, int, int*, int, int, int)':
mrsiddataset.cpp:979:68: warning: 'void* LizardTech::LTISceneBuffer::getTotalBandData(lt_uint16) const' is deprecated (declared at /usr/share/MrSID_DSDK-9.1.0.4045/Raster_DSDK/include/lti_sceneBuffer.h:565) [-Wdeprecated-declarations]
                 oLTIBuffer.getTotalBandData( panBandMap[iBand] - 1 );
                                                                    ^
mrsiddataset.cpp:1017:47: warning: 'void* LizardTech::LTISceneBuffer::getTotalBandData(lt_uint16) const' is deprecated (declared at /usr/share/MrSID_DSDK-9.1.0.4045/Raster_DSDK/include/lti_sceneBuffer.h:565) [-Wdeprecated-declarations]
                         panBandMap[iBand] - 1 );
                                               ^
libtool: compile:  g++ -g -O2 -DHAVE_SSE_AT_COMPILE_TIME -Wall -I/root/gdal-1.10.1+dfsg/port -I/root/gdal-1.10.1+dfsg/gcore -I/root/gdal-1.10.1+dfsg/alg -I/root/gdal-1.10.1+dfsg/ogr -I/root/gdal-1.10.1+dfsg/ogr/ogrsf_frmts -DMRSID_J2K -I/usr/share/MrSID_DSDK-9.1.0.4045/Raster_DSDK/include -I../../frmts/gtiff/libgeotiff -DOGR_ENABLED -D_REENTRANT -I/root/gdal-1.10.1+dfsg/port -c mrsiddataset.cpp -o mrsiddataset.o >/dev/null 2>&1
/bin/bash /root/gdal-1.10.1+dfsg/libtool --mode=compile --tag=CXX g++ -g -O2 -DHAVE_SSE_AT_COMPILE_TIME  -Wall  -I/root/gdal-1.10.1+dfsg/port -I/root/gdal-1.10.1+dfsg/gcore -I/root/gdal-1.10.1+dfsg/alg -I/root/gdal-1.10.1+dfsg/ogr -I/root/gdal-1.10.1+dfsg/ogr/ogrsf_frmts -DMRSID_J2K  -I/usr/share/MrSID_DSDK-9.1.0.4045/Raster_DSDK/include -I../../frmts/gtiff/libgeotiff -DOGR_ENABLED -D_REENTRANT  -I/root/gdal-1.10.1+dfsg/port   -c -o mrsidstream.o mrsidstream.cpp
libtool: compile:  g++ -g -O2 -DHAVE_SSE_AT_COMPILE_TIME -Wall -I/root/gdal-1.10.1+dfsg/port -I/root/gdal-1.10.1+dfsg/gcore -I/root/gdal-1.10.1+dfsg/alg -I/root/gdal-1.10.1+dfsg/ogr -I/root/gdal-1.10.1+dfsg/ogr/ogrsf_frmts -DMRSID_J2K -I/usr/share/MrSID_DSDK-9.1.0.4045/Raster_DSDK/include -I../../frmts/gtiff/libgeotiff -DOGR_ENABLED -D_REENTRANT -I/root/gdal-1.10.1+dfsg/port -c mrsidstream.cpp  -fPIC -DPIC -o .libs/mrsidstream.o
libtool: compile:  g++ -g -O2 -DHAVE_SSE_AT_COMPILE_TIME -Wall -I/root/gdal-1.10.1+dfsg/port -I/root/gdal-1.10.1+dfsg/gcore -I/root/gdal-1.10.1+dfsg/alg -I/root/gdal-1.10.1+dfsg/ogr -I/root/gdal-1.10.1+dfsg/ogr/ogrsf_frmts -DMRSID_J2K -I/usr/share/MrSID_DSDK-9.1.0.4045/Raster_DSDK/include -I../../frmts/gtiff/libgeotiff -DOGR_ENABLED -D_REENTRANT -I/root/gdal-1.10.1+dfsg/port -c mrsidstream.cpp -o mrsidstream.o >/dev/null 2>&1
mrsiddataset.o mrsidstream.o  -L/usr/share/MrSID_DSDK-9.1.0.4045/Raster_DSDK/3rd-party/lib -L/usr/share/MrSID_DSDK-9.1.0.4045/Raster_DSDK/lib -lltidsdk -lpthread  -o gdal_MrSID.so
/bin/bash: mrsiddataset.o: command not found
make: *** [gdal_MrSID.so] Error 127

I'm about ready to give up on adding MrSID support, but I can't help but feel that I am close and just need to fix a little step here or there.

1

I believe you are very close. The last line of your output needs the command to create the share library:

g++ -shared followed by the rest of the last line should create your gdal_MrSID.so file.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.