Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
This community is designed for sharing of public information. Please do not share Intel or third-party confidential information here.
27159 Discussions

Using 'dlopen' in statically linked applications requires at runtime the shared libraries from the g

Dompink
Beginner
1,052 Views

Hi, I'm new in intel fortran  compiler,  the error message arises when I try to install xmlf90:

 

ifort -qopenmp -static -o count m_count.o count.o -L/home/dompink/code_SCAOCC/code_SCAOCC/xmlf90-1.2g/macros//lib/ -lflib
ld: /home/dompink/intel/oneapi/compiler/2021.2.0/linux/bin/intel64/../../compiler/lib/intel64_lin/libiomp5.a(ompt-general.o): in function `ompt_pre_init':
(.text+0x29a2): warning: Using 'dlopen' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking

 

The environment is

  1. ubuntu 20.04.02
  2. Intel fortran compiler classic
  3. the PATH added :  
    1. export PATH=$PATH:/home/dompink/intel/oneapi/compiler/2021.2.0/linux/bin/intel64
    2. export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/dompink/intel/oneapi/compiler/2021.2.0/linux/compiler/lib/intel64

 

Another problem is 

ld:  cannot find -lmkl_intel_lp64
ld: cannot find-lmkl_intel_thread
ld: cannot find-lmkl_core

 

Can someone solve these problems?

Thanks

0 Kudos
1 Solution
Steve_Lionel
Black Belt Retired Employee
1,035 Views

I'm not a Linux expert, but I can tell you that this has nothing to do with the compiler or the Fortran language.

The message from ld about dlopen, if my understanding from what some web searches tell me is correct, is saying that if you want to use dlopen (and the library you're calling may do that), you can't link to the static libraries. So take out -static.

The second set of ld errors refer to Intel MKL libraries (a component of the Intel oneAPI Base Toolkit), and either MKL is not installed or the library path for it was not correctly set.  I'm guessing that these are from a different set of build commands you didn't show us. On Linux, one has to explicitly name libraries you want to link to (the ifort driver supplies the compiler support libraries when it invokes ld), but for MKL you either have to name them or use -qmkl to have ifort supply a default set of library names. Something in your build DID ask for the MKL libraries, but they can't be found in LD_LIBRARY_PATH (they aren't in the same directory as the Fortran compiler libraries.)

View solution in original post

2 Replies
Steve_Lionel
Black Belt Retired Employee
1,036 Views

I'm not a Linux expert, but I can tell you that this has nothing to do with the compiler or the Fortran language.

The message from ld about dlopen, if my understanding from what some web searches tell me is correct, is saying that if you want to use dlopen (and the library you're calling may do that), you can't link to the static libraries. So take out -static.

The second set of ld errors refer to Intel MKL libraries (a component of the Intel oneAPI Base Toolkit), and either MKL is not installed or the library path for it was not correctly set.  I'm guessing that these are from a different set of build commands you didn't show us. On Linux, one has to explicitly name libraries you want to link to (the ifort driver supplies the compiler support libraries when it invokes ld), but for MKL you either have to name them or use -qmkl to have ifort supply a default set of library names. Something in your build DID ask for the MKL libraries, but they can't be found in LD_LIBRARY_PATH (they aren't in the same directory as the Fortran compiler libraries.)

Dompink
Beginner
1,010 Views

Thanks a lot! The second error is solved when I install Intel MKL libraries correctly

Reply