[Rcpp-devel] Advice on installing CHOLMOD/Suitesparse
Rodney Sparapani
rsparapa at mcw.edu
Thu Aug 30 22:24:06 CEST 2012
On 08/30/2012 02:24 PM, Douglas Bates wrote:
>
> But the RcppEigen package should not access Eigen 3.1.1 headers other
> than the ones that it provides. Yes, in a sane world we would be able
> to install Debian packages of libraries like Eigen 3.1.1, Suitesparse,
> etc. and access the code from an R package. However doing so in a
> portable way is quite nontrivial. The Rcpp and RcppEigen packages
> provide their own header files in the inst/include subdirectory of the
> source package which becomes the include subdirectory of the
> installed package. Packages that use these headers should have
> "LinkingTo: Rcpp, RcppEigen" in their DESCRIPTION file so that these
> header files are found.
>
> So RcppEigen should be completely separate from any Eigen or
> Suitesparse packages that you have installed on your machine. If your
> code is accessing the system Eigen or Suitesparse libraries it will
> all blow up, in the way you have described. Your code should have the
> line
>
> #include<RcppEigen.h>
>
> and nothing else related to Eigen or Suitesparse.
>
> This is all assuming that I haven't accidentally left a line referring
> to cholmod.h in the RcppEigen include files.
>
Dear Doug:
I think I understand all that. But, I am not intentionally co-mingling
sources. For example, this is what I see when I try to install
RcppEigen from source ...
# R CMD INSTALL RcppEigen_0.3.1.tar.gz
* installing to library '/opt/local/lib64/R/library'
* installing *source* package 'RcppEigen' ...
** package 'RcppEigen' successfully unpacked and MD5 sums checked
** libs
g++ -I/opt/local/lib64/R/include -I/opt/local/include
-I"/opt/local/lib64/R/library/Rcpp/include" -I../inst/include -fpic -g
-c RcppEigen.cpp -o RcppEigen.o
In file included from ../inst/include/RcppEigenForward.h:31,
from ../inst/include/RcppEigen.h:25,
from RcppEigen.cpp:22:
/opt/local/include/Eigen/CholmodSupport:9:23: error: cholmod.h: No such
file or directory
Something is pulling in the Eigen header file
/opt/local/include/Eigen/CholmodSupport
--
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