Errors building STAN program in CmdStan 2.20 & 2.19.1

Operating System: Win 10
Interface Version: CMDSTAN 2.20 & 2.19.1
Compiler/Toolkit: gcc version 8.1.0 / GNU Make version 3.79.1


I having trouble with the latest version of CmdStan. I can build CmdStan properly :

  --- CmdStan v2.20.0 built ---

But then when I build the examples program :

make examples/bernoulli/bernoulli.exe
make: *** No rule to make target `C:/Users/RVT5/Documents/cmdstan-2.20.0/examples/bernoulli/bernoulli.d'.  Stop.

So I tried with an older version of CmdStan (2.19.1) and make goes fine but I have an other error message :

make examples/bernoulli/bernoulli.exe
g++ -std=c++1y -m64 -Wall -Wno-unused-function -Wno-uninitialized -Wno-unused-but-set-variable -Wno-unused-variable -Wno-sign-compare -Wno-unused-local-typedefs     -O3 -I src -I stan/src -I stan/lib/stan_math/ -I stan/lib/stan_math/lib/eigen_3.3.3 -I stan/lib/stan_math/lib/boost_1.69.0 -I stan/lib/stan_math/lib/sundials_4.1.0/include  -D_USE_MATH_DEFINES  -DBOOST_RESULT_OF_USE_TR1 -DBOOST_NO_DECLTYPE -DBOOST_DISABLE_ASSERTS -DBOOST_PHOENIX_NO_VARIADIC_EXPRESSION     -c -MT  -MT examples/bernoulli/bernoulli.exe -include examples/bernoulli/bernoulli.hpp -include src/cmdstan/main.cpp -M -E -MG -MP -MF examples/bernoulli/bernoulli.d examples/bernoulli/bernoulli.hpp
g++.exe: error: examples/bernoulli/bernoulli.exe: No such file or directory
make: *** [examples/bernoulli/bernoulli.d] Error 1

Anyone knows what is happening ?

there is a related thread which lists a bunch of things to try: Trouble building the Bernoulli example (Windows 10, cmdstan 2.19.1) most notably upgrading RTools to 3.5. Does any of the proposed steps work for you?

Hope that helps!

It was it ! I replaced Rtools from 3.4 to 3.5 and it works perfectly. Thank you!