[Coin-discuss] Building shared libraries with gcc 3

Ted Ralphs tkralphs at lehigh.edu
Fri Feb 17 09:34:33 EST 2006


I was able to fix the problem by downloading and compiling gcc 3 from
source instead of just installing the Debian package. I thought the
packages were supposed to be able to coexist, but apparently not.

Cheers,

Ted

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!

-- 
Dr. Ted Ralphs
Assistant Professor
Industrial and Systems Engineering
Lehigh University
(610)758-4784
tkralphs at lehigh.edu
www.lehigh.edu/~tkr2



More information about the Coin-discuss mailing list