# R Package Maintainers Using Stan - Please Read

**URL:** <https://discourse.mc-stan.org/t/r-package-maintainers-using-stan-please-read/24131>\
**Category:** RStan\
**Created:** [August 27, 2021, 3:15pm UTC](https://discourse.mc-stan.org/t/r-package-maintainers-using-stan-please-read/24131 "2021-08-27T15:15:37Z")\
**Posts on this page:** 3\
**Page:** 2

<div class="post-metadata">

**Author:** ![cjvanlissa](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mc-stan.org/cjvanlissa/32/13282_2.png) [@cjvanlissa](https://discourse.mc-stan.org/u/cjvanlissa)\
**Post date:** [December 10, 2021, 6:18pm UTC](https://discourse.mc-stan.org/t/r-package-maintainers-using-stan-please-read/24131/22 "2021-12-10T18:18:03Z")

</div>

Dear all, I’ve been developing a package that uses rstan, and saw this thread. After updating StanHeaders and rstan and running `rstantools::use_rstan()`, my package no longer compiles. Even following the vignette to create a test package ends in a compilation error (below). Is there something obvious I missed? Thank you kindly.

```
   ERROR: compilation failed for package 'rstanTemplate'
- removing 'C:/Users/lissa102/AppData/Local/Temp/RtmpK69JjF/devtools_install_557c6bc0e69/rstanTemplate'
Error in (function (command = NULL, args = character(), error_on_status = TRUE, : 
  System command 'Rcmd.exe' failed, exit status: 1, stdout + stderr (last 10 lines):
E> C:/Program Files/R/R-4.1.2/library/RcppEigen/include/Eigen/src/Core/ProductEvaluators.h:251:23: required from 'static void Eigen::internal::generic_product_impl<Lhs, Rhs, Eigen::DenseShape, Eigen::DenseShape, 6>::evalTo(Dst&, const Lhs&, const Rhs&) [with Dst = Eigen::Matrix<double, 1, 1, 0, 1, 1>; Lhs = Eigen::Product<Eigen::CwiseBinaryOp<Eigen::internal::scalar_product_op<double, double>, const Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<double>, const Eigen::Matrix<double, 1, -1> >, const Eigen::Transpose<Eigen::Matrix<double, -1, 1> > >, Eigen::Matrix<double, -1, -1>, 0>; Rhs = Eigen::Matrix<double, -1, 1>]'
E> C:/Program Files/R/R-4.1.2/library/RcppEigen/include/Eigen/src/Core/ProductEvaluators.h:124:75: required from 'Eigen::internal::product_evaluator<Eigen::Product<Lhs, Rhs, Option>, ProductTag, L
[...]
Type .Last.error.trace to see where the error occurred

```

---

<div class="post-metadata">

**Author:** ![cjvanlissa](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mc-stan.org/cjvanlissa/32/13282_2.png) [@cjvanlissa](https://discourse.mc-stan.org/u/cjvanlissa)\
**Post date:** [December 10, 2021, 9:13pm UTC](https://discourse.mc-stan.org/t/r-package-maintainers-using-stan-please-read/24131/23 "2021-12-10T21:13:18Z")

</div>

Hmm… all new installation of R, Rstudio and Rtools fixed it.

---

<div class="post-metadata">

**Author:** ![wds15](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mc-stan.org/wds15/32/908_2.png) [@wds15](https://discourse.mc-stan.org/u/wds15)\
**Post date:** [December 10, 2021, 10:33pm UTC](https://discourse.mc-stan.org/t/r-package-maintainers-using-stan-please-read/24131/24 "2021-12-10T22:33:20Z")

</div>

Glad it’s solved now. Thanks for bringing your package up to date.

[Previous page](https://discourse.mc-stan.org/t/r-package-maintainers-using-stan-please-read/24131.md?page=1)
