- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I build my software on several platforms using CMake. Everything works fine except on Linux 64 bits using Intel 11.1.073 compiler.
At the link time, I'm getting this error:
ld: /opt/intel/Compiler/11.1/073/lib/intel64/libiomp5.a(kmp_ftn_cdecl.o): relocation R_X86_64_32 against `_2__STRING.0' can not be used when making a shared object; recompile with -fPIC
/opt/intel/Compiler/11.1/073/lib/intel64/libiomp5.a: could not read symbols: Bad value
ld: /opt/intel/Compiler/11.1/073/lib/intel64/libiomp5.a(kmp_ftn_cdecl.o): relocation R_X86_64_32 against `_2__STRING.0' can not be used when making a shared object; recompile with -fPIC/opt/intel/Compiler/11.1/073/lib/intel64/libiomp5.a: could not read symbols: Bad valueI have tried to link the dynamic library of iomp5 and no luck.
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This has been discussed several times before. The static libiomp5 is designed intentionally not to work in shared objects. As you are using icc, you ought to be able to satisfy the openmp references by using icc -openmp (not gcc or ld directly) for the final link, so as to link against libiomp5.so (not by attempting to include portions of the library in your own libraries).

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page