Combining different software licenses

22 06 2009

Any big software is made up of small modules. With the rise of open source, the developer can now use different open source libraries, toolkits, languages etc. Though open source, these components might be covered under different and even mutually exclusive licenses. Also the developer might have opted for a new license to release his final product. It is up to the developer to make sure that combining code does not violate the licensing terms that apply to each piece.

You must have heard of General Public License (GPL), Lesser GPL (LGPL), Apache license, BSD license, Mozilla Public License along with their version numbers. The problem in combining different licenses is that inbound rights – the rights granted from others to you should be as broad as outbound rights – the rights you granted to others.

Apache Software License is incompatible with the GPLv2 because it has certain patent termination cases that the GPL does not require.

Apache Software License is incompatible with the GPLv2 because it has certain patent termination cases that the GPL does not require.

The first step in understanding the problem is to know about the restricting nature of the open source licenses.

  1. Permissive
    Permissive licenses like Berkeley Software Distribution (BSD) and Apache permit the software to become proprietary.
  2. Copyleft
    They contain flow-down provisions that must be included in any of the downstream outbound licenses. For example, all licensees who accept code under GPL, must provide it to others under GPL. GPL requires that executables are accompanied with the complete corresponding machine-readable source code. The GPL says:

    10.  Automatic Licensing of Downstream Recipients
    Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License.
    You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License.

It is possible for the developer to divide the code base into different parts each covered in its appropriate license. However, GPL covers all code in the same executable, except proprietary system libraries. In contrast, LGPL code can be combined with any other code by using the LGPL code as a dynamically linked library. GPLv2 itself is not compatible with GPLv3. Eclipse Public License allows derivative works to choose their own license for their contributions.

The more you read and interpret the license documents, technical definitions seem fuzzy and legal language becomes philosophical. You can get a brief idea about the compatibility of common licenses on the FLOSS license slide.

I would recommend that you go for permissive licenses like BSD. The more permissive the license, the more likely the software will be used. But if you are a believer in freedom of software and don’t want your code to be used in any proprietary program then GNU GPL is the answer.