Based on your guidelines here, I used the following workaround, which successfully compiled the example stan model locally:
- Have an empty
Makevars
file. - The
Makevars.win
file contains the following:
CXX14 = "C:/RBuildTools/3.5/mingw_64/bin/g++.exe" -std=c++1y
CXX14FLAGS += -mtune=native -O3 -mmmx -msse -msse2 -msse3 -mssse3 -msse4.1 -msse4.2
- Rename
Makevars.win
toMakevars.win.bak
:
file.rename("~/.R/Makevars.win", "~/.R/Makevars.win.bak")
- Execute
example(stan_model,package="rstan",run.dontrun=T)
. At the end of the execution, I receive the following warning message:
Testing this strategy on the compilation of the R package fails. devtools::check()
yields:
i Updating Bernadette documentation
i Loading Bernadette
Error in Rcpp::loadModule(module = "stan_fit4dummy_lm_model_mod", what = TRUE, :
Unable to load module "stan_fit4dummy_lm_model_mod": Failed to initialize module pointer: Error in FUN(X[[i]], ...): no such symbol _rcpp_module_boot_stan_fit4dummy_lm_model_mod in package Bernadette
Calls: <Anonymous> ... <Anonymous> -> run_ns_load_actions -> action -> <Anonymous>
Execution halted
Exited with status 1.