# Error in rstan

**URL:** <https://discourse.mc-stan.org/t/error-in-rstan/11368>\
**Category:** RStan\
**Created:** [October 12, 2019, 4:32pm UTC](https://discourse.mc-stan.org/t/error-in-rstan/11368 "2019-10-12T16:32:42Z")\
**Posts on this page:** 1\
**Showing post:** 14

<div class="post-metadata">

**Author:** ![mansillo](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mc-stan.org/mansillo/32/4308_2.png) [@mansillo](https://discourse.mc-stan.org/u/mansillo)\
**Post date:** [October 16, 2019, 5:54am UTC](https://discourse.mc-stan.org/t/error-in-rstan/11368/14 "2019-10-16T05:54:44Z")

</div>

So I suspect this

> [@mansillo](#):
>
> I get this:
> 
> ```no-highlight
> Error in compileCode(f, code, language = language, verbose = verbose) : 
> Compilation ERROR, function(s)/method(s) not created! In file included from file5cb159435b8.cpp:8:
> In file included from /Users/lukemansillo/Library/R/3.6/library/StanHeaders/include/src/stan/model/model_header.hpp:4:
> In file included from /Users/lukemansillo/Library/R/3.6/library/StanHeaders/include/stan/math.hpp:4:
> In file included from /Users/lukemansillo/Library/R/3.6/library/StanHeaders/include/stan/math/rev/mat.hpp:4:
> In file included from /Users/lukemansillo/Library/R/3.6/library/StanHeaders/include/stan/math/rev/core.hpp:5:
> In file included from /Users/lukemansillo/Library/R/3.6/library/StanHeaders/include/stan/math/rev/core/build_vari_array.hpp:4:
> In file included from /Users/lukemansillo/Library/R/3.6/library/StanHeaders/include/stan/math/prim/mat/fun/Eigen.hpp:4:
> In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/RcppEigen/include/Eigen/Dense:1:
> In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/librar
> 
> ```

was not what you were after when you said this:

> [@bgoodri](#):
>
> OK. That is a different problem then. What does
> 
> ```no-highlight
> library(rstan)
> example(stan_model, run.dontrun = TRUE)
> 
> ```
> 
> output on the line that has `error:` in it (with the colon)?

I’m not feeling like the sharpest tool in the shed at the moment so please bear with me (and you have my utter thanks).

Yesterday I was getting these errors then did something to Makevars and when I tried to run a model in brms the errors were the same as this:

> [@Dealing with Catalina](https://discourse.mc-stan.org/t/dealing-with-catalina/11285/3):
>
> Hi
> 
> I upgraded by mistake :( Well, I fired up `RStudio` and ran my script I worked on yesterday (after having updated `Xcode` and the command line tools, and accepting the license agreement). Now, I get an error.
> 
> I use `brms` and it compiles and starts sampling but then during warmup I get this:
> 
> > Chain 2: Iteration: 1 / 2000 [0%] (Warmup)  
> > [1] “Error in sampler$call\_sampler(args\_list[[i]]) : "  
> > [2] " c++ exception (unknown reason)”  
> > error occurred during calling the sampler; sampling not done

I tried to reinstall rstan and then the error I am querying reappeared.

My workflow is mostly in brms now so I am at a bit of a loss about how the `fix_Mac` function could work.

Is there anything I do to help?

---

_[View the full topic](https://discourse.mc-stan.org/t/error-in-rstan/11368)._
