For the first time, getting rstan to work on Windows seems to be easier than getting it to work on the Mojave version Mac OS X. Mojave seems to affect different people in different ways. Here are the things I would try if rstan is not working:
- Make sure you have opened Xcode once via Spotlight to accept its license
- If that doesn’t work but you have a
/Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14. pkg
, install that so it puts C++ headers back in/usr/include
- If that doesn’t work, rename / delete / empty the ~/.R/Makevars file to use Xcode’s
clang++
rather than LLVM’s - If that doesn’t work, recreate ~/.R/Makevars with a line that says
CXX14FLAGS = -isystem ???
where ??? means the path to the C++ header files such as/usr/include
I don’t have a Mac so if anyone has any further suggestions, chime in.