[Rd] Bundling system dependencies in binary packages

Dirk Eddelbuettel edd at debian.org
Tue Dec 2 21:20:08 CET 2014


On 2 December 2014 at 18:34, Louis Aslett wrote:
| I've been hunting round for the accepted method of bundling system
| dependencies into binary packages.
| 
| For example, there are some CRAN packages (e.g. gmp, RcppArmadillo,
| ...) which don't require the system dependencies be installed for the
| Windows and Mac binary builds.  I understand that there are a very
| limited number of packages for which CRAN would do this, so as a first
| step I'm *not* asking how to get this on CRAN, but rather this
| highlights there must be a (fairly automated/easy) mechanism to
| achieve this.  Is it as simple as statically linking?  If so there's
| surely an automated way to trigger this without having to modify
| Makevars to produce the static linked packages?
| 
| The Writing R Extensions manual section on binary packages doesn't
| mention this and I've tried extensive Googling without joy.
| 
| So in a nut shell, I'm looking to bundle a binary version of GMP
| (https://gmplib.org) and FLINT (http://flintlib.org) into my package
| for Windows/Mac users who can't/won't compile the libraries and which
| I can distribute independently of CRAN, but without having to do so in
| a manual/hacky way by tweaking Makevars each time, or modifying the
| tgz/zip produced by R.
| 
| Hope I've been clear enough there.
| 
| Any pointers much appreciated,

I am not certain I fully understand what you are asking, but here is one
optmistic interpretation.

Sometimes you need a binary library present on the system. In some of these
cases, we help CRAN by providing pre-built libraries -- with instructions
which make it reproducible, eg Makefiles.  Sometimes CRAN even helps, ie the
last time we needed a QuantLib update Prof Ripley kindly built one via the
crosscompiler set up on one of his machines.  

Per CRAN Policies, these libraries need to be Open Source, and be buildable
from sources. The sources, and zipfiles, are generally somewhere on the
Oxford archive; pointers are in the appendix of either / both of Writing R
Extensions and R Installation and Administration.  Eg look at

   http://www.stats.ox.ac.uk/pub/Rtools/goodies/

Hope this helps,  Dirk

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



More information about the R-devel mailing list