Slashdot Mirror


GPLv2 and GPLv3 Coexisting In the Same Project?

cyclop writes "I am coding a data analysis application in my laboratory that I would like to release as free (as in freedom) software. Moreover I am going to begin a small OSS game that will be based, in part, on GPLv2 libraries. Problem is: in both cases, I'd like to be able to exchange code both with GPLv2 and (future) GPLv3 projects. I have no particular passions about either license — only thing is I don't want BSD-style 'do anything you want' licensing but a copyleft license. I know that GPLv2 and GPLv3 are not compatible. What can I do? Double licensing? Is there a compatible-with-both license? Adding exceptions? What do you think is the best way to address the GPLv2-to-GPLv3 transition without ending up on one or the other side of the barricade?"

19 of 116 comments (clear)

  1. If it's your code do both. by MikeFM · · Score: 5, Informative

    If it's your code you can use whichever licenses you want including making your code available under more than one license. If you're using someone else's code though then you have to stick to their license.

    --
    At what price learning? At what cost wisdom? The price is a man's peace of mind, and the cost is his life.
    1. Re:If it's your code do both. by Anonymous Coward · · Score: 1, Informative

      How about an opinion from a "lawyer"?

      Dude (article poster), go ask Eben Moglen, or better yet, get some *free* advice from his company/association/whatever: The Software freedom law center.

      Slashdot is good for general ideas (like links above), just don't base a project/life decision on comments made by you know who-where-how/old posters.

      Good luck.

    2. Re:If it's your code do both. by EsbenMoseHansen · · Score: 2, Informative

      I can't see how, even if all is your code, you could distinguish multiple licenses inside the same program.
      GPLv2 says that in order for a program to legaly have some GPLv2 code, the entire program must be under GPLv2. GPLv3 says the exact same thing, so both can't coexist legaly inside the same program, even if you wrote it all.

      It can be both in the sense you can say: Here is two licenses: GPLv2 and GPLv3. I offer my code on either license. You just pick one. Thus, the mutual incompability never comes into play.

      However, you are right that the code is not covered by both licenses as once. Thus, for code to be dual licensed, all the code it derives from must be available dual-licensed, too. In other words, choosing the dual license makes less code available to you for inclusion than picking either one. On the other hand, it is easier for other people to use your dual licensed code, as they can use it if they can accept just one of the licenses.

      --
      Religion is regarded by the common people as true, by the wise as false, and by rulers as useful.
  2. GPL 2 or later by Anonymous Coward · · Score: 1, Informative

    "version 2, or at your option, any later version"

    1. Re:GPL 2 or later by Anonymous Coward · · Score: 1, Informative

      Exactly what I was going to say: is the submitter certain the library in question is GPL 2 only and not the standard clause you quote. Some software may be GPL only (Linux, for example) but it's actually fairly rare. If the code is "GPL 2 or later" then there is no issue.

    2. Re:GPL 2 or later by codemachine · · Score: 3, Informative

      I believe the person receiving the code gets to choose which version applies. So if they wish to TiVo-ize it, they will opt to accept the terms of the GPLv2 license instead of the GPLv3 license.

  3. Probably not as big an issue as you think by shaitand · · Score: 4, Informative

    Remember that almost all GPL'd software permits using the terms of future versions of the GPL. Unless they have chosen to omitt this part of the license you can use GPLv3 without issue. If that won't work, then you should license GPLv2 WITH the option of using the future terms. That way you are compliant with both GPLv2 and GPLv3 and let people work out the library licensing on their own.

  4. Just use GPLv2 by 3247 · · Score: 4, Informative
    The licenses are compatible if you just use the wording suggested by the FSF:

    This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
    I've highlighted the relevant words.
    --
    Claus
    1. Re:Just use GPLv2 by Tim+C · · Score: 4, Informative

      That doesn't make them compatible. That clause allows the recipient to *change* the licence from v2 to v3 (or later). It does not allow you to mix v2-licensed code and v3-licensed code in the same binary; it means that as soon as you add in some v3-licensed code, the entire thing becomes v3-licensed.

  5. GPLv2 or later by Aim+Here · · Score: 3, Informative

    Just pick GPLv2, with the usual 'version 2 or later' language in it, for your own code.

    That allows you to mix any variation of your code, GPLv2-or-later code and/or GPLv3 code in a GPLv3 project.

    It also allows you to use your code with those relatively few projects that are 'GPLv2 only'(such as the Linux kernel) and/or GPLv2-or-later code in a GPLv2-only project.

    That's about as compatible as you'll get with those three flavours of GPL. No license you pick will allow you to mix 'GPLv2 only' code with GPLv3 code.

  6. Re:What's the point ? by kimvette · · Score: 1, Informative

    I'll take the bait. . .

    Most cameras are mass storage devices. If you can't get them to work with Linux, I do not think the problem is Linux or the computer or the camera.

    Or did you mean a webcam? That isn't a problem either. See http://www.theinquirer.net/default.aspx?article=39 291

    --
    The Christian Right is Neither (Christian nor right). See: Matthew 23, Matthew 25, Ezekiel 16:48-50
  7. Ask the FSF by Anonymous Coward · · Score: 1, Informative

    The GPLv3 Wiki FAQ is here:

        http://gplv3.fsf.org/wiki/index.php/FAQ_Update

    You can check the questions already on it to find if yours is answered, and if not, add your question to it. I added a couple of questions and within a couple of days, someone had merged them into one and answered it.

  8. Can you do both at the same time?? by Anonymous Coward · · Score: 1, Informative

    There's one slight comment to this. If you link with GPL libraries it is considered by many that your code has to be licensed under that license. If you are using libraries which are GPL V2 only and libraries which become GPL V3 only, there might be some incompatibility since you can't be both at the same time (dual licensing lets the licensee choose, but not actually have both at the same time). In this case your code can be distributed with the "any version later than 2" and will be compatible with both sets of libraries individually, however, distribution of object code which needs both libraries to work might be a problem. I'm not sure if someone has a good answer to what the limitatinos would be? Most people sensibly use the FSF recommended wording and so you can use "either version 2 of the License, or (at your option) any later version.". In this case, you should wait until the GPL v3 is out and then start using GPL v3 for all of the libraries. Your own code should be able to be "version 2 or later" without a problem.

    1. Re:Can you do both at the same time?? by DrJimbo · · Score: 2, Informative
      samkass said:

      Now GPLv3 is trying to restrict people's use of HARDWARE as well.
      The TiVO hardware is compatible with the GPLv3 according to Jim Barton, the CTO of TiVO who said in an ACM article:

      Each TiVo DVR includes a secure microprocessor to which are delegated all public-key-based operations. This secure microprocessor contains a unique public/private key pair for each DVR, so that there are no global secrets for DVR authentication.
      Even existing TiVos could be made GPLv3 compliant if the TiVo corporation made the private keys for each TiVo available to the owner. It is all about the freedom. It's not a hardware issue at all.

      samkass also said:

      But you can't use your own code on TiVo's hardware. I'm afraid I'm in the camp that thinks GPL has no business telling people what they can and can't do on their hardware.
      The GPL is all about giving people control over their own hardware, not anyone else's. Nothing in the GPL gives me the right to crack into TiVo's servers and run my own code on them. The TiVo boxes are owned by the people who bought them from the TiVo corporation. It is the TiVo corporation that is in the business of telling people what they can and cannot run on their own hardware. They are always free to do this with proprietary or BSD (or even GPLv2) code. People who don't want their code used in this way are free to upgrade to the GPLv3 which would prevent TiVo from distributing their code without also passing on the four freedoms.

      --
      We don't see the world as it is, we see it as we are.
      -- Anais Nin
  9. GPLv3: licensing by proxy by tepples · · Score: 3, Informative

    At very least, I'd suggest requiring that contributors allow you to relicense their code to future versions of the GPL at your discretion. In fact, the GPLv3 last call draft includes a provision that endorses such a licensing model:

    If the Program specifies that a proxy can decide whether future versions of the GNU General Public License shall apply, that proxy's public statement of acceptance of any version is permanent authorization for you to choose that version for the Program.
  10. RTFL by tepples · · Score: 2, Informative

    You could do GPLv2 and add a clause to make it compatible with GPLv3. I'm not sure what that clause would say, but I think you can do that. The wording suggested by the FSF for such a clause has been at the bottom of GPLv2 for years:

    This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
  11. Re:GPL: Intellectual Theft by Anonymous Coward · · Score: 2, Informative

    You only have to release the source code to the kernel changes if you plan to distribute the modifications. The GPL's restrictions only apply to distributors. Private use of the software, including changes to the source code, is completely unrestricted. The GPL only applies if you intend to release those modifications to the world. Likewise, the GPL does not say that gcc can only compile code released under the GPL. The license only means that gcc itself is under the GPL, meaning that ordinary use of the program is unrestricted. The GPL doesn't apply to code compiled under gcc and then distributed, only to distribution of gcc itself. Anything you compile with gcc, assuming that all of the source it compiled is entirely your own and not from other sources, can be licensed under the license of your choice.

  12. Be careful and keep your options open. by PAjamian · · Score: 3, Informative

    Here's the problems you will face. If you license under GPL version 2 or later then you can't incorporate code that is licensed under version 3 (but not version 2) into your project (others here seem to imply that you can) until you move up to version 3 yourself. Basically you need to think of it this way, in order to use other people's code in your project your license has to be a subset of their license. In order for others to use your code their license has to be a subset of yours. Here is what I would recommend:

    • License your project as a whole (and all included files) under GPL version 2 or later for now.
    • Continue to License under GPL 2 or later until you need to incorporate code that is licensed under GPL version 3.
    • When you need to include code licensed under GPL 3 or later (try to avoid any code licensed under GPL 3 only) then you can relicense your project as a whole under GPL version 3 or later, but keep most of the individual files licensed under GPL 2 or later. Only those files that include the code that was licensed under GPL 3 or later need to have their license headers changed.
    • If you need to include code licensed under GPL 2 only, then contact the authors and ask for permission to relicense that specific code under GPL 2 or later, most (but not all) will happily give you permission to do that. Barring that you will have to find another source of the code or write it yourself.
    • You can, of course link to libraries licensed under the LGPL, and include code licensed under BSD (as long as you comply with the attribution clause). As of GPL 3 you can also include code licensed under the Apache license, plus there are several licenses (such as the perl license) that are actually dual licenses of GPL plus some other license and code from those can be used freely under the GPL (watch out for what versions they specify). Have a look at the Free Software Foundation License Compatibility Page for more details on lots of licenses and their compatibility to the GPL.
    • Watch out for version numbers. If a program specifies that it is licensed under the GPL (without any version number) then it can be used under any version of the GPL. If a program specifies that it is licensed under GPL Version 2 (or some other specific version number) then you can only use the code under that specific version of the GPL. Most programs will specify version 2 or later (and many will soon change to version 3 or later) which means that you can use the code under that version or (at your option) any later version.

    As for allowing others to use your code, you have some options with that as well:

    • You can dual license, or multi-license specific files in your project so that they are compatible with other licenses you want them to be usable with, just don't forget to remove the other licenses from any files that you include someone else's GPL code in.
    • You can give explicit permission to others to license under other licenses of your choice when they write you and ask, just make sure that you specify which parts of the code they can only use under the GPL (and which versions) due to it not being your code.

    I think this about as comprehensive of a guide as I can give you. I'm not a lawyer or a representative of the Free Software Foundation and my statements above are just opinion and not to be taken as legal advice. I just know what I know and am passing that knowledge on.

    --
    Windows is a bonfire, Linux is the sun. Linux only looks smaller if you lack perspective.
    1. Re:Be careful and keep your options open. by Jamie+Lokier · · Score: 2, Informative

      I'll explain with an example.

      Let's say your file says the equivalent of "You may use this file under the terms of the GPL (v2 or later), LGPL or MPL, at your option". (Mozilla source is triple-licensed like this, I believe).

      Then you want to add code from somebody else's project to your file. Their file says "You may use this file under the terms of the GPL v2".

      When you add their code to your file, if you don't change the licensing at the start of your file, and you publish the new version, you are telling everyone that they are allowed to use the combination under any of the licenses which you listed.

      But you don't have permission to do that.

      The code you used from someone else may only be used under the terms of GPL v2 (in this example). And the GPL v2 does not allow the code to be re-licensed under any of those other license. (If it was BSD instead, you could do that).

      Therefore, you must change the license of your file to say GPL v2 only, or not incorporate their code. (Or you can just not publish the combination - you are free to combine them and use the combination without distributing the result to anyone.)