Re: License question
- From: Chris Vine <chris cvine freeserve co uk>
- To: gtkmm-list gnome org
- Cc: doug dooglio net, Murray Cumming <murrayc murrayc com>
- Subject: Re: License question
- Date: Tue, 13 Dec 2005 21:01:57 +0000
On Tuesday 13 December 2005 10:25, Murray Cumming wrote:
[snip]
> Still, I'd prefer to hear directly from an FSF person about this because
> it does seem vague. I'd like to know
> a) Is LGPL meaningless for C++ libraries that provide templated types
> (most C++ libraries)?
> b) Is LGPL meaningless for C libraries that have macros in their
> headers?
> c) Is a certain amount of a) or b) OK?
The LGPL is very complicated (and convoluted) and often criticised on that
account, and assumes that any library adopting it will use C linkage
techniques and code organisation, but on your question b), the third and
fourth paragraphs of section 5 of the LGPL are in these terms:
"When a "work that uses the Library" uses material from a header file
that is part of the Library, the object code for the work may be a
derivative work of the Library even though the source code is not.
Whether this is true is especially significant if the work can be
linked without the Library, or if the work is itself a library. The
threshold for this to be true is not precisely defined by law.
If such an object file uses only numerical parameters, data
structure layouts and accessors, and small macros and small inline
functions (ten lines or less in length), then the use of the object
file is unrestricted, regardless of whether it is legally a derivative
work. (Executables containing this object code plus portions of the
Library will still fall under Section 6.)"
Macros and inline headers are allowed which do not exceed 10 lines in length.
To follow this through you also need to look at section 4, which provides that
if you distribute object code of a derivative of the library, it must be
accompanied by "the complete corresponding machine-readable source code",
meaning that it cannot be proprietary. The issue is whether a user's code
linking with, say, libsigc++ is a "work that uses the Library" or (by
instantiating templates from it) a derivative of the library.
Even if the work is a "work that uses the Library" and not a derivative, if
the work is an executable program, it must still comply with section 6 which
requires the executable to be relinkable. This would seem to rule out
templates, as noted on the GNU website. It would also appear to rule out
macros and inline functions, which makes the words in parenthesis in
paragraph 4 of section 5 difficult to fathom - probably they are to be
construed as meaning that section 6 applies to the executable so far as it
does not comprise the small inline functions or macros referred to.
I have included the following text in some code:
"However, it is not intended that the object code of a program whose
source code instantiates a template from this file should by reason
only of that instantiation be subject to the restrictions of use in
the GNU Lesser General Public License. With that in mind, the words
"and instantiations of templates (of any length)" shall be treated as
inserted in the fourth paragraph of section 5 of that licence after
the words "and small inline functions (ten lines or less in length)".
This does not affect any other reason why object code may be subject
to the restrictions in that licence (nor for the avoidance of doubt
does it affect the application of section 2 of that licence to
modifications of the source code in this file)."
This may or may not deal with the point but you are welcome to adopt it if you
wish. Another approach is to adopt the GNU libstdc++ licence, which is very
easy to understand, and therefore popular with users.
Chris
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]