License compatibility

On this page 7

License compatibility is the property of two or more software licenses that allows code governed by them to be combined into a single work and distributed without breaking the terms of any of them. In software licensing, two licenses are compatible when it is possible to satisfy all of their conditions at the same time for the combined result.

The question arises constantly in open source development, where a typical application includes dozens or hundreds of third-party components. Compatibility is usually directional: code under a permissive license can often flow into a copyleft project, while the reverse is generally not allowed.

How license compatibility is determined

License compatibility is determined by comparing the obligations and restrictions of each license and checking whether one distribution can honor them all simultaneously. If one license demands that the combined work be released under its own terms and another forbids exactly that, the licenses conflict and the combination cannot be lawfully distributed.

The analysis usually considers four questions: what each license permits, what it requires (attribution, notices, source disclosure), what it forbids (additional restrictions, certain uses), and whether it requires derivative works to carry the same license. The last condition, known as copyleft, is the most common source of incompatibility.

Compatibility normally matters only at the point of distribution. Combining incompatible code privately, for internal use, is generally not restricted by these licenses, with the notable exception of the AGPL, whose obligations extend to users interacting with the software over a network.

The following table shows how license categories typically behave when combined.

CombinationUsual resultReason
Permissive into permissiveCompatibleBoth require mainly attribution
Permissive into strong copyleftUsually compatibleCopyleft terms can absorb permissive code
Strong copyleft into permissive projectCombined work becomes copyleftCopyleft terms extend to the whole work
Two different strong copyleft licensesOften incompatibleEach demands its own terms for the whole
Copyleft into proprietary productIncompatible for distributionSource disclosure conflicts with closed terms
How license categories usually combine

Compatibility between widely used licenses

Specific license pairs have well-established compatibility positions, mostly published by the license authors themselves. These positions depend on the exact license version, which is why projects should always state versions precisely, for example GPL-2.0-only or GPL-3.0-or-later in SPDX identifier form.

Incoming licenseInto GPLv2-onlyInto GPLv3Notes
MIT LicenseYesYesAttribution notice must be retained
BSD 3-clauseYesYesNon-endorsement clause is acceptable
Apache License 2.0NoYesPatent and indemnity terms conflict with GPLv2
Mozilla Public License 2.0Yes, by defaultYes, by defaultSecondary license clause allows it unless opted out
LGPL 2.1YesYesCan be relicensed under GPL terms
AGPL 3.0NoYes, with conditionsGPLv3 section 13 permits combination
Common compatibility positions for inclusion in a GPL project

A frequent surprise is that GPLv2-only and GPLv3 are incompatible with each other, because each version requires the combined work to be licensed under that exact version. Code released as “version 2 or any later version” avoids this problem because the recipient may choose GPLv3.

License compatibility is often confused with neighboring licensing concepts. Each one answers a different legal question, and treating them as the same leads to wrong conclusions about what can be shipped.

ConceptQuestion it answersRelation to compatibility
License compatibilityCan these codes be combined and distributed?The central question
Dual licensingMay the recipient choose between licenses?Choosing one option can resolve a conflict
RelicensingCan the owner change the license?Requires all copyright holders to agree
Contributor License AgreementWho may relicense contributions?Can make later relicensing possible
License complianceAre all obligations actually met?Compatible licenses still need compliance
Related concepts and the questions they answer

Compatibility is a precondition, not a guarantee. Two compatible licenses still impose attribution, notice and source-availability duties that must be fulfilled in the shipped product.

Managing license compatibility in practice

Organizations manage license compatibility through policy, tooling and review. A written open source policy defines which licenses are approved, which need review, and which are banned for particular kinds of products, such as distributed binaries or SaaS offerings.

  1. Identify every dependency, including transitive ones, with a software composition analysis tool.
  2. Record licenses in a software bill of materials (SBOM) using SPDX identifiers.
  3. Compare each license against the project’s outbound license and distribution model.
  4. Escalate conflicts to legal review and resolve them by replacing, isolating or relicensing components.
  5. Re-run the analysis on every release, because dependency updates can change licenses.

The architecture of the combination also matters. Whether dynamic linking, plug-ins or separate processes communicating over a network create a single derivative work is legally disputed and depends on jurisdiction and facts, so organizations should not rely on technical separation alone without legal advice.

Conflict situationResolution optionTrade-off
GPL library in proprietary appReplace with permissively licensed alternativeEngineering effort, possible feature gaps
Apache 2.0 code in GPLv2-only projectMove project to GPLv3 if permittedNeeds agreement of all copyright holders
Dual-licensed componentSelect the compatible license optionMay require a commercial license fee
Incompatible copyleft modulesShip them as separate programsLegal certainty depends on integration depth
Typical ways to resolve a compatibility conflict

Common mistakes and misconceptions

Most license compatibility problems come from assumptions rather than unusual licenses. The following mistakes appear repeatedly in audits and acquisitions.

  • Assuming open source means compatible: two open source licenses approved by the Open Source Initiative can still conflict.
  • Ignoring license versions: GPLv2-only and GPLv3 code cannot be mixed, even though both are GPL.
  • Overlooking transitive dependencies: a permissive package may itself depend on copyleft code.
  • Treating source-available licenses as open source: licenses such as the Server Side Public License and the Business Source License add use restrictions that conflict with GPL terms.
  • Removing attribution: dropping copyright notices breaks even the most permissive license.

In plain words

Software licenses are sets of rules that say how code may be used and shared. License compatibility asks a simple question: if code with one set of rules is mixed with code that has another set, can both sets of rules be followed at once?

Some rules are relaxed and only ask for credit. Others insist that anything built with the code must be shared under the same rules. When two strict rule sets each demand to be in charge, they clash, and the combined program cannot be legally shared. Checking compatibility early avoids rebuilding a product later.

A real-world example

A startup builds a commercial desktop video editor and plans to sell it as a closed-source product. Before release, its engineering lead runs a software composition analysis scan on the build. The report lists 240 dependencies, of which 231 use MIT, BSD or Apache 2.0 terms, but one audio codec library is licensed under GPL-3.0-only.

Because distributing a proprietary binary that incorporates GPL code would require releasing the editor’s source under the GPL, the team treats the finding as a release blocker. They replace the library with a codec under the Apache License 2.0, which costs two weeks of integration work, and they add the scan to their continuous integration pipeline. The product ships on schedule with a complete notice file, and no copyleft obligation applies to the proprietary code.