[R-pkg-devel] Using the correct R binary in configure script

Jack Wasey jack at jackwasey.com
Sat Sep 26 16:27:32 CEST 2015


Hello,

Having just read section 1.2 in Writing R extensions, a fragment of a
configure script is offered in order to determine the correct compiler
options. It starts by setting R_HOME with:

: ${R_HOME=`R RHOME`}


`R` is called, even if, as in my case, `Rdevel` is the command used to
invoke package compilation. This can be overridden by setting R_HOME
in the call to `Rdevel`, but this seems to be undesirable, since the
whole point of a configure script is that it sets up the package given
the constraints of the compiling environment.

My particular problem is that I have docker images with plain R in
/usr/bin/R, and R-devel with sanitizers in /usr/local/bin/Rdevel.
These have different compiler flags, and if I `Rdevel CMD INSTALL
mypackage` then it configures itself for the plain `R` environment.

Things are unfolding at:
https://github.com/jackwasey/rocker-ubsan
and
https://github.com/jackwasey/icd9/tree/issue75/tools

Am I doing something wrong?

Thanks for your advice,

Jack



More information about the R-package-devel mailing list