Replacement for GMP as Bignum: ARPREC? Haskell?; OS-X andOpenSSL

Brian Hulley brianh at
Sun Jul 30 08:38:46 EDT 2006

Duncan Coutts wrote:
> On Sun, 2006-07-30 at 11:53 +0100, Brian Hulley wrote:
>> p.tanski at 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
>> example).
>> 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 no idea how to compile a Haskell app other than using ghc
>> --make, which creates a single exe ie with static linkage.
> GHC only statically links Haskell code. It dynamically links to GMP
> and the system C library and other C libs.
> So you're fine.
> On unix you can check for yourself with ldd. It lists all the shared
> libs that your program needs. For example:
> $ ldd /usr/lib/ghc-6.4.2/ghc-6.4.2
> => /lib/ (0x00002b568fca6000)
> => /lib/ (0x00002b568fde3000)
> => /lib/ (0x00002b568ff3f000)
> => /lib/ (0x00002b5690042000)
> => /usr/lib/ (0x00002b569019a000)
> => /lib/ (0x00002b56902cf000)
> => /lib/ (0x00002b56903e4000)
>        /lib64/ (0x00002b568fb8e000)

Is this also true on Windows?
I've got a feeling that it's not because my program (ie main.exe + my own 
C++ DLL) runs on a plain WindowsXP installation that doesn't have anything 
else installed on it (apart from the Microsoft C runtime that comes as 
standard and which presumably doesn't contain GMP).

Thanks, Brian.
Logic empowers us and Love gives us purpose.
Yet still phantoms restless for eras long past,
congealed in the present in unthought forms,
strive mightily unseen to destroy us. 

More information about the Glasgow-haskell-users mailing list