[Rcpp-devel] Advice on installing CHOLMOD/Suitesparse

Rodney Sparapani rsparapa at mcw.edu
Thu Aug 30 19:41:16 CEST 2012


On 08/29/2012 04:42 PM, Douglas Bates wrote:
> Perhaps you have an out-of-date version of the RcppEigen package (or
> maybe the Mac version hasn't been built or ...).  In any case
> RcppEigenForward should include RcppEigenCholmod.h, not cholmod.h and
> the correct version would be at
> /opt/local/lib64/R/library/RcppEigen/include/RcppEigenCholmod.h

Thank you Doug!  I'm not sure what I did to deserve this.  I have 3
systems with fairly similar installations, but just the one system
is having this problem (of course, it's the one that I really need to
use right now).  For others that may see this issue with v. 0.3.1...

So, what Doug said is correct (as usual), RcppEigen does not require
cholmod.h  However, Eigen 3.1.1 does require cholmod.h  Therefore, in
PREFIX/include/Eigen/CholmodSupport on line 9, there is
#include <cholmod.h>

But, when you install RcppEigen, RcppEigenCholmod.h is included
which conflicts with the previous definitions/declarations that
were brought in above.  So, as a temporary fix, I have replaced
line 9 above with #include <RcppEigenCholmod.h>

This allows you to install RcppEigen.  And the RcppEigen package
will work.  But there may be some unforeseen consequences;
particularly, for Eigen itself rather than RcppEigen.  I
suspect a permanent solution would involve an edit of 
RcppEigenCholmod.h to resolve the conflicts.  After looking at
the two files, it was not immediately clear what needs to be
changed.  But, basically, we could detect whether CHOLMOD_H
is defined and act accordingly.  If you guys think I'm on the
right track, then I could probably figure this out (since I am the
one that can replicate the issue that no one else seems to see).
If not, then please advice.  Thanks
-- 
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