[Haskell-cafe] Announce: Haskell Platform 8.6.5 (Gershom B)

Niklas Hambüchen mail at nh2.me
Tue May 21 12:35:46 UTC 2019


Hello Pierre,

On 21/05/2019 11:54 AM, Pierre_van_der_Laar (Functional Account) via Haskell-Cafe wrote:
> Whenever a program is compiled with GHC and is distributed on another platform than OS X,
> anybody can claim that the source code of that program must be provided due to the LGPL license,
> since integer-gmp, the ghc code, and that program's code are statically linked!

Some facts on Linux:

libgmp code is *not* typically statically linked into executables created with GHC.
Consider this hello-world program built with `ghc --make`:

    % ldd Hello
    linux-vdso.so.1 =>  (0x00007ffe1d1ad000)
    ...
    libgmp.so.10 => /usr/lib/x86_64-linux-gnu/libgmp.so.10 (0x00007f710fe3e000)

As you can see, this program is dynamically linked against my system libgmp.so.
As an end user of this program I can compile my own libgmp and make the program use that instead.

Only if you pass flags to GHC to indicate that you want libgmp linked statically will it do so.
In that static-linking case, you need to ensure that your program, when distributed, satisfies the requirements that gmp's LGPL has on being linked statically.

For the cases where you do not want to use libgmp at all, you can use
* integer-simple
* integer-openssl (upcoming, see https://github.com/ch1bo/integer-openssl/issues/3)

Hope this helps,
Niklas


More information about the Haskell-Cafe mailing list