[Coin-discuss] Building shared libraries with gcc 3

Matthew Saltzman mjs at ces.clemson.edu
Thu Feb 16 23:14:24 EST 2006


On Thu, 16 Feb 2006, Ted Ralphs wrote:

> We are currently in the process of building a set of precompiled COIN 
> libraries that will be made available for download. I am working on compiling 
> the Linux binaries on a system on which gcc 4.0 and gcc 3.4 are both 
> installed. Unfortunately, I can't seem to compile shared libraries with gcc 
> 3.4 anymore, even though I'm sure it used to work before I upgraded to gcc 
> 4.0. Actually, to be precise, the compilation isn't the problem, it's the 
> linking. At link time, I get lots of errors like
>
> `.L355' referenced in section `.rodata' of Linux-g/CoinPresolveSubst.o:
> defined in discarded section `.gnu.linkonce.t._Z9CoinZeroNIcEvPT_i' of
> Linux-g/CoinPresolveSubst.o
>
> These errors go away if I remove the -fPIC argument, but this makes the 
> resulting libraries fairly useless. Googling
>
> "referenced in section `.rodata' defined in discarded section"
>
> gives lots of hits with lots of theories about the source of the error. The 
> most likely suspect seems to be that if you want to use an old version of 
> gcc, you also have to have a matching version of binutils. Before I go to the 
> trouble of trying to install an older version of binutils, can someone who is 
> using gcc 3 on Linux verify that the main COIN libraries can be built from 
> the code currently in CVS? Any ideas about what this problem would also be 
> welcome. Thanks for your help!

Ted-

I just built the Coin component on RHEL 4 i386 (gcc-3.4.4-2 and 
binutils-2.15.92.0.2-15) with no problem.  (FC4 uses gcc-4.0.2-8.fc4 and 
binutils-2.15.94.0.2.2-2.1.  Not sure what changed between binutils 
versions.)  I'd try the 3.4 compat compiler in FC4, but I can't find the 
g++ component for it.



>
> Cheers,
>
> Ted
>

-- 
 		Matthew Saltzman

Clemson University Math Sciences
mjs AT clemson DOT edu
http://www.math.clemson.edu/~mjs



More information about the Coin-discuss mailing list