[R-pkg-devel] Package with external non-Windows C library
edd at debian.org
Wed Aug 19 21:12:49 CEST 2015
On 19 August 2015 at 18:39, Simon David Jacobs wrote:
| I am trying to write an R package that relies on an external C library. My
| understanding is that the prefered method is to include the C library in
| the `src' folder of the package. I'm running into two problems that may
There are examples for both approaches on CRAN (even within my packages). It
can get tricky with more obscure libraries; snap by be an example for that.
| prevent this package from being distributed on CRAN:
| 1) The library is a standard configure; make; make install build. I don't
| think it will be able to be installed on Windows without cygwin. Does this
| automatically disqualify my package from being distributed on CRAN?
It's complicated. You could try pre-creating Makefiles for windows. You
could exclude Windows (at least at the beginning).
| 2) The library's makefiles have GNU extensions, leading to the following
| WARNING with R CMD check:
| * checking for GNU extensions in Makefiles ... WARNING
| Found the following file(s) containing GNU extensions:
| Portable Makefiles do not use GNU extensions such as +=, :=, $(shell),
| $(wildcard), ifeq ... endif. See section ŒWriting portable packages¹ in
| the ŒWriting R Extensions¹ manual.
| Is there a possible workaround here without porting the library? FYI, the
Yes, either rename each Makefile to GNUmakefile, or add 'GNU make' to
| library in question is the SNAP graph code:
| Thanks in advance.
| Simon Jacobs
| Research Programmer
| Research Computing Center
| University of Chicago
| sdjacobs at uchicago.edu
| R-package-devel at r-project.org mailing list
http://dirk.eddelbuettel.com | @eddelbuettel | edd at debian.org
More information about the R-package-devel