Cmdstan initial set up "expecting target : dependencies"

I recently installed cmdstanr for the first time on a Windows 10 machine. The installation seems to be successful. I was able to run the example without issue.

However, I seem to be having an issue using cmdstan itself (I installed it via cmdstanr). I followed the installation instructions and ran the example code and got the output below to the terminal.

cd C:\Users\[user]\.cmdstan\cmdstan-2.35.0
C:\Users\[user]\.cmdstan\cmdstan-2.35.0>make examples/bernoulli/bernoulli.exe
Error on line 35: expecting target : dependencies

It’s not obvious to me where this error is coming from. It didn’t look clear to me that it was coming from the make file. I tried the troubleshooting steps, but that didn’t resolve the issue. The only thing that the installation guide might suggest is an issue is that [user] has a space, but the guide seems to suggest it is just a problem for the path to the model, not the path to make.

Any idea how to resolve the issue here?

User having a space will definitely cause problems, though this specific one is new to me. I believe cmdstanr has a way of using “short paths” to avoid this— does compiling inside R work?

@WardBrian I ran some of the example code in the CmdStanR getting started document without issue. For instance,

file <- file.path(cmdstan_path(), "examples", "bernoulli", "bernoulli.stan")
mod <- cmdstan_model(file)

and

# names correspond to the data block in the Stan program
data_list <- list(N = 10, y = c(0,1,0,0,0,0,0,0,0,1))

fit <- mod$sample(
  data = data_list,
  seed = 123,
  chains = 4,
  parallel_chains = 4,
  refresh = 500 # print update every 500 iters
)

I can’t recall if it recompiled the Stan model or not, but there weren’t any errors.