RfastOfficial / Rfast2

A collection of Rfast2 functions for data analysis. Note 1: The vast majority of the functions accept matrices only, not data.frames. Note 2: Do not have matrices or vectors with have missing data (i.e NAs). We do no check about them and C++ internally transforms them into zeros (0), so you may get wrong results. Note 3: In general, make sure you give the correct input, in order to get the correct output. We do no checks and this is one of the many reasons we are fast.
38 stars 4 forks source link

Installation failed #25

Closed joonlee3 closed 9 months ago

joonlee3 commented 1 year ago

Hi,

I failed to install Rfast2. It seems to be associated with parallel.h.

  • installing source package ‘Rfast2’ ... package ‘Rfast2’ successfully unpacked and MD5 sums checked using staged installation ** libs using C compiler: ‘gcc (GCC) 8.3.1 20190311 (Red Hat 8.3.1-3)’ using C++ compiler: ‘g++ (GCC) 8.3.1 20190311 (Red Hat 8.3.1-3)’ using C++17 /opt/rh/devtoolset-8/root/usr/bin/g++ -std=gnu++17 -I"/opt/R-shared/4.3.0/lib64/R/include" -DNDEBUG -I../inst/include -I'/cloud-home/I0180769/R/x86_64-pc-linux-gnu-library/4.3.0/Rcpp/include' -I'/cloud-home/I0180769/R/x86_64-pc-linux-gnu-library/4.3.0/RcppArmadillo/include' -I'/opt/R/site_lib/RLib_Common/4.3.0/RcppParallel/include' -I/usr/local/include -fopenmp -fpic -g -O2 -c Eval.cpp -o Eval.o In file included from ../inst/include/Rfast2/templates.h:10, from Eval.cpp:7: ../inst/include/Rfast2/parallel.h:20:10: fatal error: execution: No such file or directory

    include

      ^~~~~~~~~~~

    compilation terminated. make: *** [Eval.o] Error 1 ERROR: compilation failed for package ‘Rfast2’

  • removing ‘/cloud-home/I0180769/R/x86_64-pc-linux-gnu-library/4.3.0/Rfast2’ Warning in install.packages : installation of package ‘Rfast2’ had non-zero exit status

If you have any suggestions, please let me know. Thank you.

Best, Joon

ruizederick commented 11 months ago

Hi,

The compiler your using (g++ version 8.3) doesn't support \<execution> library, you should use g++ version 9 or higher .

sudo yum install gcc-toolset-9
export PATH=/opt/rh/gcc-toolset-9/root/bin/:$PATH

This should solve the problem.