Skip to content

[Rcpp-devel] Rcpp 0.10.1 and RcppEigen

5 messages · Kasper Daniel Hansen, Dirk Eddelbuettel, Romain Francois

#
Rcpp 0.10.1 was released yesterday (?).  Installing it breaks
RcppEigen and RcppArmadillo (same error message).  Reinstalling the
packages fixes RcppArmadillo, but not RcppEigen.

The error I get from compiling RcppEigen (version 0.3.1) is

/hpscc/usr/local/gcc-4.1.2/install/R/R-devel/lib64/R/site-library/Rcpp/include/Rcpp/as.h:55:
  instantiated from ?T Rcpp::internal::as(SEXPREC*,
Rcpp::traits::r_type_generic_tag) [with T =
Eigen::Map<Eigen::Matrix<double, -0x00000000000000001, 1, 0,
-0x00000000000000001, 1>, 0, Eigen::Stride<0, 0> >]?
/hpscc/usr/local/gcc-4.1.2/install/R/R-devel/lib64/R/site-library/Rcpp/include/Rcpp/as.h:100:
  instantiated from ?T Rcpp::as(SEXPREC*) [with T =
Eigen::Map<Eigen::Matrix<double, -0x00000000000000001, 1, 0,
-0x00000000000000001, 1>, 0, Eigen::Stride<0, 0> >]?
fastLm.cpp:208:   instantiated from here
../inst/include/RcppEigenWrap.h:169: error: no matching function for
call to ?r_vector_start(SEXPREC*&)?
make: *** [fastLm.o] Error 1
ERROR: compilation failed for package ?RcppEigen?

This translates to the following error when I load the already
installed version of RcppEigen:
Loading required package: Rcpp
Loading required package: Matrix
Loading required package: lattice
Error in dyn.load(file, DLLpath = DLLpath, ...) :
  unable to load shared object
'/hpscc/usr/local/gcc-4.1.2/install/R/R-devel/lib64/R/site-library/RcppEigen/libs/RcppEigen.so':
  /hpscc/usr/local/gcc-4.1.2/install/R/R-devel/lib64/R/site-library/RcppEigen/libs/RcppEigen.so:
undefined symbol:
_ZN4Rcpp8internal14r_vector_startILi10EiEEPT0_P7SEXPREC
Error: package or namespace load failed for ?RcppEigen?

I got the same error for RcppArmadillo (0.3.4.4) when doing
library(RcppArmadillo), but this was fixed re-installing the package
(unlike RcppEigen).

This may be something you are aware of.  I am mostly using RcppEigen
through a chain of dependencies.

I am on a fairly old system, with GCC 4.2.1 under Redhat Enterprise
Linux version 4.  This is for our cluster, so it is not easy for me to
update.

Kasper
#
On 27 November 2012 at 16:54, Kasper Daniel Hansen wrote:
| Rcpp 0.10.1 was released yesterday (?).  Installing it breaks

Wrapped up yesterday evening Chicago time, arrived on CRAN this morning,
CRANberries chronicles this well.  I'll blog the announcement this evening...

| RcppEigen and RcppArmadillo (same error message).  Reinstalling the
| packages fixes RcppArmadillo, but not RcppEigen.

Yes. A few things:

 a) binary interfaces changed; modules package are borked; other packages
    most likely too; so what you have installed you may need to reinstall

 b) as we learned from Kurt, we broked RcppEigen and (the less widely used)
    RcppOctave, maybe more; we are looking into this

 c) on the bright side, cda builds again :) and there are a lots of new
    features and fixes

I am at work so no more detail now.
 
| The error I get from compiling RcppEigen (version 0.3.1) is
| 
| /hpscc/usr/local/gcc-4.1.2/install/R/R-devel/lib64/R/site-library/Rcpp/include/Rcpp/as.h:55:
|   instantiated from ?T Rcpp::internal::as(SEXPREC*,
| Rcpp::traits::r_type_generic_tag) [with T =
| Eigen::Map<Eigen::Matrix<double, -0x00000000000000001, 1, 0,
| -0x00000000000000001, 1>, 0, Eigen::Stride<0, 0> >]?
| /hpscc/usr/local/gcc-4.1.2/install/R/R-devel/lib64/R/site-library/Rcpp/include/Rcpp/as.h:100:
|   instantiated from ?T Rcpp::as(SEXPREC*) [with T =
| Eigen::Map<Eigen::Matrix<double, -0x00000000000000001, 1, 0,
| -0x00000000000000001, 1>, 0, Eigen::Stride<0, 0> >]?
| fastLm.cpp:208:   instantiated from here
| ../inst/include/RcppEigenWrap.h:169: error: no matching function for
| call to ?r_vector_start(SEXPREC*&)?
| make: *** [fastLm.o] Error 1
| ERROR: compilation failed for package ?RcppEigen?
| 
| This translates to the following error when I load the already
| installed version of RcppEigen:
| 
| > library(RcppEigen)
| Loading required package: Rcpp
| Loading required package: Matrix
| Loading required package: lattice
| Error in dyn.load(file, DLLpath = DLLpath, ...) :
|   unable to load shared object
| '/hpscc/usr/local/gcc-4.1.2/install/R/R-devel/lib64/R/site-library/RcppEigen/libs/RcppEigen.so':
|   /hpscc/usr/local/gcc-4.1.2/install/R/R-devel/lib64/R/site-library/RcppEigen/libs/RcppEigen.so:
| undefined symbol:
| _ZN4Rcpp8internal14r_vector_startILi10EiEEPT0_P7SEXPREC
| Error: package or namespace load failed for ?RcppEigen?
| 
| I got the same error for RcppArmadillo (0.3.4.4) when doing
| library(RcppArmadillo), but this was fixed re-installing the package

Right.

| (unlike RcppEigen).

May need refreshed template magic. To be seen.
 
| This may be something you are aware of.  I am mostly using RcppEigen
| through a chain of dependencies.
| 
| I am on a fairly old system, with GCC 4.2.1 under Redhat Enterprise
| Linux version 4.  This is for our cluster, so it is not easy for me to
| update.

Roll back to 0.10.0 then if that works better for you.

Sorry about the breakage.  

Dirk
#
Hello,

I know how to fix RcppEigen, which I will do once I'm home tomorrow at 
best.
The code is using a template that I consider implementation detail in 
Rcpp, which apparently I used in RcppEigen as if it was part of the API. 
When things like this happen, things like that happen.

If anyone wants to fix it before me, it is essentially just about 
removing one template argument from r_vector_start call.

Romain

Le 2012-11-27 22:54, Kasper Daniel Hansen a ?crit?:
#
rev 4048 should fix RcppEigen. I made it require Rcpp 0.10.1, but it 
should not need to.

Le 2012-11-28 07:38, romain at r-enthusiasts.com a ?crit?:
#
revision 4049 should really fix RcppEigen. I have checked against unit 
test from home this time ... as opposed to check that the package 
compiles from some free wifi in a mall.

Romain

Le 27/11/12 22:54, Kasper Daniel Hansen a ?crit :