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

Duncan Coutts duncan.coutts at
Sun Jul 30 07:58:09 EDT 2006

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)


More information about the Glasgow-haskell-users mailing list