[Coin-discuss] configuring COIN for x86_64 Linux

Kish Shen kish.shen at crosscoreop.com
Thu May 3 10:30:26 EDT 2007


Hi,

On our x86_64 Linux machine:

kish at phoenix:~/Coin-Cbc20070427> uname -a
Linux phoenix 2.6.16.27-0.9-smp #1 SMP Tue Feb 13 09:35:18 UTC 2007 x86_64 x86_64 x86_64 GNU/Linux

the -fPIC flag is needed during compilation (with gcc) to allow the code to be relocatable. 

In our use of the COIN packages, we generate static (.a) libraries that we link against our
own code to produce our own dynamic libraries. However, we get an error:

 /usr/lib64/gcc/x86_64-suse-linux/4.1.0/../../../../x86_64-suse-linux/bin/ld: /vol/Eclipse/thirdparty/coinnew/x86_64_linux/lib/libOsiClp.a(OsiClpSolverInterface.o): relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC


The -fPIC flag is not added by the COIN configure script (at least for the Cbc trunk branch 
that I downloaded on 27 April). I run the configure  script with the --enable-static option.
Looking at the script, it seems to do a lot of testing to determine if -fPIC is needed. Should
these tests set the -fPIC flag in my case? I can (and will) do it manually, but it seems to be
better if it could be detected automatically.

Thanks and cheers,

Kish



More information about the Coin-discuss mailing list