Closed leungi closed 4 years ago
I am guessing your C++ compiler is too old and / or does not have the C++14 flags set.
I can confirm that g++ 4.8.5 that comes with RHEL/CentOS 7 is too old;
$ g++ --version
g++ (GCC) 4.8.5 20150623 (Red Hat 4.8.5-39)
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
If you have a devtoolset Software Collection (SCL) installed on your RHEL/CentOS system, then you have access to a newer compiler, e.g.
$ scl enable devtoolset-4 "g++ --version"
g++ (GCC) 5.3.1 20160406 (Red Hat 5.3.1-6)
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
$ scl enable devtoolset-6 "g++ --version"
g++ (GCC) 6.3.1 20170216 (Red Hat 6.3.1-3)
Copyright (C) 2016 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
$ scl enable devtoolset-7 "g++ --version"
g++ (GCC) 7.3.1 20180303 (Red Hat 7.3.1-5)
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
I've tried, and it's sufficient to use g++ 5.3.1 to compile rstanarm on R 3.6.3 and R 4.0.0:
$ scl enable devtoolset-4 "Rscript -e 'install.packages(\"rstanarm\", repos=\"https://cloud.r-project.org\")'"
@bgoodri, I guess it's sufficient with g++ (>= 4.9.0) but I don't have access to that so I cannot test. Eitherway, I think this would be useful to add to the documentation/SystemRequirements:
because there are lots of people in academia on RHEL/CentOS compute clusters out there.
@bgoodri , @HenrikBengtsson : thank you both for the feedback!
I'll try your suggestions and hope to close this ticket soon.
Wohooo 🎉
@HenrikBengtsson: works like magic! Thanks again 🙇♂️
For future me (and others): enable scl
prior to running R or store it in /etc/profile
:
scl enable devtoolset-7 "R"
FYI: gcc (GCC) 4.9.2 20150212 (Red Hat 4.9.2-6)
from devtoolset-3
is sufficient to install rstan with the appropriate CXX14FLAGS in ~/.R/Makevars (https://github.com/stan-dev/rstan/issues/569#issuecomment-473407840), but is not sufficient to install rstanarm.
Summary:
Able to install
rstan
, but notrstanarm
.Reviewed and tried suggestions fron #293, #408 and #394, but no luck.
Tried installing a few ways, and all give the same error message:
Reproducible Steps:
RStanARM Version:
2.19.3
Session info