RcppArmadillo: Failed to install on CentOS

I am trying to install RcppArmadillo on CentOS. Here are some details about the environment:

OS: CentOS release 6.5 (Final)
R version: R-3.1.2-1.el6.x86_64
uname -sr: Linux 2.6.32-431.29.2.el6.x86_64
gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-11)

      

Below I list the error message I get when running install.packages("RcppArmadillo")

from inside R. Any help is greatly appreciated. Greetings.

* installing *source* package ā€˜RcppArmadilloā€™ ...
** package ā€˜RcppArmadilloā€™ successfully unpacked and MD5 sums checked
* checking LAPACK_LIBS: divide-and-conquer complex SVD available via R-supplied LAPACK
** libs
g++ -m64 -I/usr/include/R -DNDEBUG  -I/usr/local/include -I"/home/rexec/R/library/Rcpp/include"  -I../inst/include -fpic  -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic  -c RcppArmadillo.cpp -o RcppArmadillo.o
In file included from ../inst/include/armadillo:97,
             from ../inst/include/RcppArmadilloForward.h:46,
             from ../inst/include/RcppArmadillo.h:30,
             from RcppArmadillo.cpp:22:
../inst/include/armadillo_bits/traits.hpp: In instantiation of ā€˜const bool arma::is_arma_type<std::__traitor<std::__is_integer<unsigned int>, std::__is_floating<unsigned int> >::<anonymous enum> >::valueā€™:
../inst/include/armadillo_bits/op_expmat_meat.hpp:51:   instantiated from here
../inst/include/armadillo_bits/traits.hpp:614: error: ā€˜std::__traitor<std::__is_integer<unsigned int>, std::__is_floating<unsigned int> >::<anonymous enum>ā€™ is/uses anonymous type
../inst/include/armadillo_bits/traits.hpp:614: error:   trying to instantiate ā€˜template<class T> struct arma::is_subview_elem2ā€™
../inst/include/armadillo_bits/traits.hpp:614: error: ā€˜std::__traitor<std::__is_integer<unsigned int>, std::__is_floating<unsigned int> >::<anonymous enum>ā€™ is/uses anonymous type
../inst/include/armadillo_bits/traits.hpp:614: error:   trying to instantiate ā€˜template<class T> struct arma::is_subview_elem1ā€™
../inst/include/armadillo_bits/traits.hpp:614: error: ā€˜std::__traitor<std::__is_integer<unsigned int>, std::__is_floating<unsigned int> >::<anonymous enum>ā€™ is/uses anonymous type
../inst/include/armadillo_bits/traits.hpp:614: error:   trying to instantiate ā€˜template<class T> struct arma::is_subview_colā€™
../inst/include/armadillo_bits/traits.hpp:614: error: ā€˜std::__traitor<std::__is_integer<unsigned int>, std::__is_floating<unsigned int> >::<anonymous enum>ā€™ is/uses anonymous type
../inst/include/armadillo_bits/traits.hpp:614: error:   trying to instantiate ā€˜template<class T> struct arma::is_subview_rowā€™
../inst/include/armadillo_bits/traits.hpp:614: error: ā€˜std::__traitor<std::__is_integer<unsigned int>, std::__is_floating<unsigned int> >::<anonymous enum>ā€™ is/uses anonymous type
../inst/include/armadillo_bits/traits.hpp:614: error:   trying to instantiate ā€˜template<class T> struct arma::is_subviewā€™
../inst/include/armadillo_bits/traits.hpp:614: error: ā€˜std::__traitor<std::__is_integer<unsigned int>, std::__is_floating<unsigned int> >::<anonymous enum>ā€™ is/uses anonymous type
../inst/include/armadillo_bits/traits.hpp:614: error:   trying to instantiate ā€˜template<class T>     struct arma::is_diagviewā€™
../inst/include/armadillo_bits/traits.hpp:614: error: ā€˜std::__traitor<std::__is_integer<unsigned int>, std::__is_floating<unsigned int> >::<anonymous enum>ā€™ is/uses anonymous type
../inst/include/armadillo_bits/traits.hpp:614: error:   trying to instantiate ā€˜template<class T> struct arma::is_mtGlueā€™
../inst/include/armadillo_bits/traits.hpp:614: error: ā€˜std::__traitor<std::__is_integer<unsigned int>, std::__is_floating<unsigned int> >::<anonymous enum>ā€™ is/uses anonymous type
../inst/include/armadillo_bits/traits.hpp:614: error:   trying to instantiate ā€˜template<class T> struct arma::is_mtOpā€™
../inst/include/armadillo_bits/traits.hpp:614: error: ā€˜std::__traitor<std::__is_integer<unsigned int>, std::__is_floating<unsigned int> >::<anonymous enum>ā€™ is/uses anonymous type
../inst/include/armadillo_bits/traits.hpp:614: error:   trying to instantiate ā€˜template<class T> struct arma::is_eGlueā€™
../inst/include/armadillo_bits/traits.hpp:614: error: ā€˜std::__traitor<std::__is_integer<unsigned int>, std::__is_floating<unsigned int> >::<anonymous enum>ā€™ is/uses anonymous type
../inst/include/armadillo_bits/traits.hpp:614: error:   trying to instantiate ā€˜template<class T> struct arma::is_eOpā€™
../inst/include/armadillo_bits/traits.hpp:614: error: ā€˜std::__traitor<std::__is_integer<unsigned int>, std::__is_floating<unsigned int> >::<anonymous enum>ā€™ is/uses anonymous type
../inst/include/armadillo_bits/traits.hpp:614: error:   trying to instantiate ā€˜template<class T> struct arma::is_Glueā€™
../inst/include/armadillo_bits/traits.hpp:614: error: ā€˜std::__traitor<std::__is_integer<unsigned int>, std::__is_floating<unsigned int> >::<anonymous enum>ā€™ is/uses anonymous type
../inst/include/armadillo_bits/traits.hpp:614: error:   trying to instantiate ā€˜template<class T> struct arma::is_Opā€™
../inst/include/armadillo_bits/traits.hpp:614: error: ā€˜std::__traitor<std::__is_integer<unsigned int>, std::__is_floating<unsigned int> >::<anonymous enum>ā€™ is/uses anonymous type
../inst/include/armadillo_bits/traits.hpp:614: error:   trying to instantiate ā€˜template<class T> struct arma::is_Genā€™
../inst/include/armadillo_bits/traits.hpp:614: error: ā€˜std::__traitor<std::__is_integer<unsigned int>, std::__is_floating<unsigned int> >::<anonymous enum>ā€™ is/uses anonymous type
../inst/include/armadillo_bits/traits.hpp:614: error:   trying to instantiate ā€˜template<class T> struct arma::is_Matā€™
../inst/include/armadillo_bits/traits.hpp: In instantiation of ā€˜const bool arma::is_arma_type<std::__traitor<std::__is_integer<double>, std::__is_floating<double> >::<anonymous enum> >::valueā€™:
../inst/include/armadillo_bits/op_expmat_meat.hpp:51:   instantiated from here
../inst/include/armadillo_bits/traits.hpp:614: error: ā€˜std::__traitor<std::__is_integer<double>, std::__is_floating<double> >::<anonymous enum>ā€™ is/uses anonymous type
../inst/include/armadillo_bits/traits.hpp:614: error:   trying to instantiate ā€˜template<class T> struct arma::is_subview_elem2ā€™
../inst/include/armadillo_bits/traits.hpp:614: error: ā€˜std::__traitor<std::__is_integer<double>, std::__is_floating<double> >::<anonymous enum>ā€™ is/uses anonymous type
../inst/include/armadillo_bits/traits.hpp:614: error:   trying to instantiate ā€˜template<class T> struct arma::is_subview_elem1ā€™
../inst/include/armadillo_bits/traits.hpp:614: error: ā€˜std::__traitor<std::__is_integer<double>, std::__is_floating<double> >::<anonymous enum>ā€™ is/uses anonymous type
../inst/include/armadillo_bits/traits.hpp:614: error:   trying to instantiate ā€˜template<class T> struct arma::is_subview_colā€™
../inst/include/armadillo_bits/traits.hpp:614: error: ā€˜std::__traitor<std::__is_integer<double>, std::__is_floating<double> >::<anonymous enum>ā€™ is/uses anonymous type
../inst/include/armadillo_bits/traits.hpp:614: error:   trying to instantiate ā€˜template<class T> struct arma::is_subview_rowā€™
../inst/include/armadillo_bits/traits.hpp:614: error: ā€˜std::__traitor<std::__is_integer<double>, std::__is_floating<double> >::<anonymous enum>ā€™ is/uses anonymous type
../inst/include/armadillo_bits/traits.hpp:614: error:   trying to instantiate ā€˜template<class T> struct arma::is_subviewā€™
../inst/include/armadillo_bits/traits.hpp:614: error: ā€˜std::__traitor<std::__is_integer<double>, std::__is_floating<double> >::<anonymous enum>ā€™ is/uses anonymous type
../inst/include/armadillo_bits/traits.hpp:614: error:   trying to instantiate ā€˜template<class T> struct arma::is_diagviewā€™
../inst/include/armadillo_bits/traits.hpp:614: error: ā€˜std::__traitor<std::__is_integer<double>, std::__is_floating<double> >::<anonymous enum>ā€™ is/uses anonymous type
../inst/include/armadillo_bits/traits.hpp:614: error:   trying to instantiate ā€˜template<class T> struct arma::is_mtGlueā€™
../inst/include/armadillo_bits/traits.hpp:614: error: ā€˜std::__traitor<std::__is_integer<double>, std::__is_floating<double> >::<anonymous enum>ā€™ is/uses anonymous type
../inst/include/armadillo_bits/traits.hpp:614: error:   trying to instantiate ā€˜template<class T> struct arma::is_mtOpā€™
../inst/include/armadillo_bits/traits.hpp:614: error: ā€˜std::__traitor<std::__is_integer<double>, std::__is_floating<double> >::<anonymous enum>ā€™ is/uses anonymous type
../inst/include/armadillo_bits/traits.hpp:614: error:   trying to instantiate ā€˜template<class T> struct arma::is_eGlueā€™
../inst/include/armadillo_bits/traits.hpp:614: error: ā€˜std::__traitor<std::__is_integer<double>, std::__is_floating<double> >::<anonymous enum>ā€™ is/uses anonymous type
../inst/include/armadillo_bits/traits.hpp:614: error:   trying to instantiate ā€˜template<class T> struct arma::is_eOpā€™
../inst/include/armadillo_bits/traits.hpp:614: error: ā€˜std::__traitor<std::__is_integer<double>, std::__is_floating<double> >::<anonymous enum>ā€™ is/uses anonymous type
../inst/include/armadillo_bits/traits.hpp:614: error:   trying to instantiate ā€˜template<class T> struct arma::is_Glueā€™
../inst/include/armadillo_bits/traits.hpp:614: error: ā€˜std::__traitor<std::__is_integer<double>, std::__is_floating<double> >::<anonymous enum>ā€™ is/uses anonymous type
../inst/include/armadillo_bits/traits.hpp:614: error:   trying to instantiate ā€˜template<class T> struct arma::is_Opā€™
../inst/include/armadillo_bits/traits.hpp:614: error: ā€˜std::__traitor<std::__is_integer<double>, std::__is_floating<double> >::<anonymous enum>ā€™ is/uses anonymous type
../inst/include/armadillo_bits/traits.hpp:614: error:   trying to instantiate ā€˜template<class T> struct arma::is_Genā€™
../inst/include/armadillo_bits/traits.hpp:614: error: ā€˜std::__traitor<std::__is_integer<double>, std::__is_floating<double> >::<anonymous enum>ā€™ is/uses anonymous type
../inst/include/armadillo_bits/traits.hpp:614: error:   trying to instantiate ā€˜template<class T> struct arma::is_Matā€™
make: *** [RcppArmadillo.o] Error 1
ERROR: compilation failed for package ā€˜RcppArmadilloā€™
* removing ā€˜/home/rexec/R/library/RcppArmadilloā€™

The downloaded source packages are in
ā€˜/tmp/Rtmp2hNzB9/downloaded_packagesā€™
Warning message:
In install.packages("RcppArmadillo") :
  installation of package ā€˜RcppArmadilloā€™ had non-zero exit status

      

+3


source to share


1 answer


This is a bug in the ancient gcc / g ++ 4.4 that comes with CentOS 6. Upgrade to CentOS 7, which has new g ++, or ask RcppArmadillo maintainers to upgrade to the latest Armadillo (4.550.2), which has a workaround for the bug in g ++.



You can also manually install earlier versions of RcppArmadillo from this site: http://cran.r-project.org/src/contrib/Archive/RcppArmadillo/
Version 4.500 works with CentOS 6

+4


source







All Articles