I accepted Xcode, loaded the new version, and restarted R.
> library(rstan)
> example(stan_model, 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)
Error in compileCode(f, code, language = language, verbose = verbose) :
Compilation ERROR, function(s)/method(s) not created! In file included from file4f39414ad5fc.cpp:8:
In file included from /Library/Frameworks/R.framework/Versions/3.5/Resources/library/StanHeaders/include/src/stan/model/model_header.hpp:4:
In file included from /Library/Frameworks/R.framework/Versions/3.5/Resources/library/StanHeaders/include/stan/math.hpp:4:
In file included from /Library/Frameworks/R.framework/Versions/3.5/Resources/library/StanHeaders/include/stan/math/rev/mat.hpp:4:
In file included from /Library/Frameworks/R.framework/Versions/3.5/Resources/library/StanHeaders/include/stan/math/rev/core.hpp:4:
In file included from /Library/Frameworks/R.framework/Versions/3.5/Resources/library/StanHeaders/include/stan/math/rev/core/autodiffstackstorage.hpp:4:
In file included from /Library/Frameworks/R.framework/Versions/3.5/Resources/library/StanHeaders/include/stan/math/memory/stack_alloc.hpp:8:
In file included from /usr/local/clang4/bin/../include/c++/v1/cstdlib:86:
In addition: Warning message:
In system(cmd, intern = !verbose) :
running command '/Library/Frameworks/R.framework/Resources/bin/R CMD SHLIB file4f39414ad5fc.cpp 2> file4f39414ad5fc.cpp.err.txt' had status 1
Error in sink(type = "output") : invalid connection