[fpc-pascal] Licensing issue: Subclassing

Jonas Maebe jonas.maebe at elis.ugent.be
Tue Jul 27 15:38:24 CEST 2010


On 27 Jul 2010, at 14:32, Vladimir Zhirov wrote:

> Reading gnu.org does not clarify the situation because:
>
> A) GPL FAQ states that "Subclassing is creating a derivative work."
> (http://www.gnu.org/licenses/gpl-faq.html#OOPLang)

That's normal *in the context of the GPL*: to subclass you have to  
link to the code of the original class, and hence you are bound by the  
terms of the GPL (because you link against GPL code).

> B) LGPL states that "A program that contains no derivative of any
> portion of the Library, but is designed to work with the Library by
> being compiled or linked with it, is called a "work that uses the
> Library". Such a work, in isolation, is not a derivative work of the
> Library, and therefore falls outside the scope of this License."
> (http://www.gnu.org/licenses/old-licenses/lgpl-2.0.html#SEC3, "5.")
>
> So this seems unclear whether application that subclasses from
> RTL/FCL/LCL is a derived work of RTL/FCL/LCL and must itself be
> licensed under Modified LGPL, making source code open.

It's just like linking against a GPL library always causes your  
program to become a derived work, while linking against a LGPL library  
(under the LGPL terms) does /not/ cause your program to become a  
derived work. What is considered to be a derived work differs between  
the LGPL and the GPL.

> BTW, LGPL v3 explicitly allows subclassing:
> "Defining a subclass of a class defined by the Library is deemed a  
> mode
> of using an interface provided by the Library."

That section was added for the purpose of C++ classes (in which case  
actual code from the library headers is embedded in your program), see  
e.g. http://www.chineselinuxuniversity.net/news/44652.shtml :

***
LGPLv3 is perfectly suited for C++ template libraries. This is mostly  
thanks to section 3, which addresses exactly this sort of case. When  
application developers use such header files whose materials are  
incorporated directly into the object code, they only need to provide  
notice that they're using your library, and include a copy of LGPLv3  
with their application. Thus, there's no longer the technology  
mismatch that the libstdc++ licensing FAQ discusses about LGPLv2.1.
***

At most, that exception might be necessary if you use the fgl unit. In  
any other case, there is definitely no problem.

> Would someone of the core team please comment on this?

As Florian said, there is no problem.


Jonas



More information about the fpc-pascal mailing list