Adding new model to stan dependent packge breaks installation of the package and returns overload error in size_zero.hpp

I have an R package that had two Stan models already.
I then followed the instructions for adding another model according to rstantools here.
But now the package will no longer install, and the step to update the dll files does not work (even if I clean them first).
The new model works (can be compiled with stan_model).
When I run Rcmd.exe INSTALL --preclean --no-multiarch --with-keep.source baldur it terminates with the following error:
C:/Users/Pberg/AppData/Local/R/win-library/4.2/StanHeaders/include/src/stan/mcmc/hmc/hamiltonians/dense_e_metric.hpp:21:10: required from here C:/Users/Pberg/AppData/Local/R/win-library/4.2/RcppEigen/include/Eigen/src/Core/DenseCoeffsBase.h:55:30: warning: ignoring attributes on template argument 'Eigen::internal::packet_traits<double>::type' {aka '__m128d'} [-Wignored-attributes] make: *** [C:/PROGRA~1/R/R-42~1.1/etc/x64/Makeconf:258: stanExports_empirical_bayes.o] Error 1 ERROR: compilation failed for package 'baldur'
and RStudio reports the following errors:

I also have a GitHub for the package if that helps: GitHub - PhilipBerg/baldur.
Please let me know what else I can provide that can help resort this. It literally worked to install and build before copying the new model.

What versions of the rstan and StanHeaders packages do you have installed?

2.26.13 for both.

You’re a few versions behind, the latest 2.26.x version is 2.26.17. I believe these errors have already been patched, you’ll just need to update

1 Like