mersenneforum.org  

Go Back   mersenneforum.org > Extra Stuff > Linux

Reply
 
Thread Tools
Old 2005-03-17, 07:03   #1
JHansen
 
JHansen's Avatar
 
Apr 2004
Copenhagen, Denmark

22·29 Posts
Question Linking error

Hi everyone!

I'm trying to build some programs from source, but I ran into a little trouble.

Note: I'm still not a very seasoned tool builder. I just stumble my way through without really knowing what happens.

I'm using Mandrake 10.1 with no funny gcc stuff installed. Here's the error that I got:

Code:
cc -Wall -W -Wshadow -Wundef -march=x86-64 -g   -static ./sqrt.o ./basic.o ./basicassem.o \
      -L/usr/local/lib/ -lm -o sqrt
/usr/bin/ld: cannot find -lm
collect2: ld returned 1 exit status
I think I have seen that error before, but I can't remember how I fixed it. Can anyone please help me? A link to a RPM package would be perfect!

--
Cheers,
Jes
JHansen is offline   Reply With Quote
Old 2005-03-17, 14:29   #2
gribozavr
 
gribozavr's Avatar
 
Mar 2005
Internet; Ukraine, Kiev

11×37 Posts
Lightbulb

You have tried to build a static binary (-static) and have requested to link it with math library (-lm). So you'll need a static version of libm (usually /usr/lib/libm.a). AFAIK, in Madrake libm.a is in the glibc-static-devel package. Install the package and type `make' again.
gribozavr is offline   Reply With Quote
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
CUDA linking on Mac Prime95 Programming 5 2014-12-22 22:30
Msieve: problem linking with other C library srawlins Msieve 6 2010-04-02 02:05
Linkhelpers, Link error while linking a shared lib linkhelpers Linux 1 2009-09-17 03:49
BUG: upgrade/linking lost my reservations sylvester PrimeNet 0 2008-10-28 05:21
Error 5 causes userid change and error 17 updates for exponents Old man PrimeNet PrimeNet 0 2006-02-05 02:27

All times are UTC. The time now is 11:55.

Sat Apr 10 11:55:11 UTC 2021 up 2 days, 6:36, 1 user, load averages: 1.95, 1.82, 1.74

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.

This forum has received and complied with 0 (zero) government requests for information.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation.
A copy of the license is included in the FAQ.