[Gdal-dev] MrSID Cross-Compiler Information

Bill Binko bill at binko.net
Sat Aug 27 03:27:20 EDT 2005


Hate to reply to my own post, but I've found a problem with this.  It's 
fixable, but to be honest, I'll need some assistance in getting it to work 
easily.

The problem is that the 'libtool' command doesn't seem to use the any of
the LIB parameters in GDALmake.opt when it adds the dependencies to the
libgdal.so.  I honestly have tried everything I can think of to make it
add those dependencies.

The problem is that if those dependencies are not added, none of the 
Python stuff will work, and you'll have to re-compile mapserver with the 
same libs.

I have given up for the time being, and re-linked the libgdal.so by hand 
adding the two files.

If anyone familiar with the build would like to fill me in on how to do 
this, I'd appreciate it.

Bill

On Mon, 22 Aug 2005, Bill Binko wrote:

> Hi everyone,
> 
> I have some good news on this front.  After discussing this with Frank, I 
> went digging and found a way to link GDAL with a version of the MrSID SDK 
> that was built with a different version of GCC.
> 
> This page gives the (very) gory details: http://gcc.gnu.org/onlinedocs/libstdc++/abi.html
> 
> Bug basically, if you're having linking troubles that look like this: 
> 
>  ../.libs/libgdal.so: undefined reference to `std::__default_alloc_template<true, 0>::allocate(unsigned int)' 
>  ../.libs/libgdal.so: undefined reference to `std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >::_Rep::_S_create(unsigned int, std::allocator<wchar_t> const&)'  
> 
> You probably are running against a library linked with an older GCC C++ 
> library.
> 
> In the past the only solution known (at least to Frank and I) was to build 
> a version of GDAL using the same GCC version.  After reading the above 
> link, I found that you can instead just manually force the linker to link 
> to both stdc++ libraries (assuming you have both on your system)
> 
> So: to accomplish this, simply make the following change in GDALmake.opt:
> 
> CONFIG_LIBS     =       $(LIBGDAL)
> 
> becomes
> 
> CONFIG_LIBS     =       $(LIBGDAL) /usr/lib/libstdc++.so.5 /usr/lib/libstdc++.so.6
> 
> A clean rebuild should solve your link errors.  I am interested to see how 
> people do with this, so please contact me with any issues.
> 
> Bill
> 
> 
> _______________________________________________
> 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