[Gdal-dev] linking problems with MrSID library

Bill Binko bill at binko.net
Mon Oct 3 19:12:32 EDT 2005


> I had heard that it was possible to build something in GCC 4 linked  
> to something built with GCC 3.3 by linking both the new and old  
> libstdc++, so I keep attempting this with each new GDAL version to  
> try and figure it out.  Since it happens with GCC 3.3 also, I never  
> get beyond that to just TRY it.
> 

I'm probably the source of that rumor, but it's not exactly what I said.  
There are binary compatibility issues within the GCC 3.x tree: that is 
what I had succeeded with.  However, it's possible that you can get 3.3 
and 4 to work together.

I had a real reason to need this (I needed ECW and MrSID support in the 
same build, and I use GCC 3.4.1).  So I read up and found that if you 
include the older libstdc++ before the newer one in the final link, the 
name mangling works itself out (by design, not luck).

However, GDAL is really not setup to do this, especially if you use
libtool.  I have suggested to Frank and LizardTech that someone should
update the configure to add this, but then I tried it and failed miserably
, so I'm not going to expect them to do this :)

So, I now hand edit the makefiles after configure so that libstdc++.so.5 
and libstdc++.so.6 are included when building GDAL.  Since I also have not 
figured out how to add that depency to libgdal.so correctly, I also hand 
build mapserver and php_mapscript.so which I need.

I've picked on LizardTech about this, and they seem interested in cleaning 
it up.  Perhaps if the chorus of agony got loud enough :)

Hope this helps you

Bill



More information about the Gdal-dev mailing list