[Gdal-dev] MrSID Cross-Compiler Information
William Kyngesburye
woklist at kyngchaos.com
Mon Aug 22 19:23:05 EDT 2005
Sounds cool. No waiting for LizardTech to get crackin' on that GCC 4
version of the libs.
But, are you sure that's CONFIG_LIBS? That doesn't affect the GDAL
build, just how other software links to GDAL.
Shouldn't that go in LIBS?
On Aug 22, 2005, at 4:14 PM, 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
>
-----
William Kyngesburye <kyngchaos at kyngchaos.com>
http://www.kyngchaos.com/
"Oh, look, I seem to have fallen down a deep, dark hole. Now what
does that remind me of? Ah, yes - life."
- Marvin
More information about the Gdal-dev
mailing list