Using install.packages function, I get compilation errors. I am using R 3.4.4 on Ubuntu 16.04.5 LTS.
A portion of the output showing the errors:
In file included from chains.cpp:19:0:
/usr/local/lib/R/site-library/StanHeaders/include/stan/math/prim/mat/fun/mean.hpp: In function 'typename boost::math::tools::promote_args::type stan::math::mean(const std::vector&)':
/usr/local/lib/R/site-library/StanHeaders/include/stan/math/prim/mat/fun/mean.hpp:24:63: error: an array reference cannot appear in a constant-expression
Eigen::Map<const Eigen::Matrix<T, Eigen::Dynamic, 1>> m(&v[0], v.size());
^
/usr/local/lib/R/site-library/StanHeaders/include/stan/math/prim/mat/fun/mean.hpp:24:63: error: '&' cannot appear in a constant-expression
/usr/local/lib/R/site-library/StanHeaders/include/stan/math/prim/mat/fun/mean.hpp:24:68: error: '.' cannot appear in a constant-expression
Eigen::Map<const Eigen::Matrix<T, Eigen::Dynamic, 1>> m(&v[0], v.size());
^
/usr/local/lib/R/site-library/StanHeaders/include/stan/math/prim/mat/fun/mean.hpp:24:73: error: a function call cannot appear in a constant-expression
Eigen::Map<const Eigen::Matrix<T, Eigen::Dynamic, 1>> m(&v[0], v.size());
^
/usr/local/lib/R/site-library/StanHeaders/include/stan/math/prim/mat/fun/mean.hpp:24:74: error: a function call cannot appear in a constant-expression
Eigen::Map<const Eigen::Matrix<T, Eigen::Dynamic, 1>> m(&v[0], v.size());
^
/usr/local/lib/R/site-library/StanHeaders/include/stan/math/prim/mat/fun/mean.hpp:24:74: error: template argument 3 is invalid
/usr/local/lib/R/site-library/StanHeaders/include/stan/math/prim/mat/fun/mean.hpp:24:74: error: template argument 4 is invalid
/usr/local/lib/R/site-library/StanHeaders/include/stan/math/prim/mat/fun/mean.hpp:24:74: error: template argument 6 is invalid
/usr/local/lib/R/site-library/StanHeaders/include/stan/math/prim/mat/fun/mean.hpp:24:27: error: template argument 1 is invalid
Eigen::Map<const Eigen::Matrix<T, Eigen::Dynamic, 1>> m(&v[0], v.size());
^
/usr/local/lib/R/site-library/StanHeaders/include/stan/math/prim/mat/fun/mean.hpp:25:10: error: 'm' was not declared in this scope
return m.mean();
^
Using install.packages function, I get compilation errors. I am using R 3.4.4 on Ubuntu 16.04.5 LTS.
A portion of the output showing the errors: