Skip to content

install R modules step fails on DescTools #357

@pdurbin

Description

@pdurbin

I just tried running the ec2 create script with no arguments as of 2d7f797 but it fails with the following:

TASK [dataverse : install R modules] *******************************************
changed: [localhost] => (item=R2HTML)
changed: [localhost] => (item=rjson)
failed: [localhost] (item=DescTools)

Here is the complete output: install-fail-2d7f797.txt

It tried to run it again at the command line and got the same error (maybe this output is a bit more readable):

[root@ip-172-31-91-40 ~]# R --version
R version 4.4.0 (2024-04-24) -- "Puppy Cup"
Copyright (C) 2024 The R Foundation for Statistical Computing
Platform: x86_64-redhat-linux-gnu

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under the terms of the
GNU General Public License versions 2 or 3.
For more information about these matters see
https://www.gnu.org/licenses/.

[root@ip-172-31-91-40 ~]# /usr/bin/Rscript -e 'install.packages("DescTools", repos=c("https://cloud.r-project.org/"))'
Installing package into ‘/usr/lib64/R/library’
(as ‘lib’ is unspecified)
trying URL 'https://cloud.r-project.org/src/contrib/DescTools_0.99.54.tar.gz'
Content type 'application/x-gzip' length 2654274 bytes (2.5 MB)
==================================================
downloaded 2.5 MB

* installing *source* package ‘DescTools’ ...
** package ‘DescTools’ successfully unpacked and MD5 sums checked
** using staged installation
** libs
using C compiler: ‘gcc (GCC) 8.5.0 20210514 (Red Hat 8.5.0-20)’
using Fortran compiler: ‘GNU Fortran (GCC) 8.5.0 20210514 (Red Hat 8.5.0-20)’
using C++ compiler: ‘g++ (GCC) 8.5.0 20210514 (Red Hat 8.5.0-20)’
using C++17
gcc -I"/usr/include/R" -DNDEBUG  -I'/usr/lib64/R/library/Rcpp/include' -I/usr/local/include    -fpic  -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection  -c ADinf.c -o ADinf.o
gcc -I"/usr/include/R" -DNDEBUG  -I'/usr/lib64/R/library/Rcpp/include' -I/usr/local/include    -fpic  -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection  -c AnDarl.c -o AnDarl.o
g++ -std=gnu++17 -I"/usr/include/R" -DNDEBUG  -I'/usr/lib64/R/library/Rcpp/include' -I/usr/local/include    -fpic  -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection   -c RcppExports.cpp -o RcppExports.o
g++ -std=gnu++17 -I"/usr/include/R" -DNDEBUG  -I'/usr/lib64/R/library/Rcpp/include' -I/usr/local/include    -fpic  -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection   -c aux_fct.cpp -o aux_fct.o
aux_fct.cpp: In function ‘Rcpp::List n_pow_sum(Rcpp::NumericVector)’:
aux_fct.cpp:205:23: error: ‘reduce’ is not a member of ‘std’
   double mean =  std::reduce(x.begin(), x.end(), 0.0, std::plus<double>()) / x.size();
                       ^~~~~~
aux_fct.cpp:205:23: note: suggested alternative: ‘replace’
   double mean =  std::reduce(x.begin(), x.end(), 0.0, std::plus<double>()) / x.size();
                       ^~~~~~
                       replace
make: *** [/usr/lib64/R/etc/Makeconf:204: aux_fct.o] Error 1
make: *** Waiting for unfinished jobs....
ERROR: compilation failed for package ‘DescTools’
* removing ‘/usr/lib64/R/library/DescTools’

The downloaded source packages are in
	‘/tmp/RtmpoxV6UK/downloaded_packages’
Updating HTML index of packages in '.Library'
Making 'packages.html' ... done
Warning message:
In install.packages("DescTools", repos = c("https://cloud.r-project.org/")) :
  installation of package ‘DescTools’ had non-zero exit status
[root@ip-172-31-91-40 ~]# 

I see that g++ (GCC) 8.5.0 is used but from https://stackoverflow.com/questions/76397816/error-with-stdreduce-method-in-c17-using-gnu-g17-and-clang-17-20-com and https://stackoverflow.com/questions/61564006/compilation-error-while-using-reduce-and-stdexecution-in-c it seems like we might need version 9.1? 🤷

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions