Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Beginner
40 Views

cannot find libraries

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
Highlighted
Employee
40 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