Cmdstan "no rule to make target" error compiling - only for non-example models

Operating System: Windows
Interface Version: 2.15
Compiler/Toolkit: Rtools install

I installed cmdstan following the user guide directions with no problems. I can successfully run the command

But I have placed physics.stan in examples\physics, and get the error when, from the same directory (cmdstan), I run

I’m unsure what’s going on for this one. (I’ve tried about 30 things with renaming, changing directories, etc.)

OK, so I think I fixed this. I have NO IDEA why this mattered or worked, but changing from

to

(i.e. change from back to forward slashes) makes it work. BUT this is not necessary for the bernoulli example model…?

This was suggested here: https://github.com/stan-dev/MathematicaStan/issues/1

Perhaps you could include a line about this in the cmdstan manual.

1 Like

They need to be forward slashes in order for it to work, even in Windows. I’ll try to make it clearer in the manual.

And I realized it DOESN’T work for bernoulli to compile, but once it is compiled, it recognizes it.

So I’ve been silly - but thanks!

Yeah… it’s behavior that’s controlled by GNU make. We haven’t found a better solution across platforms and we don’t have the expertise to build out a separate make process for Windows, so for the foreseeable future, we’re reliant on make’s behavior for Windows.

It’s amazing that it can recognize backslashes for the target once it’s built, but not for compiling. I have no idea why that is.

1 Like

want to take a look at this pull request and see if it clarifies anything? Please feel free to propose alternate wording:

1 Like

Thanks for posting back after figuring this out. We probably only need one user who knows the right approach on Windows and the world would be a better place.

1 Like