If you update your C++ compiler, then you need to clear out the old precompiled headers (PCH) files that are generated. Otherwise, you will get a warning that looks something like this:
error: PCH file built from a different branch ((clang-1316.0.21.2.5))
than the compiler ((clang-1400.0.29.102))
The reason for the error is that the compiler is caching partial compilation results, but that cache breaks if the compiler is updated without manually clearing out the cache. We haven’t been able to figure out how to automate instructions on how to fix because clang keeps changing the wording of the error message.
The easiest way to solve this problem is to clean all in a terminal. This can be done as follows, where <cmdstan>
is the path to the top-level directory in which cmdstan
is installed:
$ cd <cmdstan>
$ make clean-all