Open source without GPL?


I have written several example programs with JUCE and published them on GitHub. The JUCE license terms demand that these be licensed under GPL3, and so they are. However this defeats my purpose, which is to contribute code that others may use freely in both closed- and open-source projects.

As forum member @jonathonracz has pointed out:

GPL is like a virus in your code, as soon as you integrate some GPL code into your program your entire codebase must become GPL (read: totally open source) to comply with the license.

Is there any way I can license my code under a less-restrictive (non-viral) license such as MIT or BSD, with the understanding that the JUCE framework itself remains subject to its own license terms?


I think you’re misunderstanding. You’re only subject to our license if you actually distribute our code.

If you publish your own code on github and say “here’s my code under the MIT license - oh, but by the way if you want to actually compile it then you’ll need to go and get yourself a copy of JUCE”, then that’s entirely your business and nothing to do with us.

Our license only gets involved if you were to distribute a binary which contains JUCE code. In doing that, you’ve agreed to our terms, and the other code in it must be subject to the GPL. But if you’re only giving away pure source code then this that’s not the case.


Thank you! Can you also clarify a related case?

Let’s suppose someone (maybe me, maybe someone else) uses some of my published non-GPL code in a JUCE-based product, and distribute it in binary form, paying license fees as applicable. Two questions:

  1. Suppose the new project is also open-source. Can the combined code be published as you described (stating that to compile it, one must obtain the JUCE code) under a non-GPL license?
  2. Suppose the code is kept closed-source, and the product is successful enough that license fees are owed, but for some reason (death, bankruptcy, etc.) can no longer be paid at some point. The JUCE license seems to say that the only way anyone can continue to distribute the binary is if the entire source be published under GPL3. What about the parts that had previously been published under a non-GPL license?


$35/month is pretty cheap to not have to worry about that GPL stuff…


@matkatmusic you are missing the point. I’m not complaining about the JUCE license fees. My concern is that distribution (by me, or you, or anyone else) of my freely-shared code, linked into a binary with JUCE, may abridge my freedom to publish said code under a license of my choice (case 1 above), and worse, abridge your freedom to use it in closed-source products (case 2), which was my intent in sharing it in the first place.

@jules can you shed any light?


Not sure if I 100% understand your concern, but code that you write belongs to you and you’re free to do whatever you want with it - you can offer it under any combination of licenses you choose. (Just like we offer juce under the GPL or our own commercial license)


@jules I’ve been poring over the JUCE license and the GPL3 for hours, and I think (hope, pray) my concerns are covered by clause 5c of the GPL3 (emphasis mine below):

You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it.

The first two sentences are the “viral” core of the GPL3, implying that once any code becomes part of a GPL3-licensed whole, it can no longer be used freely. The third sentence, however, would seem to provide a way out, because as the author of certain parts of the code, I can grant others “permission” to use those parts in non-GPL programs, e.g. by publishing them on GitHub under MIT as you have described.

Neither of us is an intellectual property lawyer, but is that interpretation at least consistent with your own thinking?


Yes, if you create your own files that use the JUCE codebase (e.g. as a separate folder), you can release those files under whatever license you want because you own the copyright. The MIT license is compatible with the GPL in this way.


Apologies if I misunderstand but I think you are asking how to distribute GPL code as part of a binary distributed under a different (e.g. commercial) license.
Your problem is the GPL license is viral, like it or not - one intention of this is to prevent you subsuming GPL code into commercial binaries. This is not consistent with the GPL IMHO.

You can always publish your source code, however there exists no “freedom” to distribute binaries containing GPL code linked with commercial code, so no one is abridging any of your rights.

(personally, I avoid GPL code for this reason. I prefer a BSD-syle license, which does allow commercial use.)


@JeffMcClintock no I’m not looking for a way to use GPL code in a closed-source commercial product. I understand that prohibiting such uses is precisely the GPL’s purpose.

What I was worried about was that I might publish some source code, which might later become “GPL’d” as a condition of me or anyone else using it together with JUCE in a binary (in accordance with the JUCE license), and as a result my published code would no longer be free to use for commercial work.

However I think I understand now that this concern was misplaced. GPL3 covers every part of a code package by default (first part of clause 5c), but this can be overridden for specific parts if the author of said parts gives formal permission.

I will be proceeding under this assumption, but I’d feel better if a practicing IP lawyer could confirm it. I may write to the FSF with this question, and if I can I’ll raise it at one of the two legal talks scheduled for this year’s ADC conference.


If that was possible then I’d be able to take (for example) an Apple header file, combine it with some JUCE code, then tell Apple that this means all their code is now under GPL3, and they can no longer use it to build a closed-source operating system. :slight_smile:

Obviously your rights over your own code cannot possibly be changed by anything that someone else does with it. It would certainly be bizarre to imagine that someone else just using your code could affect your rights as the owner of the copyright.


Jules is correct. If someone combines your code with theirs, that becomes a new “work”, an independent entity. Your original code remains untainted.


Many thanks to everyone who has helped me come to understand this. I take licensing and legal matters very seriously.