R Package Maintainers Using Stan - Please Read

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

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

1 Like

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

1 Like