Duncan Coutts wrote:
On Sun, 2006-07-30 at 11:53 +0100, Brian Hulley wrote:
[EMAIL PROTECTED] 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
       libreadline.so.5 => /lib/libreadline.so.5 (0x00002b568fca6000)
       libncurses.so.5 => /lib/libncurses.so.5 (0x00002b568fde3000)
       libdl.so.2 => /lib/libdl.so.2 (0x00002b568ff3f000)
       libm.so.6 => /lib/libm.so.6 (0x00002b5690042000)
       libgmp.so.3 => /usr/lib/libgmp.so.3 (0x00002b569019a000)
       libpthread.so.0 => /lib/libpthread.so.0 (0x00002b56902cf000)
       libc.so.6 => /lib/libc.so.6 (0x00002b56903e4000)
       /lib64/ld-linux-x86-64.so.2 (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.

http://www.metamilk.com
_______________________________________________
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users

Reply via email to