Stuck with Stan compiling with cmdstanr

From this previous post:

it looks like it may be an issue with RTools. It looks like that’s bringing in a very recent GCC 13.2.

I don’t know where you’re at in installs, but it’s easy to get these things in a bad enough state that it’s easier just to start from scratch by reinstalling R and reinstalling cmdstan and cmdstanr. If you could do that and follow along the instructions step by step and see where things break. The install instructions are here:

but that’s confusing in that it doesn’t tell you how to do the full install. The next bigger set of partial instructions are here:

This then redirects you to install a C++ toolchain for CmdStan here, which after scrolling down to the right section leaves you here:

You’ll see that each of the R tools releases needs slightly different steps.

And if you’re trying to run on a really old 32-bit Windows machine then there is an additional step at the end.

P.S. If you’re comfortable with the Unix subsystem for Windows, that tends to be much easier to work with than Windows itself for Stan (and many other open source software package). Windows is just different enough from Unix that everything works differently there and zero of our 40+ devs have Windows machines (primarily because they’re such a pain for scientific computing).