GPL License Compatibility Rules
You'll learn: How to determine which licenses can legally coexist with GPL-licensed code and which combinations create licensing conflicts.
The Core Principle
The GPL (GNU General Public License) enforces a strict compatibility rule: any code you combine with GPL code must allow the combined work to be distributed under GPL terms. Think of the GPL like a legal contract that says "if you want to use my code, you must play by my rules—and those rules must extend to everything you combine with it."
This creates a hierarchy of compatibility:
What Works with GPL
Compatible licenses allow their code to be relicensed under GPL terms:
- Permissive licenses (MIT, BSD, Apache 2.0) → GPL ✅
- LGPL → GPL ✅ (weaker copyleft can be upgraded to stronger)
- Same GPL version → Same GPL ✅
The permissive-to-GPL flow works because MIT/BSD essentially say "do whatever you want," which includes relicensing under GPL.
What Doesn't Work
Incompatible licenses impose restrictions that conflict with GPL requirements:
- GPL → Permissive ❌ (can't downgrade copyleft)
- GPL v2-only → GPL v3 ❌ (version mismatch)
- Proprietary → GPL ❌ (closed source conflicts with GPL's freedoms)
- Apache 2.0 → GPL v2 ❌ (patent clause incompatibility)
The "or later" Clause
GPL projects often specify "GPL v2 or later"—this allows upgrading to v3, solving some compatibility issues. But "GPL v2 only" locks you to that version.
Practical Impact
If you import a GPL library into your project, your entire combined work becomes GPL-licensed. You cannot keep parts proprietary or switch to MIT. The GPL's copyleft "infects" (legally speaking) the whole.
Key Takeaway: GPL compatibility flows one direction—permissive and weaker licenses can combine with GPL, but GPL cannot be combined with incompatible or proprietary licenses without violating the GPL's terms.