Problem overview
rstantools
stopped working for me when upgraded to R 4.0.X (both 0 and 2). and I’m not sure why. It stopped on both my native Windows R, WSL Ubuntu R, and in a Rocker Image asachet/rocker-stan docker image running RStudio. However, when I run asachet/rocker-stan:3.6.1
, rstantools
works for me.
Solutions I have tried and reproducible example
I have tried going through the simple example vignette and I get stuck at the same point in all three systems. I have looked through the Discourse Forum (e.g., here, here, and here). The last post I found with this issue was about a month ago and was using R 3.6.1 on Windows. I found another post where someone noted roxygen2
usually breaks about once a month. Is this monthly break for roxygen2
?
Specifically, when I get to this part of vignette
try(roxygen2::roxygenize(load_code = sourceDir), silent = TRUE)
pkgbuild::compile_dll()
roxygen2::roxygenize()
I get an error:
Error in (function (command = NULL, args = character(), error_on_status = TRUE, :
System command 'R' failed, exit status: 1, stdout + stderr (last 10 lines):
E> /usr/local/lib/R/site-library/StanHeaders/include/src/stan/mcmc/hmc/hamiltonians/dense_e_metric.hpp:23:56: required from ‘double stan::mcmc::dense_e_metric<Model, BaseRNG>::T(stan::mcmc::dense_e_point&) [with Model = model_lm_namespace::model_lm; BaseRNG = boost::random::additive_combine_engine<boost::random::linear_congruential_engine<unsigned int, 40014, 0, 2147483563>, boost::random::linear_congruential_engine<unsigned int, 40692, 0, 2147483399> >]’
E> /usr/local/lib/R/site-library/StanHeaders/include/src/stan/mcmc/hmc/hamiltonians/dense_e_metric.hpp:22:10: required from here
E> /usr/local/lib/R/site-library/RcppEigen/include/Eigen/src/Core/DenseCoeffsBase.h:55:30: warning: ignoring attributes on template argument ‘Eigen::internal::packet_traits<double>::type’ {aka ‘__vector(2) double’} [-Wignored-attributes]
E> g++ -std=gn
My SessionInfo()
is posted at the end of this post.
Specific questions
- How do I get the minimum example vignette working with R 4.0.X? My ideal solution would be a Docker Image that works. But, I what I need to know is what version of
rstantools
I should be using (e.g., GitHub vs CRAN)? - I there some place that tells me the above answer that I am missing? If so, how do I find it in the future?
Last, thank you (the Stan Community) for your help. I understand some packages like roxygen2
change and break your tools. Also, thank you for your work getting RStan to work with RStudio so that I can run RStan with Rocker!!!
SessionInfo()
R version 4.0.2 (2020-06-22)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 20.04 LTS
Matrix products: default
BLAS/LAPACK: /usr/lib/x86_64-linux-gnu/openblas-openmp/libopenblasp-r0.3.8.so
locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
[3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8
[5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=C
[7] LC_PAPER=en_US.UTF-8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices utils datasets methods
[7] base
loaded via a namespace (and not attached):
[1] rstan_2.19.3 RcppEigen_0.3.3.7.0 tidyselect_1.1.0
[4] xfun_0.15 purrr_0.3.4 lattice_0.20-41
[7] testthat_2.3.2 colorspace_1.4-1 vctrs_0.3.1
[10] generics_0.0.2 stats4_4.0.2 loo_2.2.0
[13] rlang_0.4.6 pkgbuild_1.0.8 pillar_1.4.4
[16] glue_1.4.1 withr_2.2.0 matrixStats_0.56.0
[19] lifecycle_0.2.0 stringr_1.4.0 munsell_0.5.0
[22] commonmark_1.7 gtable_0.3.0 inline_0.3.15
[25] knitr_1.29 callr_3.4.3 ps_1.3.3
[28] parallel_4.0.2 fansi_0.4.1 Rcpp_1.0.4.6
[31] scales_1.1.1 backports_1.1.8 pkgload_1.1.0
[34] desc_1.2.0 RcppParallel_5.0.2 StanHeaders_2.21.0-5
[37] gridExtra_2.3 ggplot2_3.3.2 packrat_0.5.0
[40] digest_0.6.25 stringi_1.4.6 processx_3.4.2
[43] dplyr_1.0.0 grid_4.0.2 rprojroot_1.3-2
[46] BH_1.72.0-3 cli_2.0.2 tools_4.0.2
[49] magrittr_1.5 tibble_3.0.1 crayon_1.3.4
[52] pkgconfig_2.0.3 ellipsis_0.3.1 Matrix_1.2-18
[55] xml2_1.3.2 prettyunits_1.1.1 assertthat_0.2.1
[58] roxygen2_7.1.1 rstudioapi_0.11 R6_2.4.1
[61] compiler_4.0.2