[Haskell-beginners] cmath Install troubles

Brandon Allbery allbery.b at gmail.com
Thu Apr 19 07:31:11 CEST 2012

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

> On 4/18/12, Brandon Allbery <allbery.b at gmail.com> wrote:
> > On Wed, Apr 18, 2012 at 16:18, Tom Murphy <amindfv at gmail.com> wrote:
> >> 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,
> [...]
> I have 7.0.4.

7.0.4 has -fasm by default, but you can force -fvia-C still.  With -fasm,
the include files are not used afaik; since direct assembly code is created
and not C code, a C include file is not useful.

> Hmm, that's true...
> I don't really understand how .hsc files are compiled, but isn't the
> "#include <math.h>" in cmath done in the very standard FFI style?

If warnings are on, I think that elicits a "this is not used any more"
warning with -fasm.

> 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.)
> What do you mean by OS X not having them? On my system (10.6), gamma()

I'm on 10.7, and I have no gamma().

I just checked the 10.6 SDK includes; it has

    extern double gamma ( double ); /* Legacy API: please use C99 tgamma()
instead. */

so apparently it was deprecated and is now removed.

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/20120419/a5413006/attachment-0001.htm>

More information about the Beginners mailing list