[beports] Re: missing -lm?
- From: Andreas Färber <andreas.faerber@xxxxxx>
- To: beports@xxxxxxxxxxxxx
- Date: Tue, 29 Apr 2008 09:26:34 +0200
Hi Scott,
Am 29.04.2008 um 01:07 schrieb scott mc:
Here's a good tip on -lm in case you run into that on any port
attempts.
You could've asked here first, it's a pretty common issue.
It's also one of the few things in François' slides, linked to
somewhere from BePorts. But usually there is already a check present
for BeOS or Cygwin so in most cases you don't have to add it yourself.
You should add an entry to the CommonProblems page.
Andreas
One of the ones I am working on had this and I was able to
just remove it, but then an unrelated problem.
---------- Forwarded message ----------
From: François Revol <revol@xxxxxxx>
Date: Mon, Apr 28, 2008 at 2:57 PM
Subject: [haiku-development] Re: missing -lm?
To: haiku-development@xxxxxxxxxxxxx
One of the things I've seen come up more than once now in attempting
ports is that they bomb out for a missing -lm.
It's my understanding the this refers to libm which is a math
library.
Is this included in one of Haiku's libraries?
And is the workaround to include a Haiku library rather than -lm, and
if so which one is it?
In Haiku (and BeOS), glibc and libm are both included in libroot and
linked to by default.
It is really wrong to assume library existence, be it libm.
But since we are the only Unixish OS around that doesn't have it,
linux
freeks often think they can hardcode it.
The correct fix is to check for it at configure or compile time.
Remove the -lm from the makefiles, and you can usually add something
like:
AC_CHECK_LIB(m,sqrtf)
to the configure.ac or .in.
Sometimes you must add it to a custom FOOLIBS variable instead of
LIBS,
but most of the time it should just work this way.
There is no reason we should add a hack to work around buggy software.
AFAIK libm is not mandated by any standard.
François.
--
BePorts homepage - http://tools.assembla.com/BePorts
List archives: http://www.freelists.org/archives/beports
Administrative contact: brecht@xxxxxxxxxxx
--
BePorts homepage - http://tools.assembla.com/BePorts
List archives: http://www.freelists.org/archives/beports
Administrative contact: brecht@xxxxxxxxxxx
- References:
- [beports] Re: missing -lm?
- From: scott mc
Other related posts:
- » [beports] Re: missing -lm?
- » [beports] Re: missing -lm?
Here's a good tip on -lm in case you run into that on any port attempts.
One of the ones I am working on had this and I was able to just remove it, but then an unrelated problem. ---------- Forwarded message ---------- From: François Revol <revol@xxxxxxx> Date: Mon, Apr 28, 2008 at 2:57 PM Subject: [haiku-development] Re: missing -lm? To: haiku-development@xxxxxxxxxxxxx
One of the things I've seen come up more than once now in attempting ports is that they bomb out for a missing -lm. It's my understanding the this refers to libm which is a math library. Is this included in one of Haiku's libraries? And is the workaround to include a Haiku library rather than -lm, and if so which one is it?
In Haiku (and BeOS), glibc and libm are both included in libroot and linked to by default. It is really wrong to assume library existence, be it libm.But since we are the only Unixish OS around that doesn't have it, linux
freeks often think they can hardcode it. The correct fix is to check for it at configure or compile time. Remove the -lm from the makefiles, and you can usually add something like: AC_CHECK_LIB(m,sqrtf) to the configure.ac or .in.Sometimes you must add it to a custom FOOLIBS variable instead of LIBS,
but most of the time it should just work this way. There is no reason we should add a hack to work around buggy software. AFAIK libm is not mandated by any standard. François. -- BePorts homepage - http://tools.assembla.com/BePorts List archives: http://www.freelists.org/archives/beports Administrative contact: brecht@xxxxxxxxxxx
- [beports] Re: missing -lm?
- From: scott mc