[Rcpp-devel] Copyright Issue of using 3rd party C/C++ library in R package

Dirk Eddelbuettel edd at debian.org
Sun Sep 8 17:24:26 CEST 2013


Wush,

On 8 September 2013 at 15:40, Wush Wu wrote:
| I am working on the R wrapper of hiredis, which is a C library released under
| BSD license. Since the development package of libhiredis is not available on
| many OS such as Mac OS X,Solaris and Windows, I need to embed the source code
| of hiredis in the package to make it work. 

Not really. 

The decision to include the source, or not, has repercussion; see below. 

I would leave it, both in general, and in this case.  My "fork" and
simplification [ at https://github.com/eddelbuettel/rhiredis ] off your
initial rhiredis attempt works with hiredis as a library. In which case you
have no copyright, author mention, ... issues whatsover.

Also, more narrowly for this case, I am also not convinced that hiredis is
needed. The rredis package is fast:

R> library(rredis)
R> library(xts)
R> X <- xts(matrix(rnorm(1000*10), 1000,10), order.by=Sys.time()+seq(-1000,-1))
R> object.size(X)
90032 bytes
R> redisConnect()
R> system.time(redisSet("foo", X))
   user  system elapsed 
  0.000   0.000   0.001 
R> system.time(X2 <- redisGet("foo"))
   user  system elapsed 
   0.00    0.00    0.04 
R> identical(X,X2)
[1] TRUE
R> 

That is 1 ms to completely serialize and store a 90kb object, and 4ms to
retrieve and unserialize it.  That really does not need hiredis as far as I
can tell.

| I looked into many DESCRIPTION files of CRAN package which contains 3rd party C
| library, but I still cannot understand whether I should merge the author of the
| library into the AUTHOR field or I only need to put the reference of 3rd party
| library in the COPYRIGHT field.

It is inconsistent, but possibly changing. There are old ones that don't have
it, newer ones tend to.
 
| - Sources are provided by the OS, the user should manually download the source

Or use his package manager of choice.  No COPYRIGHT or AUTHOR issue.

| - Sources are embedded in the package but unchanged. The R package links to the
| 3rd party library.

CRAN would say sources in the papckage, with COPYRIGHT and AUTHOR implications.

| - Sources are modified.
| - Reproduce the source file into a single file and put it in the `src`
| directory.

Ditto.
 
| I am not sure if here is a right place to discuss this issue. Please let me
| know if it is inappropriate.

As Romain said, it is a generic packaging issue which you should discuss on r-devel.

Dirk

-- 
Dirk Eddelbuettel | edd at debian.org | http://dirk.eddelbuettel.com


More information about the Rcpp-devel mailing list