C++Talk.NET Forum Index C++Talk.NET
C++ language newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

(L)GPL and C++ templates issue
Goto page 1, 2, 3  Next
 
Post new topic   Reply to topic    C++Talk.NET Forum Index -> C++ Language (Moderated)
View previous topic :: View next topic  
Author Message
Maciej Sobczak
Guest





PostPosted: Mon Oct 18, 2004 8:32 pm    Post subject: (L)GPL and C++ templates issue Reply with quote



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.

--
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! ]
Back to top
Ron Natalie
Guest





PostPosted: Tue Oct 19, 2004 4:25 pm    Post subject: Re: (L)GPL and C++ templates issue Reply with quote



Maciej Sobczak wrote:

Quote:
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.,

No, it doesn't assure that. It places restrictions on what people can
do with the code. It's RMS's idea of freedom. In actuallity the BSD/
BOOST/libtiff etc... libraries are much more free (they pretty much
just say do what you want with this but leave the copyright info intact
and don't sue us).

Quote:
Let's now suppose that someone releases a product (not necessarily GPL)
that uses this LGPLed library.

If you modify the library code, you must give the modified source code
out as specified in the LGPL license.

Quote:
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.

You keepputting the (L) in parens like you don't know if you are talking
about the GPL or the Lesser GPL. What you are saying is true of the GPL.
It's not true of the LGPL. The LGPL lets you use the library but only
exposes the "must-give-source" aspects to changes made to library itself.


Quote:
This in turn means that LGPL does not meet its intended goals.

You don't seem to understand the FSF goals. Their goal isn't to
provide a flexible open source licensing scheme, it's a stated
goal to kill off all proprietary software. Go to FSF.org, open
up the licenses page, and read some of RMS's rants on why you shouldn't
use the LPGL.

Quote:
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 even sure it had C in mind. The whole GPL boondoggle came from
RMS getting (in his percetion) screwed over work he did on LISP at MIT.

[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]

Back to top
kanze@gabi-soft.fr
Guest





PostPosted: Wed Oct 20, 2004 4:16 pm    Post subject: Re: (L)GPL and C++ templates issue Reply with quote



Maciej Sobczak <no_spam (AT) no_spam (DOT) com> wrote


Quote:
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.

Allowing any one to make any possible modification, without requiring
them to change the name, or at least make it clear that the software has
been modified, is good?

My experience with GPL software is that it is only good when you can
ensure that the freedom hasn't actually been used: I download g++ from
the g++ site, and they do have source code control, and don't let just
anyone hack any modification in without verifying that it works. The
"control" aspect of quality control is important if you want the
quality.

(This isn't to say that GPL is always bad. Just that, like most things,
there are cases where it is good, cases where it is bad, and a lot of
cases where it really doen't matter. G++ is g++, regardless of the
license -- GPL doesn't make it any better, but as long as the g++ team
do control the sources, and wild or unsupported copies with unknown
modifications don't start floating around, GPL doesn't make it worse.)

Quote:
Let's now suppose that someone releases a product (not necessarily
GPL) that uses this LGPLed library.

In that case, if I understand correctly, the product is controlled by
its licence. The fact that it uses an LGPLed library is irrelevant.

Quote:
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.

From what I understand of LGPL, you don't have any.

Quote:
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.

Exactly. That is the whole point of LGPL (as opposed to GPL).

Note that templates are irrelevant in the issue. If I deliver you a
statically linked program using a LGPL licence, you can't do anything
with it either.

If I've sold you a product, and I stand behind my product, this is
almost a necessary condition.

Quote:
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.

I think that there has been some discussion concerning what LGPL means
with regards to templates. From what I understand of LGPL, however, the
goal is precisely not to contaminate the code which uses it. The intent
of LGPL is precisely that I can use it without my code falling under
GPL. The fact that I link with an LGPL library does NOT give you the
right to modify my code.

Quote:
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.

There is no problem with modifying the libraries. But code which is
linked with the libraries is NOT GPL, nor even LGPL. That's the whole
purpose of LGPL.

Quote:
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 that there are questions concerning templates and LGPL. But the
questions go in the opposite direction -- with templates, I'm using
source code, not a "library" in the classical sense. And traditionally,
LGPL only gives the exception from GPL when I link object code. On the
other hand, all LGPL libraries I've know have had header files. The
header files may not result in any code being generated by the compiler,
but they are source code which I incorporate into my program. And
traditionally, it has been understood that this is OK. I'm not a
lawyer, but from a pratical point of view, I think that the intent
behind LGPL is clear, templates or not.

As I understand it, originally, any use of GPL'ed code in my program
meant that my program must also be GPL. Since then, a number of
exceptions have been defined:

- I can use GPL'ed programs in the generation of my code without
"contamination". (The fact that I compile my program with g++
doesn't mean that my program must be GPL.)

- I can deliver complete GPL'ed programs as part of a larger product,
provided there is sufficient separation of the program (and
presumably the sources). (Sun Workshop comes with emacs. As long
as the emacs is in a separate directory, and none of the emacs
sources were used in the elaboration of the rest of the product, Sun
Workshop does not become GPL.)

- LGPL was created so that linking with the libraries delivered with a
compiler doesn't contaminate my product. Libraries normally also
contain header files, and traditionally, including those has not
meant contamination either, although I'm not sure what the legalese
says about this.

- Finally, some software is available under several licences -- if I
use the GPL'ed version of Ghostscript in my code, my code must also
be GPL, but I can also purchase a version from Adallin with a non
GPL licence, and use it without my code necessarily becoming GPL.

--
James Kanze GABI Software http://www.gabi-soft.fr
Conseils en informatique orientée objet/
Beratung in objektorientierter Datenverarbeitung
9 place Sémard, 78210 St.-Cyr-l'École, France, +33 (0)1 30 23 00 34

[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]

Back to top
johnchx
Guest





PostPosted: Wed Oct 20, 2004 4:18 pm    Post subject: Re: (L)GPL and C++ templates issue Reply with quote

Maciej Sobczak <no_spam (AT) no_spam (DOT) com> wrote

Quote:
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),

Sure you can, *if* the proprietary application actually conforms to
the LGPL.

Quote:
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.

Which means that the application violates the LGPL.

To conform to the LGPL, an application must ensure that all object
code covered by the LGPL resides in a distinct binary module (or
modules) so that it can be separately re-compiled and re-linked into
the proprietary application.

In the C++ context, this means that all instantiations of LGPL'ed
function templates (including member functions of class templates)
must reside in a distinct GPL/LGPL-only module. No LGPL'ed function
template instantiations may be present in a proprietary binary module.

Class template instantiations (*not* including member functions) are
essentially analagous to struct definitions, and follow the same
rules. (IIRC, LGPL'ed struct definitions are traditionally allowed to
be #included in non-GPL/LGPL modules.) This does constrain somewhat
the changes that can be made to the LGPL'ed class template definition,
but successful re-linking always depends on not breaking
"ABI-compatibility", so there is no real loss of freedom here.

Further wrinkles, like template templates and template members of
class templates, are left as an exercise for the reader. :-)

[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]

Back to top
Hyman Rosen
Guest





PostPosted: Wed Oct 20, 2004 4:30 pm    Post subject: Re: (L)GPL and C++ templates issue Reply with quote

Ron Natalie wrote:
Quote:
Maciej Sobczak wrote:
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.

No, it doesn't assure that.

It doesn't? In what way can it happen that a user of (L)GPL code
does not have full rights to modify that code?

Quote:
It places restrictions on what people can do with the code.
It's RMS's idea of freedom. In actuallity the BSD/BOOST/libtiff etc...
libraries are much more free

As MS wrote above, the purpose of the (L)GPL is to give *all users*
the ability to examine, modify, and redistribute the code. The "more
free" licenses permit some users to deny others these abilities.
That is, they can take the code, examine it, modify it, redistribute
it, and prohibit their recipients from examining this code, modifying
it, or redistributing it. That certainly may be what some people like,
but those downstream second-class users now have much less freedom.

Quote:
The LGPL lets you use the library but only exposes the "must-give-source"
aspects to changes made to library itself.

But "must-be-able-to-relink" is also part of the LGPL requirements.
Since templated libraries can't really be used that way, that vitiates
one of the goals of the LGPL.

[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]

Back to top
Hyman Rosen
Guest





PostPosted: Thu Oct 21, 2004 4:04 pm    Post subject: Re: (L)GPL and C++ templates issue Reply with quote

johnchx wrote:
Quote:
No LGPL'ed function template instantiations may be present in a
proprietary binary module.

Yep. The GNAT (GNU Ada) runtime library has the same issues, since
Ada has generic instantiation. They solve it by extending further
special permissions for files which contain such instantiations as
the result of compilation, so that they have a special exemption.

[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]

Back to top
Hyman Rosen
Guest





PostPosted: Thu Oct 21, 2004 4:35 pm    Post subject: Re: (L)GPL and C++ templates issue Reply with quote

[email]kanze (AT) gabi-soft (DOT) fr[/email] wrote:
Quote:
Allowing any one to make any possible modification, without requiring
them to change the name, or at least make it clear that the software
has
been modified, is good?

That is not allowed. Section 2b states
You must cause the files modified to carry prominent notices
stating
that you changed the files and the date of any change.

Quote:
My experience with GPL software is that it is only good when you can
ensure that the freedom hasn't actually been used

That's pretty silly. The whole EGCS fork would have been impossible
without the rights granted by the GPL. And any number of companies
have modified gcc to compile to custom processors.

Quote:
Note that templates are irrelevant in the issue. If I deliver you a
statically linked program using a LGPL licence, you can't do anything
with it either.

They are very relevant. See sections 5 and 6 of the LGPL. Object files
which contain instantiations of LGPLed functions may (depending on the
law, not just on technical issues) be considered derived works, and may
only be distributed under the LGPL, which means with full source code.
Furthermore, programs which link against LGPLed libraries must use
dynamic linking or must be shipped in a form which allows them to be
relinked.

Quote:
The header files may not result in any code being generated by the
compiler,
but they are source code which I incorporate into my program. And
traditionally, it has been understood that this is OK.

This permission is given explicitly by the LGPL.

[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]

Back to top
johnchx
Guest





PostPosted: Thu Oct 21, 2004 5:14 pm    Post subject: Re: (L)GPL and C++ templates issue Reply with quote

Ron Natalie <ron (AT) sensor (DOT) com> wrote
Quote:
Maciej Sobczak wrote:
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.,

No, it doesn't assure that. It places restrictions on what people can
do with the code. It's RMS's idea of freedom.

Plea to moderators: isn't a flamewar on the merits and evils of the
GPL, LGPL and the FSF wildly off-topic here? Could we nip this in the
bud?

The OP has a legitimate C++ question about the interaction between the
C++ template inclusion model and the LGPL. I hope we can discuss that
without getting into a 200-post thread about what "freedom" means.

--jc

[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]

Back to top
Wil Evers
Guest





PostPosted: Thu Oct 21, 2004 5:25 pm    Post subject: Re: (L)GPL and C++ templates issue Reply with quote

In article <4174046c$1_2 (AT) news (DOT) bluewin.ch>, Maciej Sobczak wrote:

[snip]

Quote:
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.

[snip]

Quote:
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 agree; the LGPL is unsuitable for template libraries. The gcc folks are
aware of this; libstdc++, for example, is GPL, not LGPL, but with the
following addition:

As a special exception, you may use this file as part of a free
software library without restriction. Specifically, if other files
instantiate templates or use macros or inline functions from this
file, or you compile this file and link it with other files to
produce an executable, this file does not by itself cause the
resulting executable to be covered by the GNU General Public
License. This exception does not however invalidate any other
reasons why the executable file might be covered by the GNU General
Public License.

- Wil


[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]

Back to top
kanze@gabi-soft.fr
Guest





PostPosted: Thu Oct 21, 2004 5:40 pm    Post subject: Re: (L)GPL and C++ templates issue Reply with quote

Hyman Rosen <hyrosen (AT) mail (DOT) com> wrote

Quote:
Ron Natalie wrote:
Maciej Sobczak wrote:
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.

No, it doesn't assure that.

It doesn't? In what way can it happen that a user of (L)GPL code
does not have full rights to modify that code?

It places restrictions on what people can do with the code. It's
RMS's idea of freedom. In actuallity the BSD/BOOST/libtiff etc...
libraries are much more free

As MS wrote above, the purpose of the (L)GPL is to give *all users*
the ability to examine, modify, and redistribute the code.

The original intent of the (L)GPL, as I understand it, was specifically
to allow people to use free software in the development of commercial
programs, e.g. to be able to compile and link using gcc (or g++) even if
the program was to be sold, or the sources not made available, later.

In the end, it was more or less to bring the free development tools in
line with the commercial ones -- there has never been any question that
linking with the libc provided by Sun with Solaris places any
restrictions on my software.

Unless this is possible with g++, of course, g++ becomes pretty much
unusable for many people. I believe, in fact, that LGPL originally came
to be because the GPL on the libraries furnished with gcc was making gcc
pretty much unusable.

(There is the additional problem that corporate lawyers do not always
understand the intent or purpose of these licenses, and sometimes seem
incapable of understanding what they mean. I know of one case where the
corporate legal departement refused to allow us to use g++, even though
we were delivering full sources to the customer, and the customer had no
problem with GPL applying to those sources, since he wasn't distributing
the software anywhere else.)

Quote:
The "more free" licenses permit some users to deny others these
abilities. That is, they can take the code, examine it, modify it,
redistribute it, and prohibit their recipients from examining this
code, modifying it, or redistributing it. That certainly may be what
some people like, but those downstream second-class users now have
much less freedom.

There are many complicated issues that have to be balanced. If you take
pride in the quality of your work, you certainly don't want people
downstream hacking it in any sloppy fashion, and then redistributing it
as if it were the original. I doubt that the people at g++ were happy
when an internal development version was pawned off as a 2.96 release.
And Knuth is very clear about it in the license to TeX -- you can do
what you want with the sources, but you cannot call the results TeX.
You may consider that taking away freedom, but I consider it pride in
your work. (But of course, both positions are ridiculous
oversimplifications.)

Note too that the "freedom" is largely imaginary. If you understand the
algorithms and the programming techniques involved, it is usually
quicker and easier to develop something new from scratch that it is to
modify undocumented existing source code. And since the license doesn't
require documentation (and I would be at a loss as to how to formulate
text so that the required documentation would be adequate), it's really
as if you didn't have the source code if you want to make a modification
of any quality. (This obviously depends on the size of the project, and
the type of modification.)

Quote:
The LGPL lets you use the library but only exposes the
"must-give-source" aspects to changes made to library itself.

But "must-be-able-to-relink" is also part of the LGPL requirements.
Since templated libraries can't really be used that way, that vitiates
one of the goals of the LGPL.

The "must-be-able-to-relink" seems to contradict the expressed intent
of: "We use this license for certain libraries in order to permit
linking those libraries into non-free programs."

In fact, of course, I suspect that this clause is widely ignored. There
is, after all, commercial software available for Linux, and what
alternative do you have on Linux, other than to link with a library that
is distributed under LGPL?

--
James Kanze GABI Software http://www.gabi-soft.fr
Conseils en informatique orientée objet/
Beratung in objektorientierter Datenverarbeitung
9 place Sémard, 78210 St.-Cyr-l'École, France, +33 (0)1 30 23 00 34

[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]

Back to top
Hyman Rosen
Guest





PostPosted: Fri Oct 22, 2004 5:14 pm    Post subject: Re: (L)GPL and C++ templates issue Reply with quote

[email]kanze (AT) gabi-soft (DOT) fr[/email] wrote:
Quote:
The "must-be-able-to-relink" seems to contradict the expressed intent
of: "We use this license for certain libraries in order to permit
linking those libraries into non-free programs."

The right of all users to be able to examine, modify, and redistribute
is at the core of what the FSF believes, and the LGPL expresses that
as much as the GPL does. The LGPL allows more latitude to proprietary
vendors, in that they can link these libraries into their code and not
cause that code to fall under the same license, but the core freedoms
with regard to the library itself are preserved.

LGPL exists for the cases where it is clear that a GPLed version would
not be used at all. In terms of freedom, it is truly "lesser".

Quote:
In fact, of course, I suspect that this clause is widely ignored. There
is, after all, commercial software available for Linux, and what
alternative do you have on Linux, other than to link with a library that
is distributed under LGPL?

If these are shared libraries, then there is no problem, since modified
ones can simply be put in place. But if you do come across cases where
the LGPL on a library owned by the FSF is being ignored, why don't you
contact them? I'm sure they'd be interested.

[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]

Back to top
Ron Natalie
Guest





PostPosted: Sat Oct 23, 2004 2:16 pm    Post subject: Re: (L)GPL and C++ templates issue Reply with quote

{Please ensure thart follow-ups contain C++ content and do not
degenerate into discussion of the terms of (L)GPL).

Hyman Rosen wrote:

Quote:
The right of all users to be able to examine, modify, and redistribute
is at the core of what the FSF believes,

Redistribution is very seriously restricted.

[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]

Back to top
Ben Hutchings
Guest





PostPosted: Sat Oct 23, 2004 2:19 pm    Post subject: Re: (L)GPL and C++ templates issue Reply with quote

[email]kanze (AT) gabi-soft (DOT) fr[/email] wrote:
Quote:
Hyman Rosen <hyrosen (AT) mail (DOT) com> wrote in message
news:<1098207931.824248 (AT) master (DOT) nyc.kbcfp.com>...
Ron Natalie wrote:
Maciej Sobczak wrote:
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.

No, it doesn't assure that.

It doesn't? In what way can it happen that a user of (L)GPL code
does not have full rights to modify that code?

It places restrictions on what people can do with the code. It's
RMS's idea of freedom. In actuallity the BSD/BOOST/libtiff etc...
libraries are much more free

As MS wrote above, the purpose of the (L)GPL is to give *all users*
the ability to examine, modify, and redistribute the code.

The original intent of the (L)GPL, as I understand it, was specifically
to allow people to use free software in the development of commercial
programs, e.g. to be able to compile and link using gcc (or g++) even if
the program was to be sold, or the sources not made available, later.

In the end, it was more or less to bring the free development tools in
line with the commercial ones -- there has never been any question that
linking with the libc provided by Sun with Solaris places any
restrictions on my software.

Unless this is possible with g++, of course, g++ becomes pretty much
unusable for many people. I believe, in fact, that LGPL originally came
to be because the GPL on the libraries furnished with gcc was making gcc
pretty much unusable.

The C/C++ run-time library (libgcc_s) and the whole of the standard
C++ library (libstdc++) included in GCC are under a special licence,
the "Runtime GPL". This is the GPL plus an exception that allows
their code to be used "as part of a library" without the usual
"copyleft" or "viral" conditions of the GPL or the LGPL.

<snip>
Quote:
I doubt that the people at g++ were happy
when an internal development version was pawned off as a 2.96 release.

The absurdity is that GCC "2.96" was distributed by Red Hat, which
employs many of the core GCC developers (following its purchase of
Cygnus). The left hand didn't know what the right hand was doing, it
seems.

<snip>
Quote:
The LGPL lets you use the library but only exposes the
"must-give-source" aspects to changes made to library itself.

But "must-be-able-to-relink" is also part of the LGPL requirements.
Since templated libraries can't really be used that way, that vitiates
one of the goals of the LGPL.

The "must-be-able-to-relink" seems to contradict the expressed intent
of: "We use this license for certain libraries in order to permit
linking those libraries into non-free programs."

In fact, of course, I suspect that this clause is widely ignored. There
is, after all, commercial software available for Linux, and what
alternative do you have on Linux, other than to link with a library that
is distributed under LGPL?

The key is that the linking is done dynamically, not statically. I
think most proprietary software for Linux does not breach the
copyright of LGPL'd libraries.

--
Ben Hutchings
If you seem to know what you are doing, you'll be given more to do.

[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]

Back to top
Gabriel Dos Reis
Guest





PostPosted: Sun Oct 24, 2004 4:11 am    Post subject: Re: (L)GPL and C++ templates issue Reply with quote

[email]kanze (AT) gabi-soft (DOT) fr[/email] writes:

Quote:
Unless this is possible with g++, of course, g++ becomes pretty much
unusable for many people. I believe, in fact, that LGPL originally came
to be because the GPL on the libraries furnished with gcc was making gcc
pretty much unusable.

I noted you switched from "g++" to "gcc" in your last sentence;
I wanted to add that the libstdc++ coming with g++ does not use LGPL.
It uses "GPL with runtime exception".

http://gcc.gnu.org/onlinedocs/libstdc++/17_intro/license.html

--
Gabriel Dos Reis
[email]gdr (AT) cs (DOT) tamu.edu[/email]
Texas A&M University -- Computer Science Department
301, Bright Building -- College Station, TX 77843-3112

[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]

Back to top
Markus Elfring
Guest





PostPosted: Sun Oct 24, 2004 4:12 am    Post subject: Re: (L)GPL and C++ templates issue Reply with quote

Quote:
To conform to the LGPL, an application must ensure that all object
code covered by the LGPL resides in a distinct binary module (or
modules) so that it can be separately re-compiled and re-linked into
the proprietary application.

In the C++ context, this means that all instantiations of LGPL'ed
function templates (including member functions of class templates)
must reside in a distinct GPL/LGPL-only module. No LGPL'ed function
template instantiations may be present in a proprietary binary module.

Is it applicable to divide a license between the raw data structures
and the executable code (functions, methods) that works with them?

How do you think about inlined code in this context?
May macros/inline functions be used by a LGPL'ed library in their
public interface?

Regards,
Markus

[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]

Back to top
Display posts from previous:   
Post new topic   Reply to topic    C++Talk.NET Forum Index -> C++ Language (Moderated) All times are GMT
Goto page 1, 2, 3  Next
Page 1 of 3

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.