Closed Jack-FG closed 4 years ago
I am having this same issue. Did you find a solution before you closed this topic?
I think this is the same issue that was being discussed on the Stan forums: https://discourse.mc-stan.org/t/rstanarm-cran-vs-development-version-installation-issues/14399
Here are the two comments on that thread from @bgoodri that seemed to fix the issue for the original poster:
Does that work for you? If not definitely feel free to also follow up on that discussion on the Stan forum (or start a new one).
Yes it is the same issue, following @bgoodri notes allowed me to fix.
They are just the links posted by @jgabry
@sealavi See Jonah's comment in this issue thread. He posted the links there.
I can not download the development version of rstanarm but have no issues with the CRAN version.
I have been able to successfully follow: https://github.com/stan-dev/rstan/wiki/RStan-Getting-Started to get started.
I have installed rstan and rstanarm (Cran) and have been able to succesfully run models with rstanarm (e.g. stan_glm).
However, I now want to access the stan_surv function which is only available in the github developement version of rstanarm. When I go to download this it fails to compile and install. Please see code attached for installation.
package ‘rstan’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in C:\Users\21307937\AppData\Local\Temp\RtmpO2IHtu\downloaded_packages
√ checking for file 'C:\Users\21307937\AppData\Local\Temp\RtmpO2IHtu\remotes146ec886613f\stan-dev-rstanarm-8709540/DESCRIPTION' ...
Installing package into ‘C:/Users/21307937/OneDrive/R Packages’ (as ‘lib’ is unspecified)
*** arch - i386 "C:/PROGRA~1/R/R-35~1.2/bin/i386/Rscript" -e "source(file.path('..', 'tools', 'make_cc.R')); make_cc(commandArgs(TRUE))" stan_files/continuous.stan Wrote C++ file "stan_files/continuous.cc"
C:/Rtools/mingw_64/bin/g++.exe -m32 -std=c++1y -I"C:/PROGRA~1/R/R-35~1.2/include" -DNDEBUG -I"../inst/include" -I"C:/Users/21307937/OneDrive/R Packages/StanHeaders/include/src" -DBOOST_DISABLE_ASSERTS -DEIGEN_NO_DEBUG
"C:/PROGRA~1/R/R-35~1.2/bin/Rscript" -e "RcppParallel::CxxFlags()"
"C:/PROGRA~1/R/R-35~1.2/bin/Rscript" -e "StanHeaders:::CxxFlags()"
-I"C:/Users/21307937/OneDrive/R Packages/StanHeaders/include" -I"C:/Users/21307937/OneDrive/R Packages/rstan/include" -I"C:/Users/21307937/OneDrive/R Packages/BH/include" -I"C:/Users/21307937/OneDrive/R Packages/Rcpp/include" -I"C:/Users/21307937/OneDrive/R Packages/RcppEigen/include" -I"C:/Users/21307937/OneDrive/R Packages/RcppParallel/include" -O3 -march=native -mtune=native -c stan_files/continuous.cc -o stan_files/continuous.o Error in get(name, envir = asNamespace(pkg), inherits = FALSE) : object 'CxxFlags' not found Calls: ::: -> get Execution halted In file included from C:/Rtools/mingw_64/x86_64-w64-mingw32/include/c++/random:49:0, from C:/Rtools/mingw_64/x86_64-w64-mingw32/include/c++/bits/stl_algo.h:66, from C:/Rtools/mingw_64/x86_64-w64-mingw32/include/c++/algorithm:62, from C:/Users/21307937/OneDrive/R Packages/Rcpp/include/RcppCommon.h:63, from C:/Users/21307937/OneDrive/R Packages/Rcpp/include/Rcpp.h:27, from stan_files/continuous.cc:1: C:/Rtools/mingw_64/x86_64-w64-mingw32/include/c++/bits/random.h:106:26: error: expected unqualified-id before 'int128' { typedef unsigned int128 type; }; ^ make: *** [C:/PROGRA~1/R/R-35~1.2/etc/i386/Makeconf:213: stan_files/continuous.o] Error 1 rm stan_files/continuous.cc ERROR: compilation failed for package 'rstanarm'date 2020-04-17
assertthat 0.2.1 2019-03-21 [1] CRAN (R 3.5.3)
backports 1.1.4 2019-04-10 [1] CRAN (R 3.5.3)
callr 3.4.3 2020-03-28 [1] CRAN (R 3.5.3)
cli 2.0.2 2020-02-28 [1] CRAN (R 3.5.3)
crayon 1.3.4 2017-09-16 [1] CRAN (R 3.5.1)
curl 3.3 2019-01-10 [1] CRAN (R 3.5.2)
desc 1.2.0 2018-05-01 [1] CRAN (R 3.5.1)
devtools 2.3.0 2020-04-10 [1] CRAN (R 3.5.2)
digest 0.6.25 2020-02-23 [1] CRAN (R 3.5.3)
ellipsis 0.3.0 2019-09-20 [1] CRAN (R 3.5.3)
fansi 0.4.0 2018-10-05 [1] CRAN (R 3.5.2)
fs 1.3.1 2019-05-06 [1] CRAN (R 3.5.3)
glue 1.4.0 2020-04-03 [1] CRAN (R 3.5.3)
magrittr 1.5 2014-11-22 [1] CRAN (R 3.5.1)
memoise 1.1.0 2017-04-21 [1] CRAN (R 3.5.1)
packrat 0.5.0 2018-11-14 [1] CRAN (R 3.5.2)
pkgbuild 1.0.6.9000 2020-04-17 [1] Github (r-lib/pkgbuild@a475485) pkgload 1.0.2 2018-10-29 [1] CRAN (R 3.5.3)
prettyunits 1.0.2 2015-07-13 [1] CRAN (R 3.5.1)
processx 3.4.1 2019-07-18 [1] CRAN (R 3.5.3)
ps 1.3.0 2018-12-21 [1] CRAN (R 3.5.2)
R6 2.4.0 2019-02-14 [1] CRAN (R 3.5.2)
Rcpp 1.0.1 2019-03-17 [1] CRAN (R 3.5.3)
remotes 2.1.1 2020-02-15 [1] CRAN (R 3.5.3)
rlang 0.4.5 2020-03-01 [1] CRAN (R 3.5.3)
rprojroot 1.3-2 2018-01-03 [1] CRAN (R 3.5.1)
rstudioapi 0.11 2020-02-07 [1] CRAN (R 3.5.3)
sessioninfo 1.1.1 2018-11-05 [1] CRAN (R 3.5.3)
testthat 2.3.2 2020-03-02 [1] CRAN (R 3.5.3)
usethis * 1.6.0 2020-04-09 [1] CRAN (R 3.5.2)
withr 2.1.2 2018-03-15 [1] CRAN (R 3.5.1)
[1] C:/Users/21307937/OneDrive/R Packages [2] C:/Program Files/R/R-3.5.2/library