As I understood in this wonderful answer, GPLv3 and GPLv2 code can't be used simultanously in the same product.


2 Answers 2


Both the GPLv2 and the GPLv3 have clauses that

  1. Require the combined product to adhere to the license terms of the license of the GPL licensed component.

  2. Require that no additional restrictions may be placed on the combined work:

from clause 6 of the GPLv2:

  1. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. (Part 1) You may not impose any further restrictions on the recipients' exercise of the rights granted herein. (Part 2)

The GPLv3 has additional restrictions over the GPLv2, specifically, a patent grant and anti-tivoisation provisions, so 1 and 2 can't hold simultaneously.

To prevent this issue, the Free Software Foundation advises people who want to license their work under the GPL to use the following phrasing:

You can redistribute it and/or modify [the work] under the terms of the GNU General Public License as published by the Free Software Foundation, either version [x] of the License, or (at your option) any later version.

That way, you release your work under multiple licenses; the one you name explicitly, and any possible future version of the GPL. This makes the resuser free to use the software under any future version of the GPL, and this license incompatibility becomes a non-issue.

I currently have no statistics on how common this practice is. It is at any rate not the route Linux has chosen.

  • 1
    This is misleading - when GPLv2 is applied as it's intended to be applied by the FSF, the two licenses are compatible (see my answer). Sep 6, 2015 at 21:47
  • 1
    That GPLv2+ works around this issue is definitely true, and I'll edit accordingly, but I can't find any pre-rolled statistics on how common/uncommon this is. I also wouldn't go as far as to call it misleading.
    – Martijn
    Sep 7, 2015 at 7:32
  • It was misleading, the OP was asking wether or not GPLv2 and GPLv3 code are license compatible, and the answer is they are compatible unless somebody modified a critical part of the license text (the only part of the license that anybody actually reads). But your original answer made it seem like they're not compatible at all. Sep 7, 2015 at 8:24
  • 5
    They are not compatible at all. It is trivially true however that GPLv3 licensed code is compatible with GPLv3 licensed code. Since GPLv2+ licensed code is (among other things) GPLv3 licensed code, and this is FSF recommended practice (and at least somewhat common, possibly very common) the note is definitely worth it. In the coming days I'll be gathering statistics.
    – Martijn
    Sep 7, 2015 at 8:42
  • 1
    That's interesting and I never heard of that @schily . europarl.europa.eu/document/activities/cont/201307/… page 17 explicitly does the EUPL 1.1 or later thing. This would make for an interesting question on law.se
    – Martijn
    Sep 14, 2015 at 14:27

The creators of GPL recommend licensing software under "version X of the License, or (at your option) any later version".

If the GPLv2 licensed code has been licensed as per those instructions, then GPLv2 code is license compatible with GPLv3 code.

However some projects (including the Linux kernel) do not want the FSF to be able to add/remove arbitrary license restrictions to their software at some future point, and they remove the clause making it incompatible.

In that case, you cannot mix GPLv2 and GPLv3 code because the people who chose GPLv2 decided not to allow mixing them.

  • 4
    "Version X or later" doesn't make GPLv2 compatible with GPLv3. It just gives the code multiple licences: GPLv2, GPLv3, GPLv4 (if and when the FSF writes it), etc. When you combine "GPLv2 or later" code with GPLv3 code, you're choosing to use a subset of the original licenses. The result is only under GPLv3 (and possibly "or later").
    – cjm
    Sep 7, 2015 at 6:24
  • 1
    @cjm You're correct however that's irrelevant. If you read the question carefully, you'll see the question is not about the GPL license, it's about compatibility of code licensed under GPL. I've edited my answer to remove the one place where it could have been unclear. Sep 7, 2015 at 7:03
  • 1
    GPLv2+ code that's been "upped" to GPLv3 has to remain GPLv3. The person you got the GPLv2+ code from has no way to merge back any downstream (GPLv3) changes back into his (GPLv2+) codebase.
    – DevSolar
    Sep 7, 2015 at 8:57
  • 6
    This answer is misleading. It confuses two independent but separate things: licence notice and the license itself. GPLv2 is incompatible with GPLv3 period. You are however allowed to apply multiple licenses on your work under either license and both GPLv2 and GPLv3 gives you examples for how to do it. But the notice is not the license. The GPL license, whatever the version, is closed sourced and can't be altered.
    – slebetman
    Sep 7, 2015 at 10:20
  • 3
    @AbhiBeckert: No, it is about the license. If GPL2 is applied as recommended then the software has a GPL3 license as well. So there's no incompatibility as GPL3 can be mixed with GPL3. But if the software is GPL2 only then it's incompatible. As I said. You mixed two things up - the notice and the license. All your answer say is that you can use GPL3 licensed code with other GPL3 licensed code. But that's not what he's asking. He's asking why GPL2 and GPL3 are not compatible
    – slebetman
    Sep 7, 2015 at 15:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.