Make error "No rule to make target `examples/bernoulli/bernoulli.d'"

I’m using windows 10 with cmdstan 2.20.0 and g++/w64-mingw32 (gcc version 4.9.3) from Rtools 3.4.

I got a success message when I set up cmdstan, but when I try to compile the examples, I get an error. Specifically, I type “make examples/bernoulli/bernoulli.exe” and I get:

make: *** No rule to make target `examples/bernoulli/bernoulli.d’. Stop.

I get the same error, with “filename.d”, for other files I’ve tried to compile.

I haven’t been able to find any info on this error after searching for a while. One comment I saw suggested making a file in the make directory called “local” that says “CC=g++”, but that did not seem to help. Any help would be highly appreciated.

Hi and welcome to the Stan Forums,

I think the recommended version of RTools is 3.5. Please try installing that.

1 Like

When I tried that originally, building Stan failed.

I uninstalled everything and started over again with Rtools 3.5 and everything works so far.

One thing to perhaps note, though, is that page 74 of the cmdstan guide says to use the latest frozen version, but 3.5 is not yet frozen. It might help others in the future for that comment to be updated.

Thanks very much, rok, for your help.

2 Likes