tags:

views:

159

answers:

5

Let's say I write some code, which we'll call X. It uses some GPL code, let's call it library Y. Clearly I would have to release X with a GPL license. That's fine. My question is, can I additionally release X under a license such as MIT, so that if someone only wants X but not Y they don't need to use it with the GPL?

+1  A: 

MIT license is also GPL-compatible, meaning that the GPL permits combination and redistribution with software that uses the MIT License. This link should provide you with a comprehensive analysis. There are lots of ifs and buts and definitions around libraries vs plugins vs modules etc that you should familiarize with.

CodeToGlory
That's not what I'm asking. The combined software would all be GPLed in that case. The MIT license was just an example, it could conceivably with a license which is not GPL compatible.
swampsjohn
review this link http://blog.milkingthegnu.org/2008/04/gpl-for-dummies.html for a comprehensive analysis.
CodeToGlory
@swampsjohn: if your license is not compatible with the GPL, you should not combine it with GPL works.
ninjalj
A: 

My understanding, despite not being a lawyer, is that you can license your code under any set of licenses you want, as long as you also license it to be compatible with components that you use.

If your code does not depend on the GPL code, you don't need to license under GPL as long as you're not distributing it with GPL code. IPython, for instance, was using readline initially but they removed that from the explicit/required dependencies and only use it if it's present so that they could comply with the GPL but license their software under whatever license they chose. (Sorry, I can't find a reference.)

dash-tom-bang
I'm assuming it does depend on the GPL code, although one could theoretically write a replacement for the GPL code with a different license, which perhaps some people have done (or will do in the future).
swampsjohn
Right- in the IPython case, they "softened" the requirement inasmuch as the software still performs its "primary function" if the GNU library isn't available (and they don't distribute with it), but it will use it if it's there.
dash-tom-bang
A: 

The key question here is: can your software X be distributed if you license X only under the MIT license (or some other rather relaxed Open Source license)?

The answer to that question is:

  • no if the dependency of X on the GPL-licensed library Y is mandatory and cannot be avoided to build/use X.
  • yes if the dependency of X on the GPL-licensed library is optional Y, and if it is disabled by default.

If the dependency on Y cannot be avoided, then releasing X under MIT would essentially prevent anybody (e.g. Linux distributions, or commercial vendors, or web-sites providing pre-built software) from distributing your software with the GPL-licensed library enabled in the build.

So while you can decide to license your own software under the MIT license, by releasing it under this license you would create headaches for all your users.

And my guess it that it is not what you are looking for.

My recommendation is that you make up your mind and decide between either:

  • Release X under the GPL if this GPL-licenced library Y is essential to your software. (the simplest, do-the-right-thing option)
  • Release X under dual GPL/MIT license if the GPL-licensed library Y is optional, and if you really need to have a version of software available under an MIT license, but want to allow distribution (by you or others) of X with Y support enabled. (only if it is really required)
  • Release X under MIT if the GPL-licensed library Y is optional, but be aware that nobody will be able to distribute your software in any way with the Y support enabled. (creates potential headaches for users, for a really unclear benefit)

I hope this helps.

Laurent
MIT+GPL=GPL, so your third bullet point would be actually GPL for the aggregate.
ninjalj
+3  A: 

YES, you can release your source code under any license you wish. You have that right under US copyright law.

However, if you incorporate any GPL source code within your source code (or distribute with any GPL code), you must use the GPL license for the entire work. That's because you have to agree to their license to use their code.

BTW. I'm not an attorney.

tgiphil
THe question was very directed and not a general question. Therefore the first paragraph is not the correct answer in this case. However your second paragraph is correct.
mP
@mP: I think the first paragraph is spot on: a third party, so long as (s)he doesn't use any of the GPL parts, has every right to use the other parts under their respective licenses.
ninjalj
@mP: The answer is direct, precise and correct. What in your opinion was incorrect about it?
tgiphil
A: 

Yes, you can use a GPL library; and not use the GPL license as long as you "dynamically link" to it. otherwise the Linux kernel wouldn't have very many drivers if any.

This means you have to have a separate executable (and/or documentation on the fact you used the software); that loads at run-time instead of compile time. This also means that you are one step closer to Dependency HELL!!!

There are several realms of Dependency HELL, here they are in no particular order:

  • DLL Hell
  • DSO Hell
  • Jar Hell
  • RPM Hell
  • Extension Conflicts
  • #define 1 0

each of which having multiple forms, culminating into the worst form:

Multiple Long Chains of Multiple Circular AND Conflicting Dependencies that writhe into your brain suck out your very soul!!!

GlassGhost
Wow people just go ahead keep on down voting this with no comments at all, don't even think about writing any comments.
GlassGhost