# MacOS CmdStan - xcode 12.2 update requires rebuild of binaries

**URL:** <https://discourse.mc-stan.org/t/macos-cmdstan-xcode-12-2-update-requires-rebuild-of-binaries/19508>\
**Category:** Interfaces\
**Created:** [November 26, 2020, 5:08pm UTC](https://discourse.mc-stan.org/t/macos-cmdstan-xcode-12-2-update-requires-rebuild-of-binaries/19508 "2020-11-26T17:08:41Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![mitzimorris](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mc-stan.org/mitzimorris/32/29_2.png) [@mitzimorris](https://discourse.mc-stan.org/u/mitzimorris)\
**Post date:** [November 26, 2020, 5:08pm UTC](https://discourse.mc-stan.org/t/macos-cmdstan-xcode-12-2-update-requires-rebuild-of-binaries/19508/1 "2020-11-26T17:08:41Z")

</div>

looks like the latest Xcode release has a new version of clang - tried to compile a model and got the PCH warning:

```
make examples/bernoulli/bernoulli

--- Compiling, linking C++ code ---
clang++ -std=c++1y -Wno-unknown-warning-option -Wno-tautological-compare -Wno-sign-compare -D_REENTRANT -Wno-ignored-attributes -I stan/lib/stan_math/lib/tbb_2019_U8/include -O3 -I src -I stan/src -I lib/rapidjson_1.1.0/ -I stan/lib/stan_math/ -I stan/lib/stan_math/lib/eigen_3.3.7 -I stan/lib/stan_math/lib/boost_1.72.0 -I stan/lib/stan_math/lib/sundials_5.2.0/include -DBOOST_DISABLE_ASSERTS -c -include-pch stan/src/stan/model/model_header.hpp.gch -x c++ -o examples/bernoulli/bernoulli.o examples/bernoulli/bernoulli.hpp
error: PCH file built from a different branch ((clang-1200.0.32.21)) than the compiler ((clang-1200.0.32.27))
1 error generated.
make: *** [examples/bernoulli/bernoulli] Error 1

```

to fix run commands `make clean-all` followed by `make build` (better yet, `make -j4 build`, if you’ve got the cores)

---

<div class="post-metadata">

**Author:** ![andreamoro](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mc-stan.org/andreamoro/32/10051_2.png) [@andreamoro](https://discourse.mc-stan.org/u/andreamoro)\
**Post date:** [December 1, 2020, 8:20am UTC](https://discourse.mc-stan.org/t/macos-cmdstan-xcode-12-2-update-requires-rebuild-of-binaries/19508/2 "2020-12-01T08:20:17Z")

</div>

I couldn’t even arrive to the point where I was able to get that warning. I’m on a Mac too and getting error of all sort because of the compiler.

Any chance you can offer some support on how to get this to work?

Thanks

---

<div class="post-metadata">

**Author:** ![torkar](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mc-stan.org/torkar/32/1355_2.png) [@torkar](https://discourse.mc-stan.org/u/torkar)\
**Post date:** [December 1, 2020, 8:52am UTC](https://discourse.mc-stan.org/t/macos-cmdstan-xcode-12-2-update-requires-rebuild-of-binaries/19508/3 "2020-12-01T08:52:29Z")

</div>

Submit a new post detailing your hw/sw specification and what error messages you got and I’m sure we’ll be able to help you :)

---

<div class="post-metadata">

**Author:** ![mitzimorris](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mc-stan.org/mitzimorris/32/29_2.png) [@mitzimorris](https://discourse.mc-stan.org/u/mitzimorris)\
**Post date:** [December 1, 2020, 2:59pm UTC](https://discourse.mc-stan.org/t/macos-cmdstan-xcode-12-2-update-requires-rebuild-of-binaries/19508/4 "2020-12-01T14:59:40Z")

</div>

what torkar said, in particular:

- what version of MacOS - Catalina? Big Sur?
- is this a new Mac, or did you upgrade from previous version of the OS, if so, what what is?
- did you ever have CmdStan installed and working?
