-static-intel problem in composer xe 2013?

-static-intel problem in composer xe 2013?

When I tried to build a simple shared library using static link to intel fortran libraries, I got relocation problem:

ifort -fPIC test.f90 -shared -static-intel -o libtest.so

ld: /scratch/ifort64/composer_xe_2013.1.117/compiler/lib/intel64/libifcore.a(for_wseq_lis.o): relocation R_X86_64_32 against `.rodata.str1.4' can not be used when making a shared object; recompile with -fPIC /scratch/ifort64/composer_xe_2013.1.117/compiler/lib/intel64/libifcore.a: could not read symbols: Bad value

It seems the ifort tried to link libifcore.a not libifcore_pic.a; I am using composer xe 2013.1.117 intel64

Any idea about this problem?

publicaciones de 11 / 0 nuevos
Último envío
Para obtener más información sobre las optimizaciones del compilador, consulte el aviso sobre la optimización.
Imagen de Georg Zitzlsberger (Intel)

Hello,

that's a bug. It works with IA32 but fails for Intel64. I've filed a defect ticket (DPD200317660) and let you know once this is fixed.

You already described the possible workaround to specify libifcore_pic.a manually.

Thank you for reporting this.

Best regards,

Georg Zitzlsberger

Thank you Georg.

Actually, I don't know how to manually specify libifcore_pic.a. Could you give me some instruction?

I tried something like

ifort -fPIC test.f90 -shared -static-intel -L/xxxxx/libifcore_pic.a -o libtest.so

But it didn't work...

You would use <full_pathname_of_.a> just as if you wanted the entire collection of .o files from it.  Big L adds a directory to library search path but doesn't specify a library to search.

Thank you Tim, it works!

What is the status of  defect ticket DPD200317660 ? I cannot find it? Can you send link to it? We also have this issue.

That defect is still open. The DPD200xxxxxx tickets are recorded in our internal tracking system that is not accessible externally.

Have you tried the work around mentioned of linking to the libifcore_pic.a library?

Imagen de Georg Zitzlsberger (Intel)

Hello,

as Kevin said, the ticket is still open. I'll ping the engineers once more and let them know about your request. Did the workaround help you?

Any closed ticket for the compiler can be seen in the "Compilers Fixes List", e.g.:

https://software.intel.com/en-us/articles/intel-composer-xe-2013-compile...

Best regards,

Georg Zitzlsberger

Imagen de Georg Zitzlsberger (Intel)

Hello,

Intel(R) Composer XE 2015 Update 1 (expected around November) will have a fix for this.

Best regards,

Georg Zitzlsberger

We now have the reverse problem with the Intel 15.0.1 compiler on RHEL6 x86_64: building a shared object with -shared but without -static-intel still results in the inclusion of libifcore_pic.a in the corresponding shared object. This is a problem because when later an OpenMP-enabled Fortran program wants to use the library, the incompatible run-times cause the binary to segfault at launch.

Is this already known? Should I prepare a test case?

 

Okay, I have prepared a test case now that works with Intel 14.0.x compilers but generates programs that often crash because the wrong runtime gets used. The attached program uses internal WRITE in a library function that gets linked into a shared object, which then contains a copy of the non-thread-safe run-time function for_write_int_fmt and also in an OpenMP parallel program that is linked to the mt-runtime but interpositioned by the runtime included in the library.

 

Adjuntos: 

AdjuntoTamaño
Descargar intel15-shared-link.tar.gz1.02 KB

Inicie sesión para dejar un comentario.