Skip to content
Prev 4222 / 10988 Next

[Rcpp-devel] Advice on installing CHOLMOD/Suitesparse

On 08/29/2012 04:42 PM, Douglas Bates wrote:
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