-1

I want to write a small program in the R language, connecting to DB (hence using packages), that I'd like to sell.

As it will connect to DB, on internal networks, that can't be hosted.

I tried to replace all GPL-alike packages to MIT ones... but R in itself is GPL.

Does that mean that I can't write a program, and sell it, at all in R?

UPDATE -- To be sure that the program won't be easily copied, or played with, I do want / need to keep the sources closed. For example, to hinder anyone from commenting the code about the need for a valid product key.

Bonus: Is there a template for "commercial use" licenses?

3
  • 2
    The GPL license doesn't stop you making commercial products at all, so I don't understand what issue you think there is. – curiousdannii Jan 17 at 1:43
  • @curiousdannii I've added an UPDATE section to clarify the point that was missing: about closed sources. Making them open would allow anybody to just remove the need for a public keep, or to publish the code somewhere. – Seb Jan 17 at 9:20
  • s/need for a public keep/need for a public key/ – Seb Jan 17 at 16:22
5

Just because a language and its toolchains are licensed under the GNU GPL does not mean that any software you create with it also needs to be GPL-licensed. The GPL FAQ reads:

Can I use GPL-covered editors such as GNU Emacs to develop nonfree programs? Can I use GPL-covered tools such as GCC to compile them?

Yes, because the copyright on the editors and tools does not cover the code you write. Using them does not place any restrictions, legally, on the license you use for your code.

But you still have to be careful with the libraries you are using. When you create a program which uses a GPL library, then the whole program needs to be GPL.

10
  • I really can't make my way out of this. As stated in cran.r-project.org/doc/FAQ/…, "GPL [only] restricts distribution of R or of other programs containing code from R." – Seb Jan 17 at 15:34
  • Also, I'm reading comments such as "R is GPL. Going to lengths to use non-GPL packages is a great endeavor, but if you're somehow using R to use those packages, then you're using GPL" (see stackoverflow.com/questions/65478810/…); IIUC, that forces me to disclose the sources, doesn't it? – Seb Jan 17 at 15:34
  • I want to add that R is an interpreted language, hence the program we write can't be compiled to a standalone executable file. – Seb Jan 17 at 15:59
  • 3
    @Seb The R interpreter is a program covered by GPL. Your program runs on the R interpreter, but does not include code from the R interpreter. Your program and the R interpreter do not form a single program, so you are not affected by the interpreter's GPL license. However, your program will effectively include any loaded libraries. The comment on the deleted SO question seems incorrect. – amon Jan 17 at 16:38
  • @amon Thx for your comments/answers. 2 questions: 1. My idea was to package (with InnoSetup) R-portable with my lib, so that there would be nothing to do for the user, but extract that package, containing everything needed. Is that a bad idea, then? As I would distribute the R interpreter with my library. Should I instead need the ask the user to install R on his own, and then simply download my package in the right directory? 2. What's the diff between R-interpreter and 3rd-party packages? I need both for my prg to run... so I don't really see the distinction of treatment. – Seb Jan 17 at 17:46

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.