Skip to content
Prev 2774 / 10988 Next

[Rcpp-devel] RInside: compiling examples (ubuntu)

Thanks, Dirk, for the makefile debugging tip. It seems this line:
   R_HOME := 		$(shell R RHOME)

goes horribly wrong if R reports a warning. It was outputting:
  WARNING: ignoring environment value of R_HOME
  /usr/lib64/R

I cannot find any commandline parameters that will shut it up. :-(

One idea for a Makefile fix is: only setting R_HOME if no environment
variable already set. Is there a use case where someone has set R_HOME
in their environment, but does not want to use it, and instead wants to
use what "R RHOME" outputs?

Darren

P.S. Going back to my machine it appears that R_HOME is set to
/usr/lib/R; when I explicitly set it to /usr/lib64/R the warning goes away.
/usr/lib64 is a symlink to /usr/lib, so the warning is just noise. It
has not affected compiling any R packages, or using Rcpp, inline, etc.

The problem setting was found in /etc/environment, and may have been
leftover from an earlier R installation. Also, it seems the "R RHOME"
command is hyper-sensitive: If I set R_HOME to "/usr/lib64/R/" it still
complains. I need to remove the trailing slash to appease it.