68

I have a fairly good understanding of individual OSS licenses, but I always have trouble when I want to use code under different licenses. BSD vs. Ms-PL, Apache 2 vs. GPLv3 etc.

Is there some sort of "mating chart" that lists which licenses are compatible with which ones?

Michael Stum
  • 177,530
  • 117
  • 400
  • 535
  • [Here's a site](https://www.tldrlegal.com/) which has related functionality. – Abbafei Jun 11 '14 at 05:22
  • 11
    Aside from the fact that this is a useful question/answer (as opposed to many in SO) and thus should not have been closed 4 years after being asked!!!! can it be migrated to http://opensource.stackexchange.com/ at least. – dashesy Sep 10 '15 at 22:50

2 Answers2

57

The Free Software Foundation maintains a list of licenses, categorized as GPL compatible, GPL incompatible, and non-free. This can help answer the most common question, which is whether a license is GPL compatible. Since there aren't many other free software licenses which require that the entire derived work be distributed under the same license like the GPL does, compatibility issues are usually lower between other licenses as long as the code stays in distinct libraries or source files.

As far as the Ms-PL goes, you can probably use the FSF list to determine compatibility for that as well. The Ms-PL is a (very) weak-copyleft license (the Ms-RL is slightly stronger, but is still categorized as weak-copyleft). This means that code distributed under it must remain under it, thus making it GPL incompatible, but that you can generally link it to code under permissive or other weak copyleft licenses, as long as you follow the terms of each license and the separately licensed code reside in separate libraries. The only licenses it is likely to be incompatible with are strong copyleft licenses, like the GPL and AGPL. (Standard disclaimer: I am not a lawyer, and this is not legal advice. If you need legal advice, you should talk to a qualified attorney).

For a more limited set of licenses, you can check out this Free-Libre / Open Source Software (FLOSS) License Slide by David Wheeler (reproduced below). Arrows indicate that two licenses may be combined, and that the combined work can effectively be treated as having the license at the end of the arrow, possibly with some additional restrictions taken from the license at the start of the arrow.

License compatibility chart
(source: dwheeler.com)

the following paragraph is a generic rant on this topic, related but not directly relevant to your question

The difficulty of determining license compatibility, and simply in understanding the ramifications of various licensing terms, is why license proliferation is such a bad thing. Please, please try to use a common, well understood license, such as the GPL, LGPL, BSD 2-clause or 3-clause, MIT/X consortium license, or public domain dedication, if at all possible. Whatever you do, don't invent your own license. If you must, use the license that is common for the project you are contributing to, to maintain compatibility with the rest of the code in that project. If you follow these rules, you will help reduce confusion, and improve license compatibility.

Glorfindel
  • 21,988
  • 13
  • 81
  • 109
Brian Campbell
  • 322,767
  • 57
  • 360
  • 340
  • I agree with that last rant, although for me i'm specifically looking for Ms-PL compatible licenses. I find the GPL way too restrictive, so it's more about BSD/Apache/Ms-PL/Ms-RL/MPL/LGPL... – Michael Stum Dec 30 '09 at 05:32
  • according to that chart the APL 2.0 is not compatible with lgpl v2? that seems highly contradicting to me. – Alexander Oh Oct 24 '11 at 08:11
  • 1
    Do these sites have a standard definition of "derivative" work? Is my work derivative if I just consume an unchanged binary? If I use an OSS library for pure communication over, say Modbus protocol in a plug-in, did my entire control application become derivative even though its emphasis is in a completely different problem domain than the communications library? – Tormod Mar 23 '14 at 09:27
  • 1
    @Tormod The comment section in here is too short to provide a full answer to your question. If you use an open source library for communication, then your work plus the library constitutes a combined work, and that combined work must comply with the license that the library is distributed under. If it's distributed under a permissive license (BSD, Apache, etc), then that generally means that you just have to give credit (but read the full licenses for more detail). If it's LGPL, then you must allow people to replace the library. If it's GPL, then you must release your software under the GPL. – Brian Campbell Mar 23 '14 at 22:04
  • 1
    @Tormod For more details, please read the [GPL FAQ](https://www.gnu.org/licenses/gpl-faq.html) or ask a separate question, where I (or someone else) can provide a more complete answer. – Brian Campbell Mar 23 '14 at 22:04
  • @BrianCampbell I have made http://programmers.stackexchange.com/questions/233571/open-source-what-is-the-definition-of-derivative-work-and-how-does-it-impact – Tormod Mar 25 '14 at 08:24
  • In fact the WTFPL is not approved by the OSI, because you can't put something willingly into public domain in Europe. See http://spdx.org/licenses/ to know if a license has been approved by OSI and http://opensource.org/minutes20090304 for the deliberation about the WTFPL. – liberforce Mar 28 '14 at 18:46
2

Answering your comment about being interested in Ms-PL-compatible licenses:

Most licenses are compatible with it. Your best bet would be to go to Wikipedia and type in a license name. It is compatible with the Ms-PL if it's listed as having no copyleft, since Ms-PL requires all released source code derivatives be under Ms-PL.

That's how I do my research. ;)

Chris Long
  • 3,007
  • 4
  • 30
  • 37