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).