RcppCore / RcppEigen

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

Unable to install v0.3.3.9.3 (zero exis status, warning: ignoring attributes on template argument ‘__m128) #116

Closed LauraMLidon closed 1 year ago

LauraMLidon commented 1 year ago

I had problems installing Hmisc as RcppEigen (and LatticeExtra, and lm4...) had non zero exit status. It is R version 3.6.1 server (Linux) I will just attach the beggining and the end of the log. Mi solution has been to install v0.3.3.9.2 via RcppEigen archive, of someone needs it:

packageurl <- "https://cran.r-project.org/src/contrib/Archive/RcppEigen/RcppEigen_0.3.3.9.2.tar.gz"
install.packages(packageurl, repos=NULL, type="source")

I hope I can update to the last version soon.

Best regards, Laura M Lidon

LOG:

> install.packages("RcppEigen")
Installing package into ‘/home/llidon/R/x86_64-pc-linux-gnu-library/3.6’
(as ‘lib’ is unspecified)
[log_install_rcppeigen.txt](https://github.com/RcppCore/RcppEigen/files/9949671/log_install_rcppeigen.txt)

probando la URL 'https://cloud.r-project.org/src/contrib/RcppEigen_0.3.3.9.3.tar.gz'
Content type 'application/x-gzip' length 1470790 bytes (1.4 MB)
==================================================
downloaded 1.4 MB

* installing *source* package ‘RcppEigen’ ...
** package ‘RcppEigen’ successfully unpacked and MD5 sums checked
** using staged installation
** libs
g++ -std=gnu++11 -I"/usr/share/R/include" -DNDEBUG  -I"/home/llidon/R/x86_64-pc-linux-gnu-library/3.6/Rcpp/include"  -I../inst/include -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-uuRxut/r-base-3.6.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c RcppEigen.cpp -o RcppEigen.o
In file included from ../inst/include/Eigen/Core:397:0,
                 from ../inst/include/Eigen/Dense:1,
                 from ../inst/include/RcppEigenForward.h:30,
                 from ../inst/include/RcppEigen.h:25,
                 from RcppEigen.cpp:22:
../inst/include/Eigen/src/Core/arch/SSE/PacketMath.h:60:39: warning: ignoring attributes on template argument ‘__m128 {aka __vector(4) float}’ [-Wignored-attributes]
 template<> struct is_arithmetic<__m128>  { enum { value = true }; };
                                       ^
../inst/include/Eigen/src/Core/arch/SSE/PacketMath.h:61:40: warning: ignoring attributes on template argument ‘__m128i {aka __vector(2) long long int}’ [-Wignored-attributes]
 template<> struct is_arithmetic<__m128i> { enum { value = true }; };
                                        ^
../inst/include/Eigen/src/Core/arch/SSE/PacketMath.h:62:40: warning: ignoring attributes on template argument ‘__m128d {aka __vector(2) double}’ [-Wignored-attributes]
 template<> struct is_arithmetic<__m128d> { enum { value = true }; };

[...]

../inst/include/Eigen/src/Core/PlainObjectBase.h:714:32:   required from ‘Derived& Eigen::PlainObjectBase<Derived>::_set(const Eigen::DenseBase<OtherDerived>&) [with OtherDerived = Eigen::Product<Eigen::Product<Eigen::Product<Eigen::Matrix<double, -1, -1>, Eigen::Transpose<const Eigen::Matrix<double, -1, -1> >, 0>, Eigen::Transpose<const Eigen::Map<Eigen::Matrix<double, -1, -1>, 0, Eigen::Stride<0, 0> > >, 0>, Eigen::Map<Eigen::Matrix<double, -1, 1>, 0, Eigen::Stride<0, 0> >, 0>; Derived = Eigen::Matrix<double, -1, 1>]’
../inst/include/Eigen/src/Core/Matrix.h:225:24:   required from ‘Eigen::Matrix<_Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols>& Eigen::Matrix<_Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols>::operator=(const Eigen::DenseBase<OtherDerived>&) [with OtherDerived = Eigen::Product<Eigen::Product<Eigen::Product<Eigen::Matrix<double, -1, -1>, Eigen::Transpose<const Eigen::Matrix<double, -1, -1> >, 0>, Eigen::Transpose<const Eigen::Map<Eigen::Matrix<double, -1, -1>, 0, Eigen::Stride<0, 0> > >, 0>, Eigen::Map<Eigen::Matrix<double, -1, 1>, 0, Eigen::Stride<0, 0> >, 0>; _Scalar = double; int _Rows = -1; int _Cols = 1; int _Options = 0; int _MaxRows = -1; int _MaxCols = 1]’
fastLm.cpp:179:55:   required from here
../inst/include/Eigen/src/Core/CoreEvaluators.h:960:8: warning: ignoring attributes on template argument ‘Eigen::internal::packet_traits<double>::type {aka __vector(2) double}’ [-Wignored-attributes]
/usr/lib/R/etc/Makeconf:176: recipe for target 'fastLm.o' failed
make: *** [fastLm.o] Error 1
ERROR: compilation failed for package ‘RcppEigen’
* removing ‘/home/llidon/R/x86_64-pc-linux-gnu-library/3.6/RcppEigen’

The downloaded source packages are in
    ‘/tmp/RtmpWbIfZN/downloaded_packages’
Warning message:
[log_install_rcppeigen.txt](https://github.com/RcppCore/RcppEigen/files/9949666/log_install_rcppeigen.txt)

In install.packages("RcppEigen") :
  installation of package ‘RcppEigen’ had non-zero exit status
> 
> 
eddelbuettel commented 1 year ago

You are using R 3.6.1 which is old. I suspect your compiler is old too. Some details will help:

(Also, it helps to format the posts. This is standard markdown so I applied two 'code segment' format regions to your post. See e.g. here for more.)

LauraMLidon commented 1 year ago

Yes, it is gcc 7.5.0 for Ubuntu 18.04, a "little bit" old, but in documentation said it would work and I cannot update the version for other reasons, so I thought it wouldn't be a problem.

However, I have a similar error when trying to update my 4.2.1 Client R in Windows 10 using again the "package url" trick. If I try update.packages("RcppEigen"), it keeps my previously installed 0.3.3.9.2 version of the package. I checked RTools too, but it is already in the last version.


> packageurl <- "https://cran.r-project.org/src/contrib/RcppEigen_0.3.3.9.3.tar.gz"
> install.packages(packageurl, repos=NULL, type="source")
WARNING: Rtools is required to build R packages but is not currently installed. Please download and install the appropriate version of Rtools before proceeding:

https://cran.rstudio.com/bin/windows/Rtools/
Installing package into ‘C:/Users/Laura/AppData/Local/R/win-library/4.2’
(as ‘lib’ is unspecified)
trying URL 'https://cran.r-project.org/src/contrib/RcppEigen_0.3.3.9.3.tar.gz'
Content type 'application/x-gzip' length 1470790 bytes (1.4 MB)
downloaded 1.4 MB

* installing *source* package 'RcppEigen' ...
** package 'RcppEigen' successfully unpacked and MD5 sums checked
** using staged installation
** libs
Warning in system(cmd) : 'make' not found
ERROR: compilation failed for package 'RcppEigen'
* removing 'C:/Users/Laura/AppData/Local/R/win-library/4.2/RcppEigen'
* restoring previous 'C:/Users/Laura/AppData/Local/R/win-library/4.2/RcppEigen'
Warning in install.packages :
  installation of package ‘C:/Users/Laura/AppData/Local/Temp/RtmpMvyDBo/downloaded_packages/RcppEigen_0.3.3.9.3.tar.gz’ had non-zero exit status
eddelbuettel commented 1 year ago

I think with 18.04 you are on your own. I don't want to come across as impolite but this combines

You are simply outside of the (fairly extended) matrix (or "cross-product") of OS release, R release and package release. As a volunteer maintainer for all the packages I look after I gladly support use case "inside that test matrix". In your case I would recommend you stick with the versions that were current when the compiler or R versions were current. CRAN gives you access to the older source packages.

Lastly, as you are on Ubuntu, you can also do sudo apt-get install r-cran-rcppeigen which will work too. I am also the Debian maintainer of that package -- you will of course get a much older version: https://packages.ubuntu.com/source/bionic/r-cran-rcppeigen That will install without effort.

LauraMLidon commented 1 year ago

I just had to install again RTools in Windows and it worked. Yes, as you said it looks like a compatibility problem. I know it is and old version but the decision it's not mine to make, and you know what they say: 'if it runs, don't change it'. We all know this day had to come, but as most of packages keep depending of R (≥ 3.6.0), we find problems after they happen. Anyway, thank you for your time. Laura M Lidon

PD: I already did "sudo apt-get install r-cran-rcppeigen" but it didn't work