I installed the rstan 2.18.2 following the instructions. However, there are always errors when compiling.
Error in compileCode(f, code, language = language, verbose = verbose) :
Compilation ERROR, function(s)/method(s) not created! In file included from C:/Program Files/R/R-3.5.3/library/BH/include/boost/random/detail/integer_log2.hpp:19:0,
from C:/Program Files/R/R-3.5.3/library/BH/include/boost/random/detail/int_float_pair.hpp:26,
from C:/Program Files/R/R-3.5.3/library/BH/include/boost/random/exponential_distribution.hpp:27,
from C:/Program Files/R/R-3.5.3/library/BH/include/boost/random/gamma_distribution.hpp:25,
from C:/Program Files/R/R-3.5.3/library/StanHeaders/include/stan/math/prim/mat/prob/dirichlet_rng.hpp:5,
from C:/Program Files/R/R-3.5.3/library/StanHeaders/include/stan/math/prim/mat.hpp:276,
from C:/Program Files/R/R-3.5.3/library/StanHeaders/include/stan/math/rev/mat.hpp:12,
from C:/Program Files/R/R-3.5.3/library/StanHeaders/include/stan/math.hpp:4,
from C:/Program Files/R/R-3.5.3/library/StanHeaders
In addition: Warning message:
In system(cmd, intern = !verbose) :
running command ‘C:/PROGRA~1/R/R-35~1.3/bin/x64/R CMD SHLIB file15cc6e2f1671.cpp 2> file15cc6e2f1671.cpp.err.txt’ had status 1
Error in sink(type = “output”) : invalid connection
Thanks for your reply. I removed the following steps and it can run successfully.
Sys.setenv(LOCAL_CPPFLAGS = ‘-march=native’)
options(mc.cores = parallel::detectCores())
I have the exact same error under Red Hat 7. The error message when running the suggested code is:
Error in compileCode(f, code, language = language, verbose = verbose) :
Compilation ERROR, function(s)/method(s) not created! In file included from /ext/home/ericiulescua/R/x86_64-redhat-linux-gnu-library/3.5/BH/include/boost/random/detail/integer_log2.hpp:19:0,
from /ext/home/ericiulescua/R/x86_64-redhat-linux-gnu-library/3.5/BH/include/boost/random/detail/int_float_pair.hpp:26,
from /ext/home/ericiulescua/R/x86_64-redhat-linux-gnu-library/3.5/BH/include/boost/random/exponential_distribution.hpp:27,
from /ext/home/ericiulescua/R/x86_64-redhat-linux-gnu-library/3.5/BH/include/boost/random/gamma_distribution.hpp:25,
from /ext/home/ericiulescua/R/x86_64-redhat-linux-gnu-library/3.5/StanHeaders/include/stan/math/prim/mat/prob/dirichlet_rng.hpp:5,
from /ext/home/ericiulescua/R/x86_64-redhat-linux-gnu-library/3.5/StanHeaders/include/stan/math/prim/mat.hpp:292,
from /ext/home/ericiulescua/R/x86_64-redhat-linux-gnu-library/3.5/StanHeaders/include/stan/m
It can’t find the headers. I have the following session info:
R version 3.5.2 (2018-12-20)
Platform: x86_64-redhat-linux-gnu (64-bit)
Running under: OpenShift Enterprise