I have seen the GPL software license described as a cancer before, and this analogy does indeed hold, even though it misses the point. If you want to borrow any code released as “GPL” for use in your own source code, any of your own code that the GPL is mixed with will also need to become GPL if ever you plan on distributing software. However, this rule of the GPL is actually a very good thing, especially for hard working open source developers, because it ensures that their work can never be exploited by companies wishing to make a buck, unless those companies give their contributions to the code back under the same license, effectively becoming part of the same open source development effort.
The LGPL is mostly the same as the GPL except that it releases some of these restrictions. I am not a law expert, but I have come to the following understanding. In particular, it allows for code to be combined in the same project with code from any other license including proprietary licenses, under certain conditions. If the whole thing, including the LGPL code as well as the other code, is distributed together, then it becomes known as a ‘combined work’ under the terminology of the LGPL. The distribution must abide by the following (a complete list exists in the text of the license under ‘Combined Works’):
- There must be some sort of clear separation between the LGPL code and the other code. In particular, it must be possible for the recipient to modify the LGPL code or even completely replace it with other code, such as a modified version or later version of the libary. Therefore, if it is a compiled program, then the LGPL code must either be dynamically linked (like, a separate DLL or shared file) such that it could easily be substituted for a similar library and still be interoperable; or, if it is statically linked, the minimum required source files and/or object files must be provided, to allow recompiling with an alternative library. The non-LGPL portion may not contain any part of the LGPL code except for very simple header files.
- It must be clearly pointed out which part of the code is LGPL covered, including its original copyright notice and the text of the LGPL (including the GPL on which it is based).
- If the combined software displays copyright notices during the course of running, then the copyright notice for the LGPL covered portion must also appear here, along with a link to the LGPL and GPL.
- In some cases, you would need to provide installation information detailing how to use a modified version of the LGPLd code in the combined application.
The above is just a list of stuff that you have to do if you are going to redistribute some LGPL code as part of your non-LGPL application. However, the text of the LGPL doesn’t really explain the benefits, or what opportunities it opens up to you. If you are distributing a combined work which consists of both someone else’s LGPL code, and other code that is under a different license, you benefit from:
- You don’t need to release source code for the rest of your application (ie, the non-LGPL part). The only exception to this being as described above – if it’s all statically linked then you’d need to provide just enough code (and/or object files) to be able re-link it with an alternative or modified version of the LGPL code. If you are linking dynamically and interacting over a normal API, you don’t need to worry about that.
- You don’t need to release the rest of your application under the GPL. You can use any license you want, including more restrictive proprietary licenses, provided that when you do distribute it you follow the rules.
- Unlike GPL version 3, which prohibits using the code if you are implementing copy protection or DRM software, you can use LGPL version 3 licensed code in an application which includes copy protection or DRM.
So, LGPL is a fairly permissive license in comparison to the GPL, which cannot be ‘combined’ with other proprietary licenses in this way. So, what can’t you do with LGPL? Well, apart from relaxed rules such as those already discussed, LGPL still contains all of the other restrictions of the GPL. I won’t go into all of the detail of the GPL here, but here are some of the restrictions that you still retain when using the LGPL, that you may not retain with an even more permissive license (such as a BSD or X11 license):
- Anybody wishing to modify and redistribute LGPL code must also make the source code of the LGPL code, including their modifications, available and licensed under the LGPL. Therefore, the open source community and the original author can still benefit if a commercial enterprise contributes improvements to the LGPL code.
- All existing copyright notices in the LGPL code, as well as the GPL and LGPL licenses themselves, must be prominently displayed in any redistribution. In addition to this, any application using the LGPL code must display such copyright notices and refer to the license whereever they display their own copyright notices.
Something else of note is that whether you are building software that relies on either GPL or LGPL code, if you distribute that software without any of the GPL or LGPL included (ie, the user needs to download and install it themselves), then it’s not considered a ‘combined work’ and you don’t need to worry about complying with any terms. However, if you include even so much as a header file from the GPL or LGPL code in your software, then you’ll be bound by the license terms of the GPL or LGPL.