[Rcpp-devel] Advice on installing CHOLMOD/Suitesparse

Rodney Sparapani rsparapa at mcw.edu
Fri Aug 31 15:51:21 CEST 2012


On 08/30/2012 05:53 PM, Douglas Bates wrote:

>
> You're right.  I didn't see that -I/opt/local/include was in the
> compiler call.  If you look at $RHOME/etc/Makeconf you will probably
> see that
>
> CPPFLAGS=-I/opt/local/include
>

Correct!

> (in my case /usr/local/include) for reasons that are somewhat
> mysterious to me.  It seems like the sort of thing that a prominent
> member of R-core would yell and scream about if he had not put that
> there himself.
>

I can't blame anyone else.  That's part of our standard setup which
was working beautifully until 2 days ago.  But, I will re-think it.

> It happens that the Ubuntu package for eigen3 installs the Eigen
> header files in /usr/include/eigen3 so I don't get bitten by that.
>
> It seems that you options are 1) Change R's default CPPFLAGS, which
> seems unlikely to happen or 2) change the location of the Eigen header
> files.

When the next release of R appears, #1 is probably what I should look
into since it is probably self-inflicted and, otherwise, may lead to
other unusual bug reports in the future.  For a quick and dirty fix,
I tweaked my original hack (after playing around with the
cpp flag -I- and giving up in frustration).  Replace line 9 of
PREFIX/include/Eigen/CholmodSupport with

#ifdef RcppEigen__RcppEigen__h
#include <RcppEigenCholmod.h>
#else
#include <suitesparse/cholmod.h>
#endif

Thanks for all of your help!
-- 
Rodney Sparapani, PhD  Center for Patient Care and Outcomes Research
Sr. Biostatistician               http://www.mcw.edu/pcor
4 wheels good, 2 wheels better!   Medical College of Wisconsin (MCW)
WWLD?:  What Would Lombardi Do?   Milwaukee, WI, USA


More information about the Rcpp-devel mailing list