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

cannot find libraries

Giovanni_Besio
Beginner
608 Views

Dear all,

I am trying to compile with -fast on OpenSuse Leap 42.2 and I got these errors:

ld: cannot find -lm
ld: cannot find -lpthread
ld: cannot find -lc
ld: cannot find -ldl
ld: cannot find -lc

Any suggestions how to solve this issue?

Regards

Giovanni

0 Kudos
1 Reply
Kevin_D_Intel
Employee
608 Views

-fast includes -static which causes the linker to search for static versions of libraries. The link fails as you showed in the absence of static versions of those particular libraries (libm, libpthread, libc, libdl)

You might check the Linux distribution site for your distro to see whether static forms of those libs are available. Perhaps they are available in additional package you can install.

Alternatively, you can replace -fast and use the individual options it throws but leave out -static. Refer to the fast page for details on those individual options.

0 Kudos
Reply