RStan clang error

Hello Everybody,

I am an absolutely fresh recruit to RSTAN
With great struggle, I have managed to get myself initiated into this field.
I have followed instructions for loading rstan as follows

library(rstan)
options(mc.cores = parallel::detectCores())
rstan_options(auto_write = TRUE)

On doing the above, I get the following message which keeps repeating endlessly

clang: error: no such file or directory: ‘Stats’
clang: error: no input files
clang: error: no such file or directory: ‘Stats’
clang: error: no input files
clang: error: no such file or directory: ‘Stats’
clang: error: no input files
clang: error: no such file or directory: ‘Stats’
clang: error: no input files
clang: error: no such file or directory: ‘Stats’

Can anyone help me

Hope to get attention of some kind soul

Regards

SHRINIVAS

What is the R output of

readLines("~/.R/Makevars")

?

Good Morning and thanks for the prompt response. The output is as follows

readLines("~/.R/Makevars")
[1] “”
[2] “CXX14FLAGS += -O3 -mtune=native -arch x86_64 -ftemplate-depth-256”

This happens as soon as you call

rstan_options(auto_write = TRUE)

?

Thanks a million Ben. But NO. It does not happen as you will see below. PLEASE HELP

library(rstan)
Loading required package: StanHeaders
Loading required package: ggplot2
rstan (Version 2.21.2, GitRev: 2e1f913d3ca3)
For execution on a local, multicore CPU with excess RAM we recommend calling
options(mc.cores = parallel::detectCores()).
To avoid recompilation of unchanged Stan programs, we recommend calling
rstan_options(auto_write = TRUE)
Warning message:
package ‘StanHeaders’ was built under R version 4.0.2
rstan_options(auto_write = TRUE)

Hello Ben

Looks like it has gone because when I wrote the following instructions it never turned up

library(rstan)
rstan_options(auto_write = TRUE)
options(mc.cores = parallel::detectCores())

Hope it does not return
As expert , is it OK ?

Very Very Warm Regards

SHRINIVAS

Probably. Does

example(stan_model, package = "rstan", run.dontrun = TRUE)

eventually run?

No. Today morning, it turned up again as follows

example(stan_model, package = “rstan”, run.dontrun = TRUE)
stn_md> stancode <- ‘data {real y_mean;} parameters {real y;} model {y ~ normal(y_mean,1);}’
stn_md> mod <- stan_model(model_code = stancode, verbose = TRUE)
TRANSLATING MODEL ‘16a540c6086086816528e4524def24d9’ FROM Stan CODE TO C++ CODE NOW.
successful in parsing the Stan model ‘16a540c6086086816528e4524def24d9’.
clang: error: no such file or directory: ‘Stats’
clang: error: no input files

There should be a lot more output if you have the latest version of the inline package installed.

Can you please give me the source of latest version please
Thanks

SHRINIVAS

install.packages("inline")