Error installing CmdStan, invalid conversion from 'const'

And what about:

where.exe mingw32-make

What does your PATH look like now?

U:\>where.exe mingw32-make
C:\rtools40\mingw64\bin\mingw32-make.exe

My PATH:

C:\rtools40\usr\bin;
C:\rtools40\mingw64\bin;
C:\Users\ter58_RS;
C:\Program Files\Python39\Scripts\;
C:\Program Files\Python39\;
C:\Windows\system32;
C:\Windows;
C:\Windows\System32\Wbem;
C:\Windows\System32\WindowsPowerShell\v1.0\;
C:\Windows\System32\OpenSSH\;
C:\Program Files\SASHome\SASFoundation\9.4\core\sasexe;
C:\Program Files\SASHome\SASFoundation\9.4\ets\sasexe;
C:\Program Files\SASHome\SASFoundation\9.4\dquality\sasexe;
C:\Program Files\SASHome\SASFoundation\9.4\dqualityssl\sasexe;
C:\Program Files\SASHome\SASFoundation\9.4\dmcommons\sasexe;
C:\Program Files\SASHome\Secure\ccme4;
C:\Program Files\SASHome\x86\Secure\ccme4;
C:\Program Files\MATLAB\R2021a\runtime\win64;
C:\Program Files\MATLAB\R2021a\bin;
C:\Program Files\Git\cmd;
C:\Program Files\Microsoft SQL Server\120\Tools\Binn\;
C:\Program Files\Microsoft SQL Server\150\Tools\Binn\;
C:\Users\ter58_RS\cmdstan\stan\lib\stan_math\lib\tbb;
C:\Users\ter58_RS\cmdstan\stan\lib\stan_math\lib\tbb;
C:\Users\ter58_RS\AppData\Local\Microsoft\WindowsApps;
C:\rtools40\usr\bin;
C:\rtools40\ucrt64\bin;

Do you get any errors if you clean and rebuild cmdstan now:

mingw32-make clean-all
mingw32-make build

Argh, yes, same two errors. It’s weird that this doesn’t happen with the Bernoulli example though.

Unfortunately at this point you’ll need to contact your university’s IT department, there’s not much more I can think to check/change

In case anyone bumps into this again, here’s what solved the issue for me:

  1. Uninstalled and reinstalled Rtools 4.2 and Tools 4.0
  2. Installed cmdstan using cmdstanr. I did everything from Rstudio

Thanks so much for your help @andrjohns.