[Haskell-cafe] short licensing question

minh thu noteed at gmail.com
Tue Jan 12 04:24:22 EST 2010

2010/1/12 Duncan Coutts <duncan.coutts at googlemail.com>:
> On Mon, 2010-01-11 at 09:30 -0800, Andrey Sisoyev wrote:
>> Svein Ove Aas wrote:
>> >
>> > In this case, LGPL is a problem. It requires you to offer a way to
>> > re-link such binaries against new versions/implementations of the
>> > library, which in practice requires it to be either open source or
>> > dynamically linked.
>> >
>> Don't understand that. Can't we just put a constraint: "our binary works
>> only with versions x.x.x-y.y.y of this LGPL licensed library"? The Cabal
>> provides a way to put such constraint in build-depends...
> It's not referring to totally new versions of a library with a different
> API/ABI. The LGPL requires that the user of the program is not prevented
> from making some small tweak to the LGPL library and relinking it
> against your program. Of course if the user makes it ABI incompatible
> then that's their fault.
> So the LGPL requires it be relinkable, which you can do by providing a
> copy of your application as a .o file which can then be linked against
> the LGPL lib to make a final program. Or if you're using shared/dynamic
> libs then its easier.
> If you want to do this in practise with Haskell, GHC and an LGPL Haskell
> package then here's what I recommend:
> ld -r -x -o main.o ${objects}
> Then make your actual executable as:
> ghc main.o -o main -package ${pkg1} -package ${pkg2} ... etc
> Then you distribute the executable "main" and also the relinkable form
> "main.o" to your users, along with a copy of the LGPL license.
> Any user can then perform the last step themselves and if they're really
> lucky they might get that to work with a slightly modified version of
> the LGPL'ed package. In practise of course this isn't that easy for the
> user because GHC does not make it easy to make ABI compatible packages.
> However it is my understanding that this procedure will comply with the

In short, if I understand you correctly, you would just have to
provide your code in unlinked form regardless of the existence of some
tool to create another ABI-compatible version of the LGPL library.

This alongside of the last discussion (which also roughly said you can
license the code as you want when it is the client responsability to
link the final binary) makes the (L)GPL quite useless (as a "freedom"
keeper) whenever the code is made for specific clients...


More information about the Haskell-Cafe mailing list