6

I apologise for this question but I am really really confused!

If I develop a program that uses R packages published under GPL, in their standard unmodified form in my own source code, will I have to publish the entire source code (i.e. Even RScripts that I write using these packages)?

My interaction with the GPL libraries will only be to use them not modify them. I will just load them using library(packageName) and use their functionality.

Do I have to then publish my software under GPL as well and provide code that I have written as well?

I apologise if this sounds really dumb but I am really confused as you can probably tell.

  • 1
    Do you distribute them? That's really the most important question. – curiousdannii Dec 9 '19 at 2:16
  • 1
    I don't think whether or not the original libraries are distributed makes a difference to whether or not your work is considered derivative. I think the general consensus is that if you use a GPL licensed library, you must release your code under the GPL as well. – Charlim Dec 9 '19 at 5:36
  • Oh, I may have misunderstood the prior comment. To clarify, you do not need to release your code under the GPL if you don't choose to release your program at all. – Charlim Dec 9 '19 at 7:05
  • Thank you very much for clarifying this. So basically I can use R for anything but when I publish I will have to release source code. – Muhammad Ahmad Dec 9 '19 at 7:23
  • 1
    But how can some packages release their code as MIT when they use GPL libraries? There are many examples of this in R packages. – Muhammad Ahmad Dec 9 '19 at 7:24
4

The GPL license states that if you use a library that is licensed under the GPL, then your code is considered to be a derived work of that library.

If you decide to provide your scripts to someone else, then the GPL license requires that you give every recipient the right and the means to make further changes. You must provide source code and you must use a license that is compatible with the GPL. The whole package of your scripts and the used libraries must be offered under the GPL license.

If you use GPL libraries, then the easy option is to use the GPL also for your own scripts (if/when you decide to publish them). A reason to use a different (GPL-compatible) license, like the MIT, could be if it is intended that the scripts can be ported to a different ecosystem where there is no dependency on GPL libraries (python perhaps).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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