[Haskell-beginners] cmath Install troubles

Brandon Allbery allbery.b at gmail.com
Thu Apr 19 00:38:17 CEST 2012


On Wed, Apr 18, 2012 at 16:18, Tom Murphy <amindfv at gmail.com> wrote:

> 2 important facts:
> - A test C program, using one of the "undefined" functions (isnan)
> compiles with GCC and runs
> - I went in by hand and temporarily replaced each version of math.h on
> my computer with a version that has the necessary functions defined.
> Cabal-install still failed with the same error.
>
> This makes it seem like cabal doesn't have access to _any_ math.h
> file, but if this were the case, wouldn't I get many more
> undefined-function errors than I do?
>

Unless you are using an older ghc with -fvia-C, <math.h> is not used or
useful.  The modern -fasm codegen doesn't know what to do with C-level
declarations.  If your <math.h> is using macros to define gamma as
something else, you will need to find that something else or use a wrapper
library.

I note that OS X doesn't have a gamma().  There are lgamma() and tgamma()
and variations thereon.  (and no related macros in <math.h>, confirming
that it is not related.)

-- 
brandon s allbery                                      allbery.b at gmail.com
wandering unix systems administrator (available)     (412) 475-9364 vm/sms
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/beginners/attachments/20120418/d8f7c83b/attachment.htm>


More information about the Beginners mailing list