[Gdal-dev] linking problems with MrSID library
Kirk McKelvey
kmckelvey at lizardtech.com
Mon Oct 3 17:13:41 EDT 2005
Hello William,
Are you saying you did not get these link errors when using GDAL 1.2.6,
MrSID 5.0.6.955, and gcc4 on Mac OS 10.4? Or did one of these other
variables (SID SDK or compiler) also change?
It seems quite likely to be a stdc++ version issue; gcc 4 is not yet a
supported compiler with our SDK. If GDAL *was* the only update and it
did work before, then while surprising it is still not a complete
mystery. What may have happened is that the MrSIDDataset class began
using more symbols from the MrSID SDK, introducing new dependencies that
were in turn dependent on libstdc++...
Regarding the addition of xmlparse, this should only be a dependency for
our Encode SDK. I think it is added in the wrong place in configure.
Frank, do you agree with the following patch?
Index: configure.in
===================================================================
RCS file: /cvs/maptools/cvsroot/gdal/configure.in,v
retrieving revision 1.162
diff -c -r1.162 configure.in
*** configure.in 2 Oct 2005 00:59:00 -0000 1.162
--- configure.in 3 Oct 2005 21:10:05 -0000
***************
*** 1107,1120 ****
HAVE_MRSID=yes
MRSID_INCLUDE="-I$with_mrsid/include/base
-I$with_mrsid/include/metadata -I$with_mrsid/include/mrsid_readers
-I$with_mrsid/include/j2k_readers -I$with_mrsid/include/support"
! MRSID_LIBS="-lltidsdk -lxmlparse -lpthread"
AC_MSG_CHECKING([for MG3ImageWriter.h in
$with_mrsid/include/mrsid_writers])
if test -r "$with_mrsid/include/mrsid_writers/MG3ImageWriter.h" ;
then
AC_MSG_RESULT([found MrSID ESDK version 4.x or newer.])
MRSID_FLAGS="-DMRSID_ESDK $MRSID_FLAGS"
MRSID_INCLUDE="-I$with_mrsid/include/mrsid_writers
-I$with_mrsid/include/j2k_writers $MRSID_INCLUDE"
! MRSID_LIBS="-lltiesdk -lcryptopp $MRSID_LIBS"
fi
AC_MSG_CHECKING([for MrSID JPEG2000 support])
--- 1107,1120 ----
HAVE_MRSID=yes
MRSID_INCLUDE="-I$with_mrsid/include/base
-I$with_mrsid/include/metadata -I$with_mrsid/include/mrsid_readers
-I$with_mrsid/include/j2k_readers -I$with_mrsid/include/support"
! MRSID_LIBS="-lltidsdk -lpthread"
AC_MSG_CHECKING([for MG3ImageWriter.h in
$with_mrsid/include/mrsid_writers])
if test -r "$with_mrsid/include/mrsid_writers/MG3ImageWriter.h" ;
then
AC_MSG_RESULT([found MrSID ESDK version 4.x or newer.])
MRSID_FLAGS="-DMRSID_ESDK $MRSID_FLAGS"
MRSID_INCLUDE="-I$with_mrsid/include/mrsid_writers
-I$with_mrsid/include/j2k_writers $MRSID_INCLUDE"
! MRSID_LIBS="-lltiesdk -lcryptopp -lxmlparse $MRSID_LIBS"
fi
AC_MSG_CHECKING([for MrSID JPEG2000 support])
Cheers,
Kirk
-----Original Message-----
From: gdal-dev-bounces at lists.maptools.org
[mailto:gdal-dev-bounces at lists.maptools.org] On Behalf Of William
Kyngesburye
Sent: Sunday, October 02, 2005 2:04 PM
To: gdal-dev at lists.maptools.org
Subject: [Gdal-dev] linking problems with MrSID library
I've been having problems getting the MrSID dsdk to link to GDAL since
switching to CVS, and 1.3.x, from 1.2.6 recently.
I'm using the latest MrSID 5.0.6.955. With the new GDAL 1.3.1a2, I get
these link errors (compiling completes fine):
ld: Undefined symbols:
__ZNSt24__default_alloc_templateILb1ELi0EE10deallocateEPvm
__ZNSt24__default_alloc_templateILb1ELi0EE8allocateEm
__ZNSs20_S_empty_rep_storageE
__ZNSaIcE8allocateEmPKv
__ZNSaIcED4Ev
__ZNSsD4Ev
/usr/bin/libtool: internal link edit command failed
With GDAL 1.3.0 and CVS before that, there were a LOT more undefined
symbols. I'm using GCC 4 on Mac OS X 10.4, but I've had the same in the
past using GCC 3.3 on Mac OS X 10.3.8 (haven't had a chance to test
1.3.1a2 yet on 10.3), so I don't think it's a libstdc++ version issue,
yet.
Are those supposed to be in the mrsid library, or some other library? I
noticed that libxmlparse (yet another XML library!) was added to the
mrsid link options - I don't have that and I can't get it to build on OS
X (it's quite old). So I removed it from the mrsid link options, since
I didn't see anything in the GDAL docs or MrSID docs that it needs
xmlparse. If GDAL and/or MrSID needs it, it should be mentioned in the
build requirements.
-----
William Kyngesburye <kyngchaos at kyngchaos.com> http://www.kyngchaos.com/
"Those people who most want to rule people are, ipso-facto, those least
suited to do it."
- A rule of the universe, from the HitchHiker's Guide to the Galaxy
_______________________________________________
Gdal-dev mailing list
Gdal-dev at lists.maptools.org
http://lists.maptools.org/mailman/listinfo/gdal-dev
More information about the Gdal-dev
mailing list