2

I'm working on a project that I want to release under the MIT license. However, it includes a GPL'ed library. I understand this means I must release my work under GPL. Am I able to release the whole work under GPL, but also license the code I wrote under the MIT license?

This does feel against the spirit of the GPL, but will it get me into trouble?

2 Answers 2

7

This is covered (in the affirmative) in a GPL FAQ item:

You have a GPLed program that I'd like to link with my code to build a proprietary program. Does the fact that I link with your program mean I have to GPL my program?

Not exactly. It means you must release your program under a license compatible with the GPL (more precisely, compatible with one or more GPL versions accepted by all the rest of the code in the combination that you link). The combination itself is then available under those GPL versions.

You may license your own components under any license that is GPL-compatible, i.e., its terms are a subset of the GPL's terms. You may then distribute the combination of your permissively-licensed code and the GPL-licensed component together under the GPL.

6
  • Don't forget the last sentence in the FAQ: though the OP may release their code separately under a more-permissive licence, when they release it as part of the combined work it must be under the terms of the GPL. Other than that, though, +1 from me.
    – MadHatter
    Commented May 20, 2019 at 7:22
  • 1
    @MadHatter I thought, "But surely everyone who reads this in the future will carefully read the entire FAQ text, or else already know how the GPL works, right?" Thanks for reminding me that... not that. :) (I added another sentence.)
    – apsillers
    Commented May 20, 2019 at 10:40
  • @MadHatter Releasing something under the MIT license is releasing it under the terms of the GPL. "Under the terms of the GPL" means that you can comply with the GPL term's restrictions and get the GPL term's rights, which you can do for any work released under the MIT license. This is why they say "under the terms of the GPL" rather than "under the GPL". Commented Jun 18, 2019 at 21:45
  • @DavidSchwartz "Releasing something under the MIT license is releasing it under the terms of the GPL" I don't agree, but I'm not sure here is a good place to have the discussion. If you'd like to discuss it more, feel free to open a question about the distinction.
    – MadHatter
    Commented Jun 21, 2019 at 17:05
  • @MadHatter I don't have any questions about the distinction. It is not ambiguous, and I agree with the interpretation of the authors and maintainers of the license. "Under the terms of the GPL" means that if you do what the terms require you to do, you get the benefits that the terms give you. That is, you can act as if you had a GPL license and everything will be fine. Commented Jun 21, 2019 at 17:22
1

You can release code that is designed to be linked with GPL code under whatever license you wish, provided that you make clear a requirement that any forms of distribution which would not be allowed under the GPL license must not include any GPL code. Such distributions could either instruct recipients to acquire the GPL code separately and then build the program in a manner that does not involve any distribution of the resulting derived work, they could include alternative libraries which are not covered by the GPL, or both (the latter situation perhaps being appropriate if the GPL library would provide enhanced functionality that would benefit some, but not all, users of the program).

2
  • I am not convinced that telling users to separately download a GPL dependency allows you to distribute a product under a different license than GPL. Commented Feb 13 at 8:41
  • 1
    @BartvanIngenSchenau: The GPL has no authority over distribution of packages that don't contain any GPL code.
    – supercat
    Commented Feb 13 at 15:46

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.