Cmdstanr under R4.3 and Rtools 4.3

I just updated R and RTools to version 4.3, since these are the forthcoming releases, but now I get an error when installing cmdstanr:

Error: 
Rtools42 was not found but is required to run CmdStan with R version 4.3.0.
Please install Rtools42 and run cmdstanr::check_cmdstan_toolchain().

Is there any setting I have missed, or does cmdstanr indeed not yet work with RTools 4.3?

Can you share the output from:

devtools::session_info("cmdstanr")

This actually seemed like a fairly simple case of updating some utility functions. Can you try this github version and let me know if all gets set up and installed correctly:

EDIT: Removed command to install branch, now in main

1 Like

Thanks a lot, worked!

Great! The updates have been merged into the main repository as well, so the standard github version of cmdstanr should now be RTools43 compatible

1 Like

I still get the same error: > cmdstanr::install_cmdstan()
Error:
Rtools42 was not found but is required to run CmdStan with R version 4.3.0.
Please install Rtools42 and run cmdstanr::check_cmdstan_toolchain().

Settings:

Sys.which("make")
                              make 
"C:\\rtools43\\usr\\bin\\make.exe" 

R version 4.3.0 (2023-04-21 ucrt)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19045)
1 Like

Doing a fresh install, and I have the same problem with cmdstanr and Rtools43 with R 4.3.1.

cmdstanr::check_cmdstan_toolchain(fix = TRUE)
Error:
Rtools42 was not found but is required to run CmdStan with R version 4.3.1.
Please install Rtools42 and run cmdstanr::check_cmdstan_toolchain().

Sys.which(“make”)
make
“C:\rtools43\usr\bin\make.exe”
sessionInfo()
R version 4.3.1 (2023-06-16 ucrt)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19045)

Matrix products: default

locale:
[1] LC_COLLATE=English_United States.utf8 LC_CTYPE=English_United States.utf8
[3] LC_MONETARY=English_United States.utf8 LC_NUMERIC=C
[5] LC_TIME=English_United States.utf8

time zone: America/New_York
tzcode source: internal

attached base packages:
[1] stats graphics grDevices utils datasets methods base

loaded via a namespace (and not attached):
[1] tensorA_0.36.2 backports_1.4.1 utf8_1.2.3
[4] R6_2.5.1 farver_2.1.1 magrittr_2.0.3
[7] posterior_1.4.1 gtable_0.3.3 glue_1.6.2
[10] abind_1.4-5 tibble_3.2.1 pkgconfig_2.0.3
[13] generics_0.1.3 lifecycle_1.0.3 ggplot2_3.4.2
[16] cli_3.6.1 fansi_1.0.4 scales_1.2.1
[19] grid_4.3.1 vctrs_0.6.3 compiler_4.3.1
[22] distributional_0.3.2 tools_4.3.1 checkmate_2.2.0
[25] pillar_1.9.0 munsell_0.5.0 colorspace_2.1-0
[28] rlang_1.1.1 cmdstanr_0.5.3

Update: following another thread, I tried reinstalling cmdstanr using remotes::install_github(“stan-dev/cmdstanr”)

But receive the same error notifying me that Rtools42 was not found.

remotes::install_github(“stan-dev/cmdstanr”)
Downloading GitHub repo stan-dev/cmdstanr@HEAD
Running R CMD build

  • checking for file ‘C:\Users\admin_djv76\AppData\Local\Temp\Rtmp6LvY1n\remotes55e45e845740\stan-dev-cmdstanr-abe87ba/DESCRIPTION’ … OK
  • preparing ‘cmdstanr’:
  • checking DESCRIPTION meta-information … OK
  • checking for LF line-endings in source and make files and shell scripts
  • checking for empty or unneeded directories
    Omitted ‘LazyData’ from DESCRIPTION
  • building ‘cmdstanr_0.5.3.tar.gz’
    Installing package into ‘C:/Users/admin_djv76/AppData/Local/R/win-library/4.3’
    (as ‘lib’ is unspecified)
  • installing source package ‘cmdstanr’ …
    ** using staged installation
    ** R
    ** inst
    ** byte-compile and prepare package for lazy loading
    ** help
    *** installing help indices
    *** copying figures
    ** building package indices
    ** installing vignettes
    ** testing if installed package can be loaded from temporary location
    ** testing if installed package can be loaded from final location
    ** testing if installed package keeps a record of temporary installation path
  • DONE (cmdstanr)

cmdstanr::check_cmdstan_toolchain(fix = TRUE)
Error:
Rtools42 was not found but is required to run CmdStan with R version 4.3.1.
Please install Rtools42 and run cmdstanr::check_cmdstan_toolchain().

One more update: in doing my reinstall, I neglected to install devtools first. So, now when I checked the toolchain with the fix=TRUE option, cmdstanr installed mingw32-make and g++ with Rtools43. Weird. Will see if compilation works!