GNU Lesser General Public License facts for kids
File:LGPLv3 Logo.svg
Logo
|
|
Published | 1991 |
---|---|
DFSG compatible | Yes |
OSI approved | Yes |
GPL compatible | Yes |
Copyleft | Yes (library or dynamic linking-based) |
Linking from code with a different license | Yes |
The GNU Lesser General Public License (LGPL) is a special kind of free-software license. It was created by the Free Software Foundation (FSF). This license helps developers and companies use parts of software (called "components") that are under the LGPL. They can even use these parts in their own secret, "proprietary" software.
The cool thing is, they don't have to share the secret code of their own software. But, if someone changes a part of the software that is LGPL, they must share those changes under the same LGPL license. LGPL code is often used in software libraries. These are like toolkits that other programs can use.
The LGPL was made to be a middle ground. It's not as strict as the GNU General Public License (GPL). The GPL usually means you have to share all your code if you use GPL parts. The LGPL is also not as relaxed as licenses like the BSD license or MIT License. The word "Lesser" in its name means it gives a bit less freedom than the GPL. It only guarantees freedom for the LGPL parts, not for any secret parts of a program.
Contents
History of the LGPL
The LGPL first came out in 1991. Back then, it was called the GNU Library General Public License. It was given version number 2, just like the GPL version 2.
In 1999, the license was updated slightly to version 2.1. At this time, its name was changed to the GNU Lesser General Public License. This new name showed that the FSF didn't think all software libraries should use this license.
The newest version, LGPL version 3, was released in 2007. It works well with GPL version 3.
How LGPL is Different from GPL
The main difference between the LGPL and the GPL is flexibility. The LGPL lets you use a piece of software (like a library) in a program that is not under the LGPL. This means you can use LGPL code in your own secret, "proprietary" software.
With LGPL version 2.1, if your program uses an LGPL library but isn't a "derivative work" (meaning it doesn't directly copy or change the library's code), you can share your program however you want. If it is a derivative work, you must allow others to change it for their own use and to figure out how it works for fixing problems.
Usually, if a program connects to an LGPL library using a "shared library" (like a .dll or .so file), it's not seen as a "derivative work." This is like a program using a tool without becoming part of the tool itself. The LGPL allows this. It means your program can work with newer versions of the LGPL library.
Using LGPL with GPL Code
One cool feature of the LGPL is that you can change software under the LGPL to be under the GPL instead. This is explained in section 3 of LGPL version 2.1 and section 2, option b of LGPL version 3.
This feature makes it easy to use LGPL code directly in programs or libraries that are under the GPL. So, if you have an LGPL library, you can use it in a GPL program.
However, LGPL version 3 doesn't automatically work with GPL version 2. But, if a program is under GPLv2 "or any later version," then it can be combined with code from an LGPL version 3 library. The whole combined program would then follow the rules of GPLv3.
FSF Advice on Library Licenses
The old name, "GNU Library General Public License," made some people think the FSF wanted all software libraries to use the LGPL. They thought programs should use the GPL.
But in 1999, Richard Stallman wrote an essay called "Why you shouldn't use the Lesser GPL for your next library." He explained that while the LGPL was still good, it wasn't always the best choice for every library. Sometimes, using the stricter GPL can be better for free-software developers.
The FSF sometimes even suggests using less strict licenses. For example, Stallman supported using BSD-style licenses for the Vorbis project's libraries in 2001.
LGPL and Programming Languages
The LGPL uses words that are mostly for programs written in the C programming language or similar languages. For other languages, like Lisp, some developers have added their own introductions to clarify the terms. This version is sometimes called the LLGPL.
For the Ada language, there's a special feature called "generics." This led to the GNAT Modified General Public License (GMGPL). It lets code use GMGPL parts without the code itself becoming GPL.
Similar issues can happen with C++ templates. LGPL version 3 tries to address these situations in its section 3.
Class Inheritance and LGPL
Some people have wondered if LGPL-licensed code can be used in "object-oriented programming" when one part of the code "inherits" from another. The official GNU website explains this:
The LGPL doesn't need special rules for inheritance. Inheritance works like linking different parts of a program together. The LGPL allows this type of connection, just like it allows regular function calls.
See also
- GNU Affero General Public License
- GNU Free Documentation License
- GNAT Modified General Public License
- GPL linking exception
- Software using the LGPL (category)