rstanarm icon indicating copy to clipboard operation
rstanarm copied to clipboard

Cannot install on windows

Open py9mrg opened this issue 6 years ago • 2 comments

Summary:

I updated rstan to version 2.19.3 using the C++ toolchain, with no problems. I then tried to update rstanarm and it keeps failing.

Description:

It appears to go through the first part of the compilation ok - down to and including the generation of count.o. But then I get the following error:

In file included from C:/Users/username/Documents/R/win-library/3.6/Rcpp/include/Rcpp/platform/compiler.h:100:0,
                 from C:/Users/username/Documents/R/win-library/3.6/Rcpp/include/Rcpp/r/headers.h:67,
                 from C:/Users/username/Documents/R/win-library/3.6/Rcpp/include/RcppCommon.h:29,
                 from C:/Users/username/Documents/R/win-library/3.6/Rcpp/include/Rcpp.h:27,
                 from stan_files/polr.cc:1:
C:/Rtools/mingw_32/i686-w64-mingw32/include/c++/cmath: In member function 'T stan::io::reader<T>::scalar_lub_constrain(TL, TU) [with TL = int; TU = int; T = double]':
C:/Rtools/mingw_32/i686-w64-mingw32/include/c++/cmath:1340:55: internal compiler error: in expand_expr_real_2, at expr.c:8569
       return fma(__type(__x), __type(__y), __type(__z));
                                                       ^
libbacktrace could not find executable to open
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://sourceforge.net/projects/mingw-w64> for instructions.
make: *** [C:/PROGRA~1/R/R-36~1.2/etc/i386/Makeconf:213: stan_files/polr.o] Error 1
make: *** Waiting for unfinished jobs....
In file included from C:/Users/username/Documents/R/win-library/3.6/Rcpp/include/Rcpp/platform/compiler.h:100:0,
                 from C:/Users/username/Documents/R/win-library/3.6/Rcpp/include/Rcpp/r/headers.h:67,
                 from C:/Users/username/Documents/R/win-library/3.6/Rcpp/include/RcppCommon.h:29,
                 from C:/Users/username/Documents/R/win-library/3.6/Rcpp/include/Rcpp.h:27,
                 from stan_files/bernoulli.cc:1:
C:/Rtools/mingw_32/i686-w64-mingw32/include/c++/cmath: In member function 'stan::io::reader<T>::vector_t stan::io::reader<T>::vector_lub_constrain(TL, TU, size_t) [with TL = int; TU = int; T = double; stan::io::reader<T>::vector_t = Eigen::Matrix<double, -1, 1>; size_t = unsigned int]':
C:/Rtools/mingw_32/i686-w64-mingw32/include/c++/cmath:1340:55: internal compiler error: in expand_expr_real_2, at expr.c:8569
       return fma(__type(__x), __type(__y), __type(__z));
                                                       ^
libbacktrace could not find executable to open
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://sourceforge.net/projects/mingw-w64> for instructions.
make: *** [C:/PROGRA~1/R/R-36~1.2/etc/i386/Makeconf:213: stan_files/bernoulli.o] Error 1
In file included from C:/Users/username/Documents/R/win-library/3.6/Rcpp/include/Rcpp/platform/compiler.h:100:0,
                 from C:/Users/username/Documents/R/win-library/3.6/Rcpp/include/Rcpp/r/headers.h:67,
                 from C:/Users/username/Documents/R/win-library/3.6/Rcpp/include/RcppCommon.h:29,
                 from C:/Users/username/Documents/R/win-library/3.6/Rcpp/include/Rcpp.h:27,
                 from stan_files/count.cc:1:
C:/Rtools/mingw_32/i686-w64-mingw32/include/c++/cmath: In member function 'stan::io::reader<T>::vector_t stan::io::reader<T>::vector_lub_constrain(TL, TU, size_t) [with TL = int; TU = int; T = double; stan::io::reader<T>::vector_t = Eigen::Matrix<double, -1, 1>; size_t = unsigned int]':
C:/Rtools/mingw_32/i686-w64-mingw32/include/c++/cmath:1340:55: internal compiler error: in expand_expr_real_2, at expr.c:8569
       return fma(__type(__x), __type(__y), __type(__z));
                                                       ^
libbacktrace could not find executable to open
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://sourceforge.net/projects/mingw-w64> for instructions.
make: *** [C:/PROGRA~1/R/R-36~1.2/etc/i386/Makeconf:213: stan_files/count.o] Error 1
In file included from C:/Users/username/Documents/R/win-library/3.6/Rcpp/include/Rcpp/platform/compiler.h:100:0,
                 from C:/Users/username/Documents/R/win-library/3.6/Rcpp/include/Rcpp/r/headers.h:67,
                 from C:/Users/username/Documents/R/win-library/3.6/Rcpp/include/RcppCommon.h:29,
                 from C:/Users/username/Documents/R/win-library/3.6/Rcpp/include/Rcpp.h:27,
                 from stan_files/continuous.cc:1:
C:/Rtools/mingw_32/i686-w64-mingw32/include/c++/cmath: In member function 'stan::io::reader<T>::vector_t stan::io::reader<T>::vector_lub_constrain(TL, TU, size_t) [with TL = int; TU = int; T = double; stan::io::reader<T>::vector_t = Eigen::Matrix<double, -1, 1>; size_t = unsigned int]':
C:/Rtools/mingw_32/i686-w64-mingw32/include/c++/cmath:1340:55: internal compiler error: in expand_expr_real_2, at expr.c:8569
       return fma(__type(__x), __type(__y), __type(__z));
                                                       ^
libbacktrace could not find executable to open
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://sourceforge.net/projects/mingw-w64> for instructions.
make: *** [C:/PROGRA~1/R/R-36~1.2/etc/i386/Makeconf:213: stan_files/continuous.o] Error 1
rm stan_files/jm.cc stan_files/binomial.cc stan_files/lm.cc stan_files/continuous.cc stan_files/bernoulli.cc stan_files/polr.cc stan_files/count.cc stan_files/mvmer.cc
ERROR: compilation failed for package 'rstanarm'
* removing 'C:/Users/username/Documents/R/win-library/3.6/rstanarm'
Warning in install.packages :
  installation of package ‘rstanarm’ had non-zero exit status

Reproducible Steps:

install.packages("rstanarm", type = "source")

RStanARM Version:

2.19.3

R Version:

3.6.2

Operating System:

Windows 10

py9mrg avatar Feb 13 '20 12:02 py9mrg

Possibly ran out of RAM. Possibly need to first install StanHeaders from source.

bgoodri avatar Mar 03 '20 19:03 bgoodri

I got a similar compilation error for the same file as this bug report and I fixed it by freeing more RAM in my system (Fedora 33, 8GB RAM).

carolfs avatar Mar 29 '21 19:03 carolfs