Replacement for GMP as Bignum: ARPREC? Haskell?;
OS-X and OpenSSL
Esa Ilari Vuokko
eivuokko at gmail.com
Sun Jul 30 07:18:30 EDT 2006
On 7/30/06, Brian Hulley <brianh at metamilk.com> wrote:
> p.tanski at gmail.com wrote:
> > GHC Task Ticket # 601 suggests replacing GMP with OpenSSL's Bignum
> > library, BN. I have two questions concerning this:
> >From the ticket, this looks very scary:
> but its LGPL license is problematic for users of GHC
> (it prohibits static linking of GHC-compiled programs, for
> Does this mean I can't distribute my Haskell app as a commercial
> application? I certainly don't want to distribute source code and I've got
I am not a lawyer, and you should consult lawyer if you want real
advice about licensing issues.
Strict answer to first question: No. You can distribute statically compiled
> no idea how to compile a Haskell app other than using ghc --make, which
> creates a single exe ie with static linkage.
But in this case, yes, you can't. You need to provide way to
relink gmp in you program. As far as I know, this is simply possible
by taking all the objs --make generates, other objs and libs and giving
them on - users need to have ghc distro+their own gmp set in.
> If I only use Int's (not Integer's) in my code, is there a way to get rid of
> GMP so that I won't have an impossible licencing problem when trying to
I am fairly certain you cannot force or rely GMP getting dropped by
> distribute my application binary? If not, then it would seem absolutely
> vital to get rid of GMP as soon as possible or else try to persuade the
> authors to add the usual static linking exception to their LGPL licence for
GMP being rather GNU ;-) replacing is probably the only option.
There's other reason for dropping GMP as well: The ghc rts steals GMP
memory allocation (sort of integrating it with garbage collector) which
makes it impossible for other parts of program use GMP (in practice).
More information about the Glasgow-haskell-users