# CmdStanR - install\_cmdstan() not finishing build of cmdstan

**URL:** <https://discourse.mc-stan.org/t/cmdstanr-install-cmdstan-not-finishing-build-of-cmdstan/11929>\
**Category:** Interfaces\
**Tags:** installation, cmdstanr\
**Created:** [November 15, 2019, 12:42am UTC](https://discourse.mc-stan.org/t/cmdstanr-install-cmdstan-not-finishing-build-of-cmdstan/11929 "2019-11-15T00:42:15Z")\
**Posts on this page:** 1\
**Showing post:** 14

<div class="post-metadata">

**Author:** ![rok\_cesnovar](https://avatars.discourse-cdn.com/v4/letter/r/7bcc69/32.png) [@rok\_cesnovar](https://discourse.mc-stan.org/u/rok_cesnovar)\
**Post date:** [April 1, 2020, 7:15am UTC](https://discourse.mc-stan.org/t/cmdstanr-install-cmdstan-not-finishing-build-of-cmdstan/11929/14 "2020-04-01T07:15:27Z")

</div>

Great that you solved it!

Just to follow up, from the looks of it I would say that the previous `~/.Renviron` enforced the use of another version of clang? Is that possible?

I am guessing there was a leftover model\_header PCH file that was build using the older version of Clang. This issue would also be solved if you would clean and rebuild the cmdstan (`make clean-all`` and `make build`). We need to expose this cleanup feature via a R command anyways (cmdstan\_clean\_and\_rebuild() or something along those lines).

---

_[View the full topic](https://discourse.mc-stan.org/t/cmdstanr-install-cmdstan-not-finishing-build-of-cmdstan/11929)._
