RcppCore / RcppEigen

Rcpp integration for the Eigen templated linear algebra library
Other
110 stars 40 forks source link

Error installing RcppEigen #130

Closed wgmao closed 11 months ago

wgmao commented 11 months ago

I tried to install the library via R CMD INSTALL RcppEigen_0.3.3.9.3.tar.gz, and there was a really weird error message in the end.

** R
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
** building package indices
** installing vignettes
** testing if installed package can be loaded from temporary location
Error: package or namespace load failed for ‘RcppEigen’ in dyn.load(file, DLLpath = DLLpath, ...):
 unable to load shared object '/data/home/user/R/x86_64-pc-linux-gnu-library/4.2/00LOCK-RcppEigen/00new/RcppEigen/libs/RcppEigen.so':
  /data/home/user/R/x86_64-pc-linux-gnu-library/4.2/00LOCK-RcppEigen/00new/RcppEigen/libs/RcppEigen.so: undefined symbol: _Z19RcppEigen_Eigen_SSEv
Error: loading failed
Execution halted
ERROR: loading failed

The last compiling command is as follows x86_64-conda-linux-gnu-g++ -std=gnu++14 -fPIC -g -O2 -shared -L/opt/R/4.2.1/lib64/R/lib -Wl,--rpath,/opt/R/4.2.1/lib64/R/lib,--rpath,/usr/local/gcc/9.4.0/lib64 -o RcppEigen.so RcppEigen.o RcppExports.o fastLm.o init.o -L/opt/R/4.2.1/lib64/R/lib -lRlapack -L/opt/R/4.2.1/lib64/R/lib -lRblas -lgfortran -lm -lquadmath -L/opt/R/4.2.1/lib64/R/lib -lR. Here the version of x86_64-conda-linux-gnu-g++ is 12.1.0. (I also tried version 9.4.0). I tried to specify different flag values -std=gnu++11, -std=gnu++14 and -std=gnu++17.

All combinations lead to the same error message. Could you help resolve this issue? Thanks!

eddelbuettel commented 11 months ago

You appear to be on Conda, so I would kindly ask you to resolve this with Conda folks. I work with, and ship to, CRAN and CRAN has zero overlap with Conda.

CRAN packages work. Sorry, I am not a Conda user or expert so there is no help I can offer. You could try the rcpp-devel list.

eddelbuettel commented 11 months ago

Also because RcppEigen is used by lme4 and a number of other 'critical' package I am sure Conda folks would know if something systematic was amiss. So that makes me think it may be your setup or toolchain. Maybe try the RcppEigen binary from Conda?

wgmao commented 11 months ago

Thank you for the suggestion. I tried to recompiled R and did a bunch of experiments with g++/gcc experiments and the problem resolved on its own.

eddelbuettel commented 11 months ago

It is super tedious when it happens because the errors are far from clear but ... it happens, and rebuilds tend to help.