From jeffrey.ryan at lemnica.com  Wed Aug 31 17:34:38 2011
From: jeffrey.ryan at lemnica.com (Jeffrey Ryan)
Date: Wed, 31 Aug 2011 10:34:38 -0500
Subject: [Rd] Non-GPL C (or R) inside of a package
In-Reply-To: <alpine.LFD.2.02.1108302118390.1833@gannet.stats.ox.ac.uk>
References: <CABDUZc-ML9bzu=zyHqptDEQehDQkMqpGZPRd-j=pnWvk+4ioog@mail.gmail.com>
	<4E5D355C.1090205@gmail.com>
	<alpine.LFD.2.02.1108302118390.1833@gannet.stats.ox.ac.uk>
Message-ID: <CABDUZc8wCtL6ntuZV22=yu1kxw_xsW6CpAze22vKp3dpOkaoSg@mail.gmail.com>

On Tue, Aug 30, 2011 at 3:52 PM, Prof Brian Ripley
<ripley at stats.ox.ac.uk> wrote:
>
> On Tue, 30 Aug 2011, Duncan Murdoch wrote:
>
>> On 30/08/2011 1:50 PM, Jeffrey Ryan wrote:
>>>
>>> R-devel,
>>>
>>> I am interested in creating a package that requires non-GPL'd (commercial) C code to work. ?In essence it is a single .c file with no use of R headers (all .C callable functions). ?For example's sake:
>>>
>>> ? 1 #include<stdio.h>
>>> ? 2
>>> ? 3 void test (int *a) {
>>> ? 4 ? *a = 101;
>>> ? 5 }
>>>
>>> The package isn't destined for CRAN, and I realize that this isn't R-legal, but looking for some expert advice from anyone else who may have encountered this previously.
>>>
>>> The question is whether or not one can distribute code that has multiple licenses (.c or individual .R files), including some that are not GPL-compatible, as a tar.gz (or binary) file. ?i.e., does the packaging process [R CMD ***] cause everything to become GPL, as we are using R itself to build the package?
>>>
>> I can only say that the answer to the last question is "no": ?the author gets to choose the license for what s/he wrote. ?The fact that you used R to package it is irrelevant. ?(Some extremists will disagree, and say that because your package is intended to "link" to R, it must be licensed compatibly with the GPL if you distribute it. ?I don't think that's true.)
>
> If no distribution is involved, the conditions under which the tarball can be distributed is not relevant.
>
> As e.g. GNU tar is itself under GPL, using R to do the packaging is no different in principle to using GNU tar to do so and I've never heard anyone argue that using GNU tar affects the licence of the tarball.

Good point. ?Thanks.
>
> I don't think that is the same issue as distributing non-GPLed code for use with R. ?In the latter case the issue is what 'link to' actually entails, and one source of advice is the GPL FAQs. ?E.g.
> http://www.gnu.org/licenses/old-licenses/gpl-2.0-faq.html
> http://www.gnu.org/licenses/gpl-faq.html

I do think this is the same issue. ?The key part of that rather
wandering FAQ to me is:

http://www.gnu.org/licenses/gpl-faq.html#IfInterpreterIsGPL

Which states:

"Another similar and very common case is to provide libraries with the
interpreter which are themselves interpreted. For instance, Perl comes
with many Perl modules, and a Java implementation comes with many Java
classes. These libraries and the programs that call them are always
dynamically linked together.

A consequence is that if you choose to use GPL'd Perl modules or Java
classes in your program, you must release the program in a
GPL-compatible way, regardless of the license used in the Perl or Java
interpreter that the combined Perl or Java program will run on."

In my own terms, this seems to say using *ANY* GPL code in your
program - even if interpretted at some later point - forces all code
to be GPLed.  e.g. A script that creates a simple vector using
something like "v = 1:10" is using the GPLed base package and
therefore must be GPLed itself.

My case is a bit more subtle, as the code that I am writing makes no
use of any GPL code, aside from the compilation and linking to allow
GPL "R" code to access it.

Jeff

>
>> If you are intending to distribute this file you are putting together, you'll probably want to consult someone who knows the legalities as to whether you can legally link to the commercial library...
>
>
>
>>
>> Duncan Murdoch
>>
>>> I can of course provide the C libs in this case as a separate install, but
>>> that adds complexity to the overall build and install process.
>>>
>>> Thanks,
>>> Jeff
>>>
>>
>> ______________________________________________
>> R-devel at r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-devel
>>
>
> --
> Brian D. Ripley, ? ? ? ? ? ? ? ? ?ripley at stats.ox.ac.uk
> Professor of Applied Statistics, ?http://www.stats.ox.ac.uk/~ripley/
> University of Oxford, ? ? ? ? ? ? Tel: ?+44 1865 272861 (self)
> 1 South Parks Road, ? ? ? ? ? ? ? ? ? ? +44 1865 272866 (PA)
> Oxford OX1 3TG, UK ? ? ? ? ? ? ? ?Fax: ?+44 1865 272595
>
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel



--
Jeffrey Ryan
jeffrey.ryan at lemnica.com

www.lemnica.com
www.esotericR.com



[Rd] Non-GPL C (or R) inside of a package
Jeffrey Ryan