[Haskell-cafe] foreign import and gmp
thomas.dubuisson at gmail.com
Wed Aug 8 23:55:21 CEST 2012
You need to build GHC using the integer-simple library (instead of the
'integer-gmp' library). From the 6.12.1 release notes:
It is now possible to build GHC with a simple, BSD-licensed Haskell
implementation of Integer, instead of the implementation on top of
GMP. To do so, set INTEGER_LIBRARY to integer-simple in mk/build.mk.
In addition, some libraries depend on integer-gmp (sadly). This is
usually part of an optimization and when I see it I tend to send in a
patch adding an "integer-simple" flag so you can cabal install it by
including "-finteger-simple" on the command line (text is an example
of one such library).
And that's it! Your integer operations will run slower but you should
get stable operation even when using the GMP library.
On Wed, Aug 8, 2012 at 2:45 PM, Lars Kuhtz <haskell at kuhtz.eu> wrote:
> Hi all,
> There have been rumors that recent versions of GHC may allow foreign
> imports of objects that link against gmp without interfering with the
> gmp imports in integer-gmp. What is the current state of that issue?
> What is the currently recommended way to deal with that problem?
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
More information about the Haskell-Cafe