8

I'm working on a software project which I intend to release as FOSS in some way. My code includes quite a few header/source files written by others:

  • Better Enums
  • A slightly modified GSL Lite
  • An adaptation of some of GCC 4.9.3's libstdc++ for use in CUDA device-side code (so originally FSF code based on SGI code)
  • An implementation of the C++ optional class (for pre-C++14 compilers and libraries)

as well as pieces of code directly lifted or adapted from answers on Stackoverflow.com . The licenses as of now are:

  • MIT and MIT-like licenses
  • GPL v3
  • Boost Software License
  • 2-clause BSD License
  • Any license restrictions that apply when using code from Stackoverflow

Now, I'm really not sure what license I can release my project under, nor what license I should release it under in these circumstances. My initial wish is for a GPL release, and possibly something less restrictive in the future. My questions are:

  1. Given the license soup described above, can I even release my code under a single license, or should/must each part of it (mine and everybody else's) have a separate license?
  2. Among the popular Free/Open Source Software Licenses (keeping this definition intentionally vague), what are the possible ones I could use: 2.1 For the entire project? 2.2 For the code that's just my own (seeing how it needs to be built with the rest of the code, that's not mine)? 2.3 For the code which is a derivation/modification of code with another license?
  3. How should I proceed if I want to emulate the effect of one of the licenses for the whole project, even if I can't just use it directly?

Notes:

  • This question is similar to this one, except I don't want to put my work in the public domain; and it's not just one small piece of code that's not mine; and there are multiple licenses.
  • So far I've included attribution via web link for all the SO code, and of course have kept the copyright notices for all of the libs/files I mentioned above.
1
  • 3
    As far as I can tell you can't legally distribute this code since CC-BY-SA licensed Stackoverflow code and the GPL are incompatible copyleft licenses. Unless the stackoverflow snippets are trivial enough to not be copyrightable or their author dual-licensed them under something more permissive. Sep 10, 2016 at 21:01

3 Answers 3

4
  1. Given the license soup described above, can I even release my code under a single license, or should/must each part of it (mine and everybody else's) have a separate license?

Both. GPLv3 requires your work "as a whole" to be licensed under GPLv3 as well. Parallel to this, the parts can (and must, if you obey their terms) stay under their own license. According to this link, most of the licenses you mentioned are directly compatible with GPLv3, except the code from SO, which is under a "Create Commons Share Alike" (CC-BY-SA-3.0) license, which makes it a bit tricky. This post on SO meta and especially the second answer tells you it will be possible to lift the CC-BY-SA license to 4.0, which makes it compatible with the GPL v3.

  1. Among the popular Free/Open Source Software Licenses (keeping this definition intentionally vague), what are the possible ones I could use: 2.1 For the entire project? 2.2 For the code that's just my own (seeing how it needs to be built with the rest of the code, that's not mine)? 2.3 For the code which is a derivation/modification of code with another license?

2.1: GPLv3 (assumed your whole project is a derived work from the included GPLv3 code)

2.2: any license you like which is compatible with GPL v3 (see my first link)

2.3: whatever the license of that part of the code requires (so you need to stick to GPLv3 for the already GPL licensed parts)

  1. How should I proceed if I want to emulate the effect of one of the licenses for the whole project, even if I can't just use it directly?

You can (and need) to use the licenses in combination, and especially GPLv3 for the whole project. This means probably you will have to include not only the GPL v3 license text for the project, but also the license texts for the parts. It should be obvious that you have to make clear which license applies to which part.

1
  • One of the comments at the linked-to page suggests that if I retain a link to the original code, I meet the conditions of CC-BY-SA anyway. What do you think?
    – einpoklum
    Sep 11, 2016 at 3:05
0

Good luck.

You'll have to read all the licenses, and read all the conditions that they set for publishing. I am quite sure GPLv3 requires licensing under GPLv3. I have no idea whether it allows simultaneous use of another license, but it seems unlikely. And no idea whether the others can be published under GPLv3.

As I said, good luck.

1
  • It is not unlikely, quite the opposite. GPL requires to distribute derived work as a whole to be released under GPL as well. However, the individual parts can be licensed under different FOSS terms, as long as those licenses are GPL compatible. Linux, for example, contains lots of parts which are still under BSD and MIT license.
    – Doc Brown
    Sep 10, 2016 at 19:52
0

Most of those licenses are not problematic. (MIT and BSD are definitely not, and I've never heard of problems with the Boost or OpenStack licenses / conditions.)

The GPL license however is problematic, in that it effectively means that the application as a whole must be released under the GPL ... if you release it at all.

  • If the licence of the component is actually LGPL not GPL, that does not apply. LGPL would change everything ......

  • If the GPL component is dual licensed (or not), you may be able to use an alternative license. For example, negotiate a license fee with the copyright owner. However, this is at >>their<< discretion, not yours.

  • GPL is only really problematic if you have a good reason for it to be problematic.

True GPL (not LGPL) won't constrain your end-users' ability to use or modify your software. The fundamental tenet of the GPL is maximizing freedom for end-users. However, GPL does limit the limitations / constraints that >>you<< can place on end-users and downstream organizations. (For example, you can't them by not providing parts of your source code. And downstream organizations can't do that either.)

In short, if you are happy with GPL, then license your code as GPL and move on. If not ... you will most likely need to replace the GPL components in your codebase with something else.

Standard disclaimers apply. IANAL, etcetera.


UPDATE

To answer your direct questions:

1) Given the license soup described above, can I even release my code under a single license, or should/must each part of it (mine and everybody else's) have a separate license?

You could license some of the components separately if you distribute them / your changes to them separately, but the product as a whole must be GPLv3 if it contains any GPLv3 components. Certainly, that is the simplest approach.

2) Among the popular Free/Open Source Software Licenses (keeping this definition intentionally vague), what are the possible ones I could use:

2.1) For the entire project?

You must use GPLv3, based on what you have said.

2.2) For the code that's just my own (seeing how it needs to be built with the rest of the code, that's not mine)?

You must use GPLv3 if your code needs to be linked to GPLv3 code.

2.3) For the code which is a derivation/modification of code with another license?

That depends on the code, and whether you are including it as part of the whole or distributing it separately. (If you are distributing your modifications to the MIT / BSD / Boost libraries separately from your main product then you could use pretty much any license terms for your changes to those components.)

2.4) How should I proceed if I want to emulate the effect of one of the licenses for the whole project, even if I can't just use it directly?

I don't think that is an option. The license terms that apply to a particular component cannot be "worked around". Your permission to use the code is conditional on your following the license terms. This is not an issue for the permissive licenses because they place minimal conditions on you. But for GPL you can't just "make it go away" by choosing to relicense. Only the original copyright owner can do that.


Bottom line, if you cannot live with the conditions imposed by the GPLv3 license, DO NOT use GPLv3 components / libraries / whatever in your application. Find an alternative.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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