LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
LinkBack Search this Thread
Old 02-09-2012, 02:26 AM   #1
rcmsco
LQ Newbie
 
Registered: Dec 2011
Posts: 13

Rep: Reputation: Disabled
configure: error:


hi i'm trying to configure a library source code statically from this command :

./configure --disable-shared CXXFLAGS="-O2 -march=i686"

but this error happends :

checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ISO C89... (cached) none needed
checking dependency style of gcc... (cached) gcc3
checking how to run the C preprocessor... gcc -E
checking whether ln -s works... yes
checking whether make sets $(MAKE)... (cached) yes
checking for cos in -lm... no
configure: error: *** -lm not found! ***

anyone can help me ?
 
Old 02-09-2012, 03:17 AM   #2
NevemTeve
Member
 
Registered: Oct 2011
Location: Budapest
Distribution: Debian/GNU/Linux, AIX
Posts: 270

Rep: Reputation: 91
> configure: error: *** -lm not found! ***

Install it. (OS-dependent, in linux something like libc6-dev, glibc-dev etc)
 
1 members found this post helpful.
Old 02-09-2012, 03:49 AM   #3
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2010.12, Slack1337 DebSqueeze, +50+ other Linux OS, for test only.
Posts: 9,304

Rep: Reputation: 1353Reputation: 1353Reputation: 1353Reputation: 1353Reputation: 1353Reputation: 1353Reputation: 1353Reputation: 1353Reputation: 1353Reputation: 1353
lm = libm.so or libm.a

May be the static libm.a is required ?

Install glibc-static ( Fedora, CentOS )

And be aware that libm.a has a "hideaway location"
in the latest Debian and Ubuntu : /usr/lib/i386-linux-gnu/libm.a
Or : /usr/lib/x86_64-linux-gnu/libm.a
( Provided by the package libc6-dev ).

.

Last edited by knudfl; 02-09-2012 at 06:44 AM.
 
Old 02-09-2012, 10:54 AM   #4
rcmsco
LQ Newbie
 
Registered: Dec 2011
Posts: 13

Original Poster
Rep: Reputation: Disabled
i installed that packages
i still have the same paroblem it seems that i have to enter dir of libm manually with configure script but how ?

~ > whereis libm :
> libm: /usr/lib64/libm.a /usr/lib64/libm.so
 
Old 02-09-2012, 11:14 AM   #5
NevemTeve
Member
 
Registered: Oct 2011
Location: Budapest
Distribution: Debian/GNU/Linux, AIX
Posts: 270

Rep: Reputation: 91
It might be not enough: if configure wants to compile in 32-bit mode, /usr/lib64/libm.* won't help.
 
Old 02-09-2012, 11:39 AM   #6
rcmsco
LQ Newbie
 
Registered: Dec 2011
Posts: 13

Original Poster
Rep: Reputation: Disabled
it dosent matter , i trying to compile it in 64bit mode but it gives me the same error :

./configure --disable-shared CXXFLAGS="-O2 -march=X86_64" --with-libm="/usr/lib64/libm.a"

is anything wrong with --with-libm="/usr/lib64/libm.a" ?
 
Old 02-09-2012, 11:00 PM   #7
NevemTeve
Member
 
Registered: Oct 2011
Location: Budapest
Distribution: Debian/GNU/Linux, AIX
Posts: 270

Rep: Reputation: 91
does it work without --disable-shared?

Last edited by NevemTeve; 02-09-2012 at 11:03 PM.
 
Old 02-10-2012, 04:14 AM   #8
bigearsbilly
Senior Member
 
Registered: Mar 2004
Location: england
Distribution: FreeBSD, Puppy
Posts: 3,048

Rep: Reputation: 95
Usually when you fix one thing in configure something else will be broken in a long endless merry-go-round.

Read the release notes, check you have the correct dependencies etc for what you are compiling.
most likely is you are missing something.

You can often save a lot of time by taking a breath and doing some reading.

Last edited by bigearsbilly; 02-10-2012 at 04:15 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] php5 ./configure error: (FILENAME=- FNR=27) fatal error: internal error richinsc Linux - Software 2 07-08-2010 09:20 AM
configure error: configure: error: cannot execute: /usr/local/bin/arm-apple-darwin-ld GunNam Linux - General 0 10-26-2008 04:44 AM
dpkg-buildpackage configure: error: can only configure for one host and one target at donnied Debian 0 05-28-2008 03:44 AM
./configure fails with: libz... configure: error: not found. erpe Linux - Software 17 10-11-2006 05:56 PM
configure: error: when trying to install / configure new software ? met tomfer007 Linux - Software 1 07-25-2004 03:52 PM


All times are GMT -5. The time now is 08:44 AM.

Main Menu
 
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
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration