Stan troubleshooting page

Hi all. I updated my Mac and then tried rstan and, sure enough, it doesn’t work. I’m guessing that regular Stan doesn’t work either, but I haven’t tried it.

Because I just updated the Mac operating system and I immediately tried rstan and I got this message: “Error in compileCode(f, code, language = language, verbose = verbose) :
Compilation ERROR, function(s)/method(s) not created! clang: warning: no such sysroot directory: ‘/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk’ [-Wmissing-sysroot]” (along with a lot more), I’m guessing it’s some technical issue with the computer. I went on discourse and found Ben Goodrich’s advice to open Xcode on the Mac, and when I did that it gave me some updating instructions, so I’m trying that . . . I hope it works . . .

Anyway, here’s the point. We should have a Troubleshooting page on the Stan webpage with a list of common problems and, for each, what might the cause and how to fix it.

When running Stan or rstan and there’s an error, it could, in addition to spewing out gobbledygook (see below) also point to the Troubleshooting page.

OK, in the meantime the above steps finished and I tried again and rstan still doesn’t work. So I tried this other step recommended from Ben: “Try xcode-select --install from the Terminal app or the Terminal tab of the RStudio console.” Let’s see what happens . . .

[a few minutes later]

OK, that works. Cool. Rstan runs again for me. We need that troubleshooting page.


see this also in case something will bite you later:

These type of things should probably not go on a Troubleshooting page since they will be fixed more or less immediately. Discourse is perfect for these type of things.


For items that are fixed quickly, it would be fine if the Troubleshooting page just points to appropriate Discourse pages.

Other Troubleshooting items are more eternal (for example, people updating their operating systems and needing to do something with Xcode that is not mentioned on the Startup page), and there it would just be good to have the solution in one place.

1 Like