Using pgi/7.2 trying to compile a users code with profiling. The user links the code into a shared library which he then dlopen()'s latter and uses.
When he trys to link the library he gets an error:
Linking CompressibleNS shared object:
ld -shared --export-dynamic -undefined dynamic_lookup -soname=…/…/lib/libCompressibleNS.so -o …/…/lib/libCompressibleNS.so xf_CompressibleNS.o xf_CompressibleNS_Diff.o xf_CompressibleNS_Conv.o
ld: xf_CompressibleNS.o: relocation R_X86_64_PC32 against `_mcount’ can not be used when making a shared object; recompile with -fPIC
ld: final link failed: Bad value
Any insight? the ‘relocation’ part normally means that I need to use -mcmodel=medium but there is no way that is right for this code. (not needed when not profiling). Also the code compiles and profiles with gcc just fine. Just runs faster under pgcc, so wanted to profile with pgcc also.
Any help would be good.
Brock Palen