I want to use code written by others and published under gpl2 license, on my software project. I was wondering what is the way to go about it. I hope to publish my software using the gpl3 license. I am very new to this field, so please let me know if I missed any crucial information.
1 Answer
While the GPLv2 and GPLv3 are very similar, they have clauses that make them incompatible. If you combine GPLv2 covered code with GPLv3 covered code, you cannot share the result.
Some GPLv2 software doesn't limit you to the GPLv2, but also allows any later version of the GPL. In that case, you could use that code as if it were GPLv3-licensed.
Without such an upgrade clause, your choices are:
- to not use the code
- to ask the copyright holders to change the license to one they can use (but note that license changes can take a ton of effort because all contributors must agree)
- to wrap the GPLv2 code you want to use in a standalone program that you can launch from your code. For example, wrap the GPLv2 code with a REST API or with a command line interface. It is allowed to distribute programs with different licenses side by side, you just can't always combine them into a single program.
-
@DeepakThomas That seems to be the kind of upgrade clause I meant in my second paragraph. That license allows you to use the GPLv3 (a later version), so no problem exists. Out of interest, which software are you looking at?– amonJun 21, 2019 at 14:22
-
Thanks for letting me know! Here is the link - github.com/jMotif/jmotif-R. It looks like there is only one contributor, so perhaps I can request him/her to upgrade to GPL_v3 Jun 23, 2019 at 1:59
-
@DeepakThomas That software does not have an upgrade clause and is pure GPLv2. Relicensing is unlikely, as the entire R ecosystem is built around GPLv2. Even if they wanted to update their license, they might have GPLv2 dependencies that prevent that. In a similar scenario I wrote a wrapper script in R that offers a server to which I can send JSON messages from my GPLv3 code.– amonJun 23, 2019 at 6:00
-