- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
In Linux 64-bit I get the following error when trying to compile my file:
ld: /opt/intel/Compiler/11.1/069/lib/intel64/libiomp5.a(kmp_csupport.o): relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC
I have seen a post refering to linking against libiomp5.so. Is this the solution? If so, how do I tell the compiler to ignore the .a and use .so?
Thank you for any help,
Kevin
In Linux 64-bit I get the following error when trying to compile my file:
ld: /opt/intel/Compiler/11.1/069/lib/intel64/libiomp5.a(kmp_csupport.o): relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC
I have seen a post refering to linking against libiomp5.so. Is this the solution? If so, how do I tell the compiler to ignore the .a and use .so?
Thank you for any help,
Kevin
Link Copied
4 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
icc/icpc should default to -openmp-link dynamic, which would set up the linker script to link libiomp5.so. Your situation is one of the reasons why the compiler is set up to go to such lengths to prefer that. Of course, if you use some other method to drive the link, and specify -static, you may be setting up a preference for the .a library. In any case, if you specify libiomp5.so explicitly, that should over-ride.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi
With my small contol your language and if i have understand correctly you want use shared (.so lib )
require (-fPIC -ansi -shared-intel)
icpc -fPIC -ansi -shared-intel -axSSSE3 -Os -fast -openmp -openmp-lib=compat -openmp-report - ect .......
Best regards
With my small contol your language and if i have understand correctly you want use shared (.so lib )
require (-fPIC -ansi -shared-intel)
icpc -fPIC -ansi -shared-intel -axSSSE3 -Os -fast -openmp -openmp-lib=compat -openmp-report - ect .......
Best regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Ideally, I would like to use all static libraries, however it seems libiomp5.a is unable to link. My options so far are the following:
-parallel -O3 -ip -m64 -static-intel -fPIC
The "-static-intel" is supposed to have no effect on which OpenMP run-time library is linked. So the default "-openmp-link dynamic" should be used (and I've tried to add it to the command line).
I'm still unclear why the static libiomp5.a is being chosen. As a work around I have added the shared libiomp5.so to the command to link directly to it.
Thanks for the help
- Kevin
-parallel -O3 -ip -m64 -static-intel -fPIC
The "-static-intel" is supposed to have no effect on which OpenMP run-time library is linked. So the default "-openmp-link dynamic" should be used (and I've tried to add it to the command line).
I'm still unclear why the static libiomp5.a is being chosen. As a work around I have added the shared libiomp5.so to the command to link directly to it.
Thanks for the help
- Kevin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The "-static-intel" is supposed to have no effect on which OpenMP run-time library is linked.
Hi
Yes only if the library is without an other included as shared, that require run-time.
If use shared you have your weight program reduced.
static(is default to your program) you have the program more heavy but is not completely independent (this example).
Also fPIC is for object your program , not for the lib that have already or not.
Best regards
Hi
Yes only if the library is without an other included as shared, that require run-time.
If use shared you have your weight program reduced.
static(is default to your program) you have the program more heavy but is not completely independent (this example).
Also fPIC is for object your program , not for the lib that have already or not.
Best regards

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