Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
Welcome to the Intel Community. If you get an answer you like, please mark it as an Accepted Solution to help others. Thank you!

cannot find libraries

Giovanni_Besio
Beginner
174 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
174 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.

Reply