[Bug 1056340] [NEW] gcc option "-lm" fails - cannot link agains libm
Launchpad Bug Tracker
1056340 at bugs.launchpad.net
Tue Jan 27 15:58:32 UTC 2015
You have been subscribed to a public bug:
I newly installed LinuxMint13 (Mate 64 Bit) , fully updated
(2012-09-25) , on a new AMD64 machine.
gcc works properly except when using mathlib functions. Error messages
always indicate that sqrt() and other mathlib functions are unresolved.
I checked the installation and found:
- /usr/lib/x86_64-linux-gnu/libm.a
- /usr/lib/x86_64-linux-gnu/libm.so ( -> /lib/x86_64-linux-gnu/libm.so.6)
- /lib/x86_64-linux-gnu/libm.so.6 ( -> libm-2.15.so)
- /lib/x86_64-linux-gnu/libm-2.15.so
Symbol "sqrt" was present (type "W") in both the static and the shared
library.
Both "gcc -lm" and "gcc -L/usr/lib/x86_64-linux-gnu -L/lib/x86_64-linux-gnu -lm" reported persistently:
"undefined reference to sqrt".
Same picture with all other libm functions I tried. The source code contains "#include <math.h>", of course.
What is going wrong?
** Affects: gcc-defaults (Ubuntu)
Importance: Undecided
Status: New
--
gcc option "-lm" fails - cannot link agains libm
https://bugs.launchpad.net/bugs/1056340
You received this bug notification because you are a member of Ubuntu Foundations Bugs, which is subscribed to gcc-defaults in Ubuntu.
More information about the foundations-bugs
mailing list