[Bug 1056340] Re: gcc option "-lm" fails - cannot link agains libm

Monsta 1056340 at bugs.launchpad.net
Tue Jan 27 15:58:30 UTC 2015


** Project changed: linuxmint => gcc-defaults (Ubuntu)

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to gcc-defaults in Ubuntu.
https://bugs.launchpad.net/bugs/1056340

Title:
  gcc option "-lm" fails - cannot link agains libm

Status in gcc-defaults package in Ubuntu:
  Invalid

Bug description:
  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?

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/gcc-defaults/+bug/1056340/+subscriptions



More information about the foundations-bugs mailing list