Maciej Sobczak
2004-10-18 20:32:05 UTC
Hi,
I think this is a good forum to ask this question. The problem affects
C++ programmers that release libraries with LGPL licence and those who
use such libraries in non-GPL products.
Let's imagine a library containing some template definitions. The
library has a LGPL license. I'm not concerned about what is the
"derivative work" and was is not. I have problem with something different.
The most fundamental thing in (L)GPL is to ensure that every user of the
software has full rights to modify (and possibly improve) the code. This
is what FSF calls "freedom" and that's basically good.
Let's now suppose that someone releases a product (not necessarily GPL)
that uses this LGPLed library. Now, I'm the user of this software and,
by inclusion, the user of the library. I want to benefit from my basic
rights to modify (and possibly improve) this library. Let's say that I
got the library source code and modified it. What next? I cannot compile
it in separation and link with the rest of the product (or just link it
dynamically), because I have modified the template code and to see my
modifications in the library I have to instantiate the template, which
means recompile the main product, which means... yes, I need the source
code of the product, which is not necessarily open source.
We can generalize this problem to any technology with the following
property:
If module A uses module B, then module A's source code must be
re-processed in order for the module B's modifications to take effect.
C++ with templates has this property (module B is a template library)
and I can imagine that there can be (if not today then in the future)
tons of other software technologies where this property is also true.
My conclusion is that (L)GPL license on the C++ library that has at
least one template definition *forces* every software using this library
to be distributed with source code, because otherwise the user cannot
benefit from his basic rights to modify this LGPLed library, which is a
clear violation of the license.
This in turn means that LGPL does not meet its intended goals.
What about libraries without template definitions?
a) They will have them in next versions, which must be LGPL.
b) I want to modify those libraries (and I have the right to do so) by
adding the template definitions. The modified library must be LGPL.
My following conclusion is that (L)GPL license was invented without any
thought about software technologies other than C with its traditional
compile&link production cycles, where modules can be compiled in separation.
I'm not really versed in (english) legalese, so I ask for your comments
on this. I may be totally wrong and possibly messed up everything, but
as a C++ programmer who from time to time releases C++ libraries
containing template definitions I'm a little bit concerned. At the
moment I steer away from LGPL license, and the above concern is one of
the reasons.
I think this is a good forum to ask this question. The problem affects
C++ programmers that release libraries with LGPL licence and those who
use such libraries in non-GPL products.
Let's imagine a library containing some template definitions. The
library has a LGPL license. I'm not concerned about what is the
"derivative work" and was is not. I have problem with something different.
The most fundamental thing in (L)GPL is to ensure that every user of the
software has full rights to modify (and possibly improve) the code. This
is what FSF calls "freedom" and that's basically good.
Let's now suppose that someone releases a product (not necessarily GPL)
that uses this LGPLed library. Now, I'm the user of this software and,
by inclusion, the user of the library. I want to benefit from my basic
rights to modify (and possibly improve) this library. Let's say that I
got the library source code and modified it. What next? I cannot compile
it in separation and link with the rest of the product (or just link it
dynamically), because I have modified the template code and to see my
modifications in the library I have to instantiate the template, which
means recompile the main product, which means... yes, I need the source
code of the product, which is not necessarily open source.
We can generalize this problem to any technology with the following
property:
If module A uses module B, then module A's source code must be
re-processed in order for the module B's modifications to take effect.
C++ with templates has this property (module B is a template library)
and I can imagine that there can be (if not today then in the future)
tons of other software technologies where this property is also true.
My conclusion is that (L)GPL license on the C++ library that has at
least one template definition *forces* every software using this library
to be distributed with source code, because otherwise the user cannot
benefit from his basic rights to modify this LGPLed library, which is a
clear violation of the license.
This in turn means that LGPL does not meet its intended goals.
What about libraries without template definitions?
a) They will have them in next versions, which must be LGPL.
b) I want to modify those libraries (and I have the right to do so) by
adding the template definitions. The modified library must be LGPL.
My following conclusion is that (L)GPL license was invented without any
thought about software technologies other than C with its traditional
compile&link production cycles, where modules can be compiled in separation.
I'm not really versed in (english) legalese, so I ask for your comments
on this. I may be totally wrong and possibly messed up everything, but
as a C++ programmer who from time to time releases C++ libraries
containing template definitions I'm a little bit concerned. At the
moment I steer away from LGPL license, and the above concern is one of
the reasons.
--
Maciej Sobczak : http://www.msobczak.com/
Programming : http://www.msobczak.com/prog/
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]
Maciej Sobczak : http://www.msobczak.com/
Programming : http://www.msobczak.com/prog/
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]