Intel® C++ Compiler
Support and discussions for creating C++ code that runs on platforms based on Intel® processors.
7700 Discussions

imf gets linked dynamically using -static-intel

erling_andersen
New Contributor I
855 Views

The following is done with 

 

oneapi-2021.3.0.3219

 

Run

 

icx -o test -static-intel test.c -lm 

 

then do

 

ldd test

 

and you get

 

     libimf.so => /remote/public/linux/opt/intel/oneapi-2021.3.0.3219/compiler/2021.3.0/linux/compiler/lib/intel64_lin/libimf.so (0x00007fa52046b000)
        libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fa5200cd000)
        libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fa51fec9000)
        libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fa51fad8000)
        libintlc.so.5 => /remote/public/linux/opt/intel/oneapi-2021.3.0.3219/compiler/2021.3.0/linux/compiler/lib/intel64_lin/libintlc.so.5 (0x00007fa51f860000)
        /lib64/ld-linux-x86-64.so.2 (0x00007fa520af3000)

 

Why is imf linked dynamically?

0 Kudos
4 Replies
erling_andersen
New Contributor I
721 Views

Also libintlc is also linked dynamincally.

 

What is even more strange if if you remove -lm you get

 


        linux-vdso.so.1 (0x00007ffca51ec000)
        libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f3791ffb000)
        libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f3791df7000)
        libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f3791a06000)
        /lib64/ld-linux-x86-64.so.2 (0x00007f3792399000)

 

which is what I think is correct.

 

Very strange.

 

 

ShanmukhS_Intel
Moderator
807 Views

Hi,

 

Thanks for reaching out to us.

 

We have tried compiling and running the shared c source file as per the steps shared.

We see that dynamic linking has happened in 2021.3 version. However, We have tried performing the same in latest oneAPI environment(v2021.4) and we see that libimf hasn't been dynamically linked over here.

We would like to recommend you to use the latest Intel oneAPI environment available.

 

Attached the screenshots for your reference.

 

Best regards,

Shanmukh.SS

 

ShanmukhS_Intel
Moderator
699 Views

Hi,


Reminder:

Has the solution provided helped? Is your issue resolved? Please let us know if the issue still persists.


Best Regards,

Shanmukh.SS


ShanmukhS_Intel
Moderator
608 Views

Hi,


We assume that your issue is resolved. If you need any additional information, please post a new question as this thread will no longer be monitored by Intel.


Best Regards,

Shanmukh.SS


Reply