I forked a project which had the MIT license. I made substantial changes to it, rewriting it in a different language (from C++ to C) and now only a few small vestiges of the original are left in the form of small chunks of code from within functions. I have not released the project yet, and I would like to release the new project under the GPLv2. Let's assume that the licenses are incompatible and that one cannot relicense an MIT project under the GPL (I don't know if that's true, but let's say it is).

The original project was a very simple parser of a binary format that output information about its structure. Over many iterations, I've extended it into a complete parser of a superset of that format that is fully compliant with the RFC and validates and optimizes all aspects of the format, and I would like to release it as a GPLed library.

What are some best practices for ensuring that the work is no longer covered under the original license and is no longer a derivative work? I can rewrite the few chunks of code that were directly derived from the original work (mostly it's stuff that's so obvious that there's no alternative that works, like a basic for loop iterating through an array).

I'm not looking to limit my legal exposure or to get away with not crediting the author of the project I based my work on (I'll credit him regardless of whether or not I have a legal obligation to); I'm just interested in best practices which surely fall somewhere between the extremes of "just change the names of variables here and there" and "have someone who has never even seen the original code do a complete cleanroom re-design based on only the RFC".

  • 3
    "Let's assume that the licenses are incompatible and that one cannot relicense an MIT project under the GPL (I don't know if that's true, but let's say it is)." This is wrong, the MIT license is a permissive one. Even if your work is a derivative (which it sure sounds like) you may fulfill both the attribution requirements of the MIT license and release your work under any version of the GNU GPL.
    – ecm
    Commented Jun 18 at 9:13
  • 4
    Does this answer your question? Theseus' Paradox applied to code copyright Commented Jun 18 at 9:26

1 Answer 1


Copyright law does not define a point where you have changed so much of an original work that your changed version stops being a derived work. Once something is a derived work, it always remains a derived work.

This means that the best practice to move something from derived work to purely original work is to perform a complete clean-room re-design.

Let's assume that the licenses are incompatible and that one cannot relicense an MIT project under the GPL (I don't know if that's true, but let's say it is).

Fortunately for you, the MIT license is a permissive license that is very compatible with the GPL license.

The MIT license does not place any requirements on the license you can use for your own code or for modifications you make to the MIT-licensed code. It even gives you permission to sub-license the code you received under different terms. The only real requirement is that you keep the copyright and license notices in place.

This means that you can just publish your library with the GPL license on it. You just have to keep the MIT license texts intact, but you can precede them with a comment that the code has been sub-licensed under the GPL.

  • 4
    "but you can precede them with a comment that the license text is no longer in effect" - Why would you do that? That would seem confusing. If the MIT license text is included, then it seems like it should still be included in a derivative work as well. What I have seen before, however, is a note somewhere stating that the new product is in fact GPL licensed (which is allowed by the MIT license of course). But to say that the MIT license is "not in effect" may send the wrong message.
    – Brandin
    Commented Jun 19 at 6:59
  • 1
    The purpose of clean room designs is to prove that something isn't a derivative work despite the presence of aspects that might happen to match the original. If a work that is a derivative of some other work X is modified so as to remove all parts that are based on copyrightable aspects of X, the work with such parts removed would no longer be a derivative work of X.
    – supercat
    Commented Jun 19 at 22:29
  • @supercat, it is not that easy. See also opensource.stackexchange.com/questions/10141/… Commented Jun 20 at 8:19
  • 1
    @supercat Assume that you have version 0.0.5 of a product which is a derivative work of something else. Then you modify it to version 0.0.6, 0.07, 0.0.8, etc. and by the time you get to 0.0.38 you conclude that there is no longer any vestige left of code that is derivative. OK, but version 0.0.38 is still "based on" version 0.0.5, which we already assumed was a derivative work. The only safe way is to start over at 0.0.0 and if you insist on taking code from another product, only take non-derivative or non-copyrightable portions.
    – Brandin
    Commented Jun 20 at 8:59
  • @Brandin: In some cases, it may be difficult to cleanly segregate the parts of a program are based on some particular other program. In many cases, it will be very clear that certain parts are definitely not based upon any copyrightable aspects of some other program or library.
    – supercat
    Commented Jun 20 at 14:42

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.