I am having trouble setting up cmdstan-2.17.1 on Windows 10, I followed the documentation.
my “make --version” is “GNU Make 4.2.1”, my “gcc --version” is " 4.9.3". Both were installed as a part of “RTools35”.
when I run the make build command, it passes for several “g++ Wall” commands, then it fails with the following error:
cc -DNO_FPRINTF_OUTPUT -pipe -c -x c -O3 -isystem stan/lib/stan_math/lib/cvodes_2.9.0/include stan/lib/stan_math/lib/cvodes_2.9.0/src/nvec_ser/nvector_serial.c -o stan/lib/stan_math/lib/cvodes_2.9.0/src/nvec_ser/nvector_serial.o
make: cc: Command not found
make: *** [stan/lib/stan_math/make/libraries:24: stan/lib/stan_math/lib/cvodes_2.9.0/src/nvec_ser/nvector_serial.o] Error 127
Can anyone please suggest how can I solve this?
It cannot find Rtools on your PATH. The most common reason for this is forgetting to check the box that modifies the PATH variable in the last step of the Rtools installer.
Thank You for responding so fast, but I checked that’s not it.
After you said that, I checked my environment variables and there are 3 paths now.
One of those I might have added manually when I tried installing it before and it failed, I don’t remember already.
Maybe I remove those and try reinstalling it again?
Also, should I have “cc.exe” in C:/Rtools/bin" directory? Because I don’t.
Look at C:\Rtools to figure out which corresponds to what you installed most recently. I am guessing mingw_64\bin is the correct one.
Right. this is the correct path C:\Rtools\mingw_64\bin
Should there be “cc.exe” in this path? I don’t see it
I think so. It might be easiest to uninstall all copies of Rtools, delete anything pertaining to Rtools from PATH, and then try running the installer again.
I’ll try that now.
I appreciate your help, thank you
in the cmdstan-guide-2.17.1 documentation it says to use latest version of RTools, that is 3.5. But I cannot find the path “c:\Rtools\gcc-4.6.3\bin” after installation as mentioned in the documentation. The correct path in my example is “C:\Rtools\mingw_64\bin”, which is not added automatically by installer even if I check the checkbox to modify path variable, it only adds the “c:\Rtools\bin”. With this variable I can verify the “make -v” is working, but “gcc -v” is not visible. Then I add manually this to PATH “C:\Rtools\mingw_64\bin”. gcc -v is working again, but I still can’t build with the same error mentioned earlier.
Next I want to try downloading earlier version of RTools for which the documentation was made, maybe this will help.
Just in case if someone might find this useful, I tried with RTools version 35 and 33, did not work, with RTools34 worked as expected.
Thank you! that worked for me too.