Dear list,
I am new to Stan and have recently installed “rstan” for the first time following the instruction provided here: RStan Getting Started · stan-dev/rstan Wiki · GitHub
The installation run with no issues, but I can’t get the “8school” example working, as I keep receiving the following error:
Error in compileCode(f, code, language = language, verbose = verbose) :
Compilation ERROR, function(s)/method(s) not created! In file included from C:/Users/matti/Documents/R/win-library/3.6/BH/include/boost/random/detail/integer_log2.hpp:19:0,
from C:/Users/matti/Documents/R/win-library/3.6/BH/include/boost/random/detail/int_float_pair.hpp:26,
from C:/Users/matti/Documents/R/win-library/3.6/BH/include/boost/random/exponential_distribution.hpp:27,
from C:/Users/matti/Documents/R/win-library/3.6/BH/include/boost/random/gamma_distribution.hpp:25,
from C:/Users/matti/Documents/R/win-library/3.6/StanHeaders/include/stan/math/prim/mat/prob/dirichlet_rng.hpp:5,
from C:/Users/matti/Documents/R/win-library/3.6/StanHeaders/include/stan/math/prim/mat.hpp:292,
from C:/Users/matti/Documents/R/win-library/3.6/StanHeaders/include/stan/math/rev/mat.hpp:12,
from C:/Users/matti/Documents/R/win-library/3.6/StanHeaders/include/stan/math.hpp:4,
I am working with RStudio (1.2.5001) in Windows 10:
- R 3.6.1;
- RTools 3.5;
- rstan 2.19.2;
- StanHeader 2.19.0;
- rstantools 2.0.0.
- I have installed RTools 3.5
Running
pkgbuild::has_build_tools(debug = TRUE)
returns TRUE, so my understanding is that the C++ toolchain is properly installed.
My .R/Makevars.win contains:
CXX14FLAGS=-O3 -march=native -mtune=native
CXX11FLAGS=-O3 -march=native -mtune=nativeCXX14FLAGS=-O3 -march=native -mtune=native
CXX11FLAGS=-O3 -march=native -mtune=native
I have searched this and other forums for suggestions (downgrading rstan version, R, modifying Makevars.win) but none worked for me so far.
Your guidance and advise would be very much appreciated!
Best wishes,
Mattia