LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 07-22-2010, 08:59 PM   #1
ahmed amine
LQ Newbie
 
Registered: Jul 2009
Posts: 2

Rep: Reputation: 0
/usr/bin/ld: cannot find -lm


i want to install a soft colled gibbs
when write make i foin this error
/usr/bin/ld: cannot find -lm
collect2: ld a retourné 1 code d'état d'exécution
make: *** [gibbs] Erreur 1

what's the problem


[amine@localhost src]$ ./Configure

Choose a target option:
0 - Convex OS
1 - OSF/1 (Digital UNIX)
2 - HP-UX
3 - AIX
4 - SUN-OS
5 - IRIX
6 - Linux
7 - g77 (GNU f77 compiler)
8 - VMS
9 - Lahey's DOS compiler
10 - Input mdc regexp directly
11 - Append to existing Config.dat
12 - Use existing Config.dat (default)
Actual settings: g77|gnu|unix
7
Config options: g77|gnu|unix
Checking system dependencies ...
Finished configuring

[amine@localhost src]$ mc

[amine@localhost src]$ make
g77 -o gibbs bcnt.o birch.o brent.o debfitt.o fitt.o gauleg.o gauss.o setword.o gibbs.o leng.o minbrack.o mnbrak.o numer.o optm.o polfit.o polin0.o polin1.o polin2.o polin3.o polin4.o polmin.o printpol.o qcksort.o scdebye.o setdble.o setint.o thermal.o vinet.o -static
/usr/bin/ld: cannot find -lm
collect2: ld a retourné 1 code d'état d'exécution
make: *** [gibbs] Erreur 1
 
Old 07-22-2010, 09:10 PM   #2
GrapefruiTgirl
LQ Guru
 
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Rep: Reputation: 556Reputation: 556Reputation: 556Reputation: 556Reputation: 556Reputation: 556
Taking the linker error at its word, it means the linker is looking for a library called "libm" or "m" in other words. See this error:
Code:
/usr/bin/ld: cannot find -lm
It's looking for a library called m, but cannot find it.

Now, if it were me, I'd be suspicious initially - even though we do have such things as libc, that's a pretty short name. BUT: A google search for "libm" turns up a lot of results, for libm.so.6 which is a Math Routines Library. Therefore, I would investigate whether or not you have this libm.so on your system somewhere (assuming that is the libm that gibbs wants) and if you do not, then find out what package it belongs to, and install that package before trying to build gibbs.

If you DO have the libm.so on your system, and it's the libm that gibbs wants, then it means there's something wrong with your linker search path, or your PKGCONFIG is messed up, or that libm is installed to a non-standard location.

Last edited by GrapefruiTgirl; 07-22-2010 at 09:12 PM.
 
Old 07-23-2010, 02:46 AM   #3
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
lm is libm.so. 'libm.so.X' (libm.so.6) is always installed, is part of glibc.

# yum install glibc-devel
.. will install ( or update ) libm.so .
..

Last edited by knudfl; 07-23-2010 at 02:47 AM.
 
Old 07-23-2010, 04:25 AM   #4
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,624

Rep: Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651
Quote:
0 - Convex OS
1 - OSF/1 (Digital UNIX)
2 - HP-UX
3 - AIX
4 - SUN-OS
5 - IRIX
6 - Linux
7 - g77 (GNU f77 compiler)
8 - VMS
9 - Lahey's DOS compiler
10 - Input mdc regexp directly
11 - Append to existing Config.dat
12 - Use existing Config.dat (default)
Actual settings: g77|gnu|unix
7
and just HOW old is this software ?
and where did you get it ?
lib m IS installed on all modern OS's in /lib/libm.so.6
 
Old 07-23-2010, 07:50 AM   #5
ahmed amine
LQ Newbie
 
Registered: Jul 2009
Posts: 2

Original Poster
Rep: Reputation: 0
i update libm.so.6
and i got the same problem
/usr/bin/ld: cannot find -lm
PS: i use fedora12
 
Old 07-23-2010, 12:26 PM   #6
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
May be you need "static", when you use the -static flag ?
→ → libm.a instead of the shared libm.so
( libm.so.6 is never used for compiling,
or to link against at compile time.)

# yum install glibc-devel glibc-static

......

Last edited by knudfl; 07-24-2010 at 05:10 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
echo $PATH = /home/g3rc4n/bin:/usr/local/bin:/usr/bin:/bin:/usr/games ? i_heart_pandas Linux - Software 7 09-18-2009 08:33 AM
Failed to chck remot comnd executin using shells /usr/bin/ssh and /usr/bin/rsh farnaw4u Linux - Software 2 04-06-2009 12:08 AM
path in services wrong for clamav updated frm 0.75 to 0.80 usr/bin vs usr/local/bin Emmanuel_uk Linux - Newbie 3 04-22-2005 01:02 AM
Is '/usr/bin/find' reliable if '/bin/ls' has been replaced? DigaMe Linux - Security 2 11-12-2004 10:42 PM
/usr/bin/ld: cannot find -lc aa2bi Linux - Newbie 2 06-09-2004 06:32 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 07:56 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration