LGPL and static linking of libgmp
Simon Marlow
simonmar@microsoft.com
Thu, 23 May 2002 12:15:04 +0100
> I just re-read the GNU Lesser General Public License today - and I=20
> discovered that it places some utterly strange (IMHO) restrictions on=20
> executables statically linked with LGPLed libraries.
> Unfortunately, GHC for Windows produces such executables by linking=20
> in libgmp statically. Dynamically linking with libgmp would cause no=20
> restrictions, but if it is statically linked, the LGPL says that=20
> everyone distributing a program compiled with GHC has to 'Accompany=20
> the work with the complete corresponding machine-readable source code=20
> for the Library including whatever changes were used in the work=20
> (which must be distributed under Sections 1 and 2 above); and, if the=20
> work is an executable linked with the Library, with the complete=20
> machine-readable "work that uses the Library", as object code and/or=20
> source code, so that the user can modify the Library and then relink=20
> to produce a modified executable containing the modified Library. (It=20
> is understood that the user who changes the contents of definitions=20
> files in the Library will not necessarily be able to recompile the=20
> application to use the modified definitions.)'
Yes, this is a pain. We really ought to distribute GMP as a DLL on
Windows, and stop making static versions on Unix (the Solaris
distribution of GHC generally includes a static libgmp, but most of the
other dists don't).
Better still, we could find an alternative to GMP - I don't know of one
that is as fast & provides all the functionality that we use from GMP,
though.
Cheers,
Simon