Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
28446 Discussions

ifort 8.1.025 for EMT64T (SuSE 9): problem at linking with static FORTRAn libs

resi
Beginner
280 Views
0 Kudos
1 Reply
resi
Beginner
280 Views
pardon: I accidentally hit the return key before filling the message body... here it is:


I'm trying to build a shared lib of our software with the static libs of the FORTRAN RTS linked to it (stuff derived from ifort -v):


/usr/bin/ld /usr/lib64/crti.o /usr/lib64/gcc-lib/x86_64-suse-linux/3.3.1/crtbeginS.o --eh-frame-hdr -shared -o libtest.so -L /usr/lib64 -lpthread -L /usr/lib64 -Qy -L/usr/lib64/gcc-lib/x86_64-suse-linux/3.3.1 -L/usr/lib64 /opt/intel_fce_80/lib/libsvml.a /opt/intel_fce_80/lib/libifport.a /opt/intel_fce_80/lib/libifcoremt_pic.a /opt/intel_fce_80/lib/libimf.a -lm /opt/intel_fce_80/lib/libguide.a -lstdc++ /opt/intel_fce_80/lib/libirc.a -lgcc_s /opt/intel_fce_80/lib/libcxaguard.a -lpthread -lc -lgcc_s /opt/intel_fce_80/lib/libirc_s.a /usr/lib64/gcc-lib/x86_64-suse-linux/3.3.1/crtendS.o /usr/lib64/crtn.o


/usr/bin/ld: /opt/intel_fce_80/lib/libguide.a(kmp_sched.o): relocation R_X86_64_32S can not be used when making a shared object; recompile with -fPIC /opt/intel_fce_80/lib/libguide.a: could not read symbols: Bad value


I linked the lib without libguide but the executable with libguide.a, which worked without complaints. But at execution printed msgs like:


./testdync: Symbol `__errno_location' causes overflow in R_X86_64_PC32 relocation


./testdync: Symbol `malloc' causes overflow in R_X86_64_PC32 relocation


./testdync: Symbol `free' causes overflow in R_X86_64_PC32 relocation and aborted.

In /opt/intel_fce_80/lib there are some libs in _pic.a version (libifcore, libifcoremt) as well as just in .a version.

Question: Since I cannot recompile the sources for libguide.a: Is there a libguide_pic.a available?


Thank you.

0 Kudos
Reply