Hi, I was working with RStan and brms a few days ago, but for some reason am running into compilation errors now.
Poking around discouse I see ben asking people to run the following code:
stancode <- 'data {real y_mean;} parameters {real y;} model {y ~ normal(y_mean,1);}
mod <- stan_model(model_code = stancode, verbose = TRUE)
This outputs the following:
Error in compileCode(f, code, language = language, verbose = verbose) :
Compilation ERROR, function(s)/method(s) not created! In file included from /usr/local/lib/R/site-library/RcppEigen/include/Eigen/Core:388:0,
from /usr/local/lib/R/site-library/RcppEigen/include/Eigen/Dense:1,
from /usr/local/lib/R/site-library/StanHeaders/include/stan/math/prim/mat/fun/Eigen.hpp:4,
from /usr/local/lib/R/site-library/StanHeaders/include/stan/math/rev/mat/fun/Eigen_NumTraits.hpp:4,
from /usr/local/lib/R/site-library/StanHeaders/include/stan/math/rev/core/matrix_vari.hpp:4,
from /usr/local/lib/R/site-library/StanHeaders/include/stan/math/rev/core.hpp:14,
from /usr/local/lib/R/site-library/StanHeaders/include/stan/math/rev/mat.hpp:4,
from /usr/local/lib/R/site-library/StanHeaders/include/stan/math.hpp:4,
from /usr/local/lib/R/site-library/StanHeaders/include/src/stan/model/model_header.hpp:4,
from file20c026c4e5
When I try to compile my brms model I get what looks like a similar error:
Compiling the C++ model
Error in compileCode(f, code, language = language, verbose = verbose) :
Compilation ERROR, function(s)/method(s) not created! In file included from /usr/local/lib/R/site-library/RcppEigen/include/Eigen/Core:380:0,
from /usr/local/lib/R/site-library/RcppEigen/include/Eigen/Dense:1,
from /usr/local/lib/R/site-library/StanHeaders/include/stan/math/prim/mat/fun/Eigen.hpp:4,
from /usr/local/lib/R/site-library/StanHeaders/include/stan/math/rev/mat/fun/Eigen_NumTraits.hpp:4,
from /usr/local/lib/R/site-library/StanHeaders/include/stan/math/rev/core/matrix_vari.hpp:4,
from /usr/local/lib/R/site-library/StanHeaders/include/stan/math/rev/core.hpp:14,
from /usr/local/lib/R/site-library/StanHeaders/include/stan/math/rev/mat.hpp:4,
from /usr/local/lib/R/site-library/StanHeaders/include/stan/math.hpp:4,
from /usr/local/lib/R/site-library/StanHeaders/include/src/stan/model/model_header.hpp:4,
from file19aa1da2c4
In addition: Warning message:
running command '/usr/lib/R/bin/R CMD SHLIB file19aa1da2c48.cpp 2> file19aa1da2c48.cpp.err.txt' had status 1
I am running Ubuntu 17.10, R 3.4.2, and Rstan 2.17.3.
My Makevars contains:
CXX14FLAGS=-O3 -march=native -mtune=native -fPIC
CXX14=g++