Error installing rstan

Hi Kenneth,

This is an issue we see when using Microsoft R Open, it seems that they insert a build message which causes a compilation failure. You can see this a bit further along the build arguments:

-DSTAN_THREADS Microsoft R Open 4.0.2 The enhanced R distribution from Microsoft Microsoft packages Copyright (C) 2020 Microsoft Corporation  Using the Intel MKL for parallel mathematical computing (using 40 cores).  Default CRAN mirror snapshot taken on 2020-07-16. See: https://mran.microsoft.com/.  -DRCPP_PARALLEL_USE_TBB=1 -I'C:/Users/kenneth.smart/Documents/R/win-library/4.0/Rcpp/include'

You can either use the regular CRAN R, or another user posted instructions on how to remove the message over in this thread. Unfortunately even after those messages are fixed, there were still issues with linking to the RcppParallel package.

While not tested on MRO, if you fix the build message you might also want to try the preview of the next RStan version, to see if the linking issues remain:

remove.packages(c("StanHeaders", "rstan"))
install.packages("StanHeaders", repos = c("https://mc-stan.org/r-packages/", getOption("repos")))
install.packages("rstan", repos = c("https://mc-stan.org/r-packages/", getOption("repos")))
1 Like