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

Dirk Eddelbuettel edd at debian.org
Thu Aug 25 15:58:01 CEST 2011


On 25 August 2011 at 22:34, Darren Cook wrote:
| > | I get these errors:
| > | 
| > | make: WARNING:: Command not found
| > | make: WARNING:: Command not found
| > ...
| > | So RInside and all its deps are correctly installed, and I'm wondering
| > | if the Makefile is depending on some other system configuration that I
| > | don't have?
| > 
| > It is really just a shell / Makefile interaction as you can see in the
| > Makefile.  Works for me and many others too....
| 
| 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. :-(

I see.  Classic local fsck up though :)
 
| One idea for a Makefile fix is: only setting R_HOME if no environment
| variable already set. 

Patches welcome.  I think there is even an idiom for that but I always get
lost whether that was shell or makefile syntax.

| 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?

Yes. Many R (Core) developers have several R installations and use $PATH or
other variables to point to it. This can reflect it. 

If you need something different you can always hardcode it. It /just/ an
example Makefile and I do not plan to replace or augment it with a full-blown
configure script.
 
| 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.

Still "merely" your issue and nothing that generalizes. I happen to be the
Debian maintainer for R, and hence also indirectly behind what may be a few
ten thousand (or more?) Ubuntu R installations which "just work" if you use
them as packaged, either by the distro or via the more current backports from
CRAN.  

If someone breaks their local R installation by various enhancements, they
get to keep the pieces. And you can always apply to get your money
back. Transfers of zero dollars are near-instantaneous.

Cheers,  Dirk


| -- 
| Darren Cook, Software Researcher/Developer
| 
| http://dcook.org/work/ (About me and my work)
| http://dcook.org/blogs.html (My blogs and articles)
| _______________________________________________
| Rcpp-devel mailing list
| Rcpp-devel at lists.r-forge.r-project.org
| https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel

-- 
Two new Rcpp master classes for R and C++ integration scheduled for 
New York (Sep 24) and San Francisco (Oct 8), more details are at
http://dirk.eddelbuettel.com/blog/2011/08/04#rcpp_classes_2011-09_and_2011-10
http://www.revolutionanalytics.com/products/training/public/rcpp-master-class.php


More information about the Rcpp-devel mailing list