Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Kevin_Wilson
Beginner
43 Views

ld: duplicate symbol linking error

Hello,

I am getting the following linking error while compiling my code:

ld: duplicate symbol ___intel_cpu_indicator$non_lazy_pointer

I am unsure how to interpret this, and would like any advise on where to look for a correction.

My command line argument are the following:

-parallel -O3 -ip -m64 -static-intel -fPIC

Thank you for any help,
Kevin
0 Kudos
3 Replies
mecej4
Black Belt
43 Views

The linker message is very clear: you asked it to link some object files and some libraries, among which the linker found more than one instance of the named symbol, and it is refusing to select one of them for you.

If you show us the command line that produced the message, perhaps some help may be provided.
aazue
New Contributor I
43 Views

Hi
I don't know if you using an Makefile but
I think -fPIC after Intel lib can be interpreted
strange ...( also static ....)
test with -fPIC as first parameter or without flag and see the weight binary
Icpc -fPIC ........
sometime with (make) for solve similar problems is required to use env compiler for inform flags separate.
example:
CXXFLAGS= -m64 -fPIC
Regards

Kevin_Wilson
Beginner
43 Views

Thank you for responses.

I have fixed the issue by downgrading to XCode 3.2.1 from 3.2.2, and reinstalling the intel compiler. The idea came from the following article:
http://software.intel.com/en-us/articles/intel-fortran-for-mac-os-x-incompatible-with-xcode-322/

I am unsure how closely the above issue relates to mine, but it worked.

For reference I was compiling the ITK toolkit, which uses CMake to generate the Makefile, and using the arguments described above.

- Kevin