Installing Rstan on a new computer and compilation of the R example in the Rstan package fails. I followed the Rstan Getting Started instructions with and without running the “Configuration of the C++ Toolchain” and get to the same point either way. The full output is too long, but the output after the program source is below along with my Sys.info() and sessionInfo(). I have read over other posts and have tried suggested fixes. I’m not sure if it’s a bug at this point or if I am doing something wrong. I love Stan and am looking forward to using it on my new system. :-)
Error in compileCode(f, code, language = language, verbose = verbose) :
Compilation ERROR, function(s)/method(s) not created! C:/rtools40/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: file3bc828c2234.o:file3bc828c2234.cpp:(.text+0x71c): undefined reference to `tbb::internal::task_scheduler_observer_v3::observe(bool)'
C:/rtools40/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: file3bc828c2234.o:file3bc828c2234.cpp:(.text+0x1317): undefined reference to `rstan::stan_fit::stan_fit(SEXPREC*, int)'
C:/rtools40/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: file3bc828c2234.o:file3bc828c2234.cpp:(.text+0x75e): undefined reference to `tbb::internal::task_scheduler_observer_v3::observe(bool)'
C:/rtools40/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: file3bc828c2234.o:file3bc828c2234.cpp:(.text$_ZN3tbb8internal26task_scheduler_observer_v3D1Ev[_ZN3tbb8internal26task_scheduler_observe
In addition: Warning message:
In file.remove(c(unprocessed, processed)) :
cannot remove file 'C:\Users\bill\AppData\Local\Temp\RtmpI77qPp\file3bc86e1ba30.stan', reason 'No such file or directory'
Sys.info()
sysname release version nodename machine
“Windows” “10 x64” “build 19041” “DESKTOP-5T7AO6R” “x86-64”
login user effective_user
“bill” “bill” “bill”sessionInfo()
R version 4.0.2 (2020-06-22)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19041)Matrix products: default
locale:
[1] LC_COLLATE=English_United States.1252 LC_CTYPE=English_United States.1252
[3] LC_MONETARY=English_United States.1252 LC_NUMERIC=C
[5] LC_TIME=English_United States.1252attached base packages:
[1] stats graphics grDevices utils datasets methods baseother attached packages:
[1] rstan_2.21.1 ggplot2_3.3.2 StanHeaders_2.21.0-5 RevoUtils_11.0.2
[5] RevoUtilsMath_11.0.0loaded via a namespace (and not attached):
[1] Rcpp_1.0.5 pillar_1.4.6 compiler_4.0.2 prettyunits_1.1.1
[5] tools_4.0.2 pkgbuild_1.1.0 jsonlite_1.7.0 lifecycle_0.2.0
[9] tibble_3.0.3 gtable_0.3.0 pkgconfig_2.0.3 rlang_0.4.7
[13] cli_2.0.2 rstudioapi_0.11 parallel_4.0.2 curl_3.3
[17] xfun_0.15 loo_2.3.1 gridExtra_2.3 withr_2.2.0
[21] dplyr_1.0.0 generics_0.0.2 vctrs_0.3.2 stats4_4.0.2
[25] grid_4.0.2 tidyselect_1.1.0 glue_1.4.1 inline_0.3.15
[29] R6_2.3.0 processx_3.4.3 fansi_0.4.1 purrr_0.3.4
[33] callr_3.4.3 magrittr_1.5 codetools_0.2-16 matrixStats_0.56.0
[37] scales_1.1.1 ps_1.3.3 ellipsis_0.3.1 assertthat_0.2.1
[41] colorspace_1.4-1 V8_3.2.0 tinytex_0.24 RcppParallel_5.0.2
[45] munsell_0.5.0 crayon_1.3.4
I love Stan and am looking forward to using it on my new machine.