I have just installed R 4.0.3 on my local directory, on a computing cluster.
I'm using gcc 5.1.0 and I have set Sys.setenv("PKG_CXXFLAGS"="-std=c++11")
Rcpp installed fine.
But with RcppArmadillo, I get hundreds of lines of error messages like this
../inst/include/armadillo_bits/gmm_full_meat.hpp:169:3: error: ‘rw’ is not a member of ‘arma::access’
access::rw(hefts) = in_hefts;
^
../inst/include/armadillo_bits/gmm_full_meat.hpp: In member function ‘void arma::gmm_priv::gmm_full<eT>::set_means(const arma::Base<eT, T1>&)’:
../inst/include/armadillo_bits/gmm_full_meat.hpp:191:3: error: ‘rw’ is not a member of ‘arma::access’
access::rw(means) = in_means;
^
../inst/include/armadillo_bits/gmm_full_meat.hpp: In member function ‘void arma::gmm_priv::gmm_full<eT>::set_fcovs(const arma::BaseCube<eT, T1>&)’:
../inst/include/armadillo_bits/gmm_full_meat.hpp:216:3: error: ‘rw’ is not a member of ‘arma::access’
access::rw(fcovs) = in_fcovs;
^
../inst/include/armadillo_bits/gmm_full_meat.hpp: In member function ‘void arma::gmm_priv::gmm_full<eT>::set_hefts(const arma::Base<eT, T1>&)’:
../inst/include/armadillo_bits/gmm_full_meat.hpp:246:28: error: ‘rw’ is not a member of ‘arma::access’
eT* hefts_mem = access::rw(hefts).memptr();
^
../inst/include/armadillo_bits/gmm_full_meat.hpp:253:3: error: ‘rw’ is not a member of ‘arma::access’
access::rw(hefts) /= accu(hefts);
^
../inst/include/armadillo_bits/gmm_full_meat.hpp: In member function ‘bool arma::gmm_priv::gmm_full<eT>::load(std::__cxx11::string)’:
../inst/include/armadillo_bits/gmm_full_meat.hpp:289:36: error: ‘arma_binary’ was not declared in this scope
bool status = storage.load(name, arma_binary);
^
../inst/include/armadillo_bits/gmm_full_meat.hpp:315:3: error: ‘rw’ is not a member of ‘arma::access’
access::rw(means) = storage_means;
^
../inst/include/armadillo_bits/gmm_full_meat.hpp:316:3: error: ‘rw’ is not a member of ‘arma::access’
access::rw(hefts) = storage_hefts;
^
../inst/include/armadillo_bits/gmm_full_meat.hpp:329:5: error: ‘rw’ is not a member of ‘arma::access’
access::rw(fcovs).slice(g) = storage_fcov;
^
../inst/include/armadillo_bits/gmm_full_meat.hpp: In member function ‘bool arma::gmm_priv::gmm_full<eT>::save(std::__cxx11::string) const’:
I'm completely lost. Please help!
I encountered the same issue on R 4.0.3 on RedHat 7.5 This worked for me:
install.packages("RcppArmadillo", repos="https://rcppcore.github.io/drat")
(from https://www.gitmemory.com/RcppCore)