First, it is clear that the right to sublicense doesn't give you the right to relicense.

Let's say we have a library with MIT license(1 file), someone adds some features to the library but puts them under GPL(in the same 1 file). Or if someone wants to sublicense they have to separate the code?

If someone wants to use the library, how are the licenses handled?
Let's say that the developer uses only the features under the MIT license even if in the file there are some features under GPL.
Does he have to GPL his application because of the GPL licensed code?
Does he have to remove the GPL code in order to be free of the GPL restrictions or he can just use the library under MIT permissions/restrictions as long as he doesn't use the GPL code?

3 Answers 3


someone adds some features to the [MIT] library but puts them under GPL(in the same 1 file). If someone [else] wants to "sublicense," [do] they have to separate the code?

If by sublicense you mean use the code under the less-restrictive MIT license, then yes. The person GPL'ing their new code is basically saying, "You can't use my code unless your code is also distributed under the terms of GPL."

Does [the sublicensor] have to remove the [newly-licensed] GPL code in order to be free of the GPL restrictions?


  • I was looking at open source licenses( tldrlegal.com/browse ). I would like to protect further users of the library(that may take it from someone else) from additional restrictions. Almost every popular permissive open source license allows to sublicense. Ms-PL seems good for that but it has other restrictions(There is also GPL but I don't want to force users of the library to GPL their software)... Mar 7, 2013 at 18:43
  • I'm not clear on what "sublicensing" has to do with this. Are you trying to pick a license that allows it, and what does "sublicensing" mean to you? Mar 7, 2013 at 18:45
  • From programmers.stackexchange.com/questions/105912/… I understand that someone can mix in another license to the current license and to the restrictions of the current library are added the restrictions of the additional library. Or one could apply the additional library to the code he added to the original source. And no, I would prefer a license that doesn't allow someone mixing in a more restrictive license. Mar 7, 2013 at 18:55
  • 3
    I think you need to keep this simple; look at it in terms of "distribution," not "sublicensing." All of the open-source licenses allow people to use the code in-house any way they wish; it is only when distribution occurs that any copyleft restrictions become evident. In your case, you have someone who wants to GPL their code. The resulting choice (which you only have to make if you redistribute) is simple: you either live with the new restrictions he has imposed, or avoid his code and stay with the original MIT-licensed code. Mar 7, 2013 at 18:59
  • 1
    The answer here is mostly wrong. Adding an answer below to clarify. Mar 8, 2013 at 6:10

IANAL but I have discussed this and many similar issues with lawyers enough to have a good idea of what I am talking about here. This is not legal advice. The best background reading is Larry Rosen's book in the context of open source software.

Rights, Licenses, Copyright and Sublicenses

Under copyright law a copyright holder is granted certain exclusive rights over his or her work. Most or all of these (depending on jurisdiction) can be exclusively or nonexclusively licensed to a third party. If sublicensing is allowed, a licensee can pass on some or all of the rights in the license to a third party by contracting directly with them.

Currently in the United States, exclusive licensees are assumed by statute to have a right to sublicense (though I presume this could be further clarified in the exclusive license). This makes sense because exclusive licensees are presumed to have control. Nonexclusive licensees are not assumed to be granted such a monopoly by the licensor.

For example, suppose I write a novel. Suppose I offer an exclusive license to the work in its current form as a book, and I offer someone else a non-exclusive license to make a sequel which is a derivative work. The exclusive licensee can issue non-exclusive licenses to other authors to use excerpts from the book by sublicensing. The non-exclusive licensee cannot authorize yet another unauthorized sequel of my novel, nor can the exclusive licensee sublicense a right they have not been granted (movie rights for example).

BSD vs MIT licenses and Sublicensing: A Possibly Big Difference

This section is mostly based on Rosen's book (above). If you need legal advice, please hire a lawyer, and don't get it off Stack Exchange.

The MIT license explicitly allows sublicensing while the BSD license does not. Following the above discussion this means that the MIT license allows something that the BSD license probably does not in most jurisdictions, namely sublicensing. Both licenses address, however, only the code and software provided and neither one limits what a work as a whole can be licensed under. This leads to a significant question of how to interpret the GPL v3 to be compatible with the BSD licenses btw.

Under the MIT license you can do basically two seemingly similar things:

1) You can incorporate the work in your own works and distribute these under a more restrictive license.

2) You can take the original MIT-licensed work, add additional restrictions on it, and distribute the work under a more restrictive license but where you have not modified the code at all. The GPL v3 claims to require this to be compatible, if one sees the GPL as governing all terms of the license.[1]

Under the BSD family of licenses, however, you can only add restrictions to your own code and to the derivative works you create. You cannot add them to the original code by passing on only some of the rights granted to you. So I can't take the BSD-licensed PostgreSQL, rename it to PostSQL, and license it under the GPL, but I can take MIT-licensed Kerberos and rename it as HadesHound and license it under the GPL (in both cases assuming that no code has changed). This means that the vehicle for rights is different (always direct in the case of the BSD license, either direct or indirect in the case of the MIT license).


Sublicense is a legal term. If you want to read about what it actually means, my recommendation is to start talking with lawyers, the Software Freedom Law Center, and others, and consult legal dictionaries. The basic idea though is that if this is granted, a licensee can become a licensor of some of the rights of the grant they received regardless of any other claim they may have to copyright control over what they distribute.

You are asking about a specific legal document and a term used in it. I hope this helps explain exactly what that term means and what impact it provides.

Many of your questions are likely to be long and complicated,[2] and depend on jurisdiction, but a basic rule regarding the MIT License is that if your channel claims it is licensed now under the GPL, it is licensed under the GPL. This may or may not be a safe assumption under the BSD license however. Moreover this is true regardless of whether the original version was modified or not if the MIT license was used. Under the BSD license, the scope of modifications are indeed determinative regarding which license governs.

[1] One solution is to see the GPL in a different way, and to allow "reasonable legal notices" (additional restrictions under section 7) to include notices of additional license rights. In this case one would have additional permissions which were removable, governed under section 7 as additional permissions, but also allow, as an additional restriction (under section 7(b)), a notice saying that certain rights are not removable. This is one of the things I dislike about the GPL v3, namely that it makes one think like a lawyer regarding how to address license compatibility.

[2] For example there is an open question whether distributing software which links to a third party library requires copyright permission at all. If this is the case that it does, then PostgreSQL compiled on MinGW requires Microsoft's permission and they can revoke that at any time, but if it doesn't then I can write proprietary programs that link against GNU Readline and the FSF can't claim this is copyright infringement. This open question makes most of your questions regarding whether a developer can link to a library under a license other than the GPL impossible to answer with any certainty.

  • 1
    tl;dr: Talk to a lawyer. Mar 8, 2013 at 19:40
  • 1
    To some extent yes. But I am also of the opinion that as professionals we need to be relatively informed of these issues. If the only question is "can I use MIT-licensed code in my GPL'd app" that can be answered safely as "yes." If the question is "can I link my proprietary application to a GPL'd version of an MIT-licensed library?" that's a good time to talk to a lawyer. Mar 9, 2013 at 0:00
  • 1
    (I am also not really sure that sublicensing is ever all that necessary regarding open source software, FWIW.) Mar 9, 2013 at 0:00

I am not a lawyer, nor do I play one on TV:

While the default answer for a question like this is just to talk to a lawyer, I think a better answer is to talk to the original author. Tell them what you are going to do with it and what your target audience is. Remember, the author does not waive his copyright for his work by releasing under a license, the author is free to choose what he wants to allow with it. The author can say "you may fork this library under this other license which has the requirements you seek" or just say "you may release your software using whatever license you want, I waive the requirement for X just as long as you do Y". I personally have gotten special permission to release to fork an author's open source software under Apache instead of GPL. Granted for a large, currently supported, project like Qt, this has HUGE repercussions - but this was a small project that they weren't maintaining anymore.

Considering that I see tons of open source applications released under the GPL, which I would say authors really don't understand what that really means. Remember, if you use GPL code, even if it's a single line, your entire application must be released under the terms of the GPL (that's a little extreme of course, no open source author would go after you for a single line - but it's the requirement of the license).

Also I don't agree with Chris Travers's answer.

Per this chart both BSD and MIT allow someone to release under a different license. Here is another source suggesting it allows sublicensing. I read through the new BSD license and it doesn't suggest anything about not allowing you to release under a different license - however it does have stipulations none of which forbid you to change the license in a derived product.

  • I am the "author". I want to make sure it's all good for users. May 12, 2013 at 20:35
  • The BSD license requires that you place the license on copies of the source code. The license provides direct-from-author license grants. Absent sublicensing, there is no mechanism to change the license of existing BSD-licensed code without asserting your own copyrights over your own code directly. That's what sublicensing allows you to do, namely add restrictions not present in the original license. Hope this clears it up. Again, I found Rosen's book to be very helpful here. Mar 5, 2014 at 3:01
  • Of course once you have your own copyrights to assert, the distinction goes away. So once you add your own code to the file you can add whatever restrictions you want, but they apply only to your own code and you can't assert them against the code you got under the BSD license absent an explicit right to sublicense. So the difference is between asserting restrictions on your own code and asserting them on the code you got under a different license. Mar 5, 2014 at 3:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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