RfastOfficial / Rfast

A collection of Rfast 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.
143 stars 19 forks source link

installation issue glm #18

Closed tapj closed 4 years ago

tapj commented 4 years ago

Hi,

installation works well on windows 10 R 3.6 but failled on RedHat centOS with R 3.6. It failled when compiling glm function. I tested old archive without success.

I also tried from github or CRAN. please find error output below:

thank you for any help

glm.cpp: In function ‘Rcpp::List glm_logistic(Rcpp::NumericMatrix, Rcpp::NumericVector, double, int)’:
glm.cpp:60:21: error: call of overloaded ‘isinf(double&)’ is ambiguous
     if ( isinf(negLL) || lambda[0]*ta/2 < tol || prevNegLL - negLL < lltol) {
                     ^
glm.cpp:60:21: note: candidates are:
In file included from /usr/include/features.h:375:0,
                 from /usr/include/c++/4.8.2/x86_64-redhat-linux/bits/os_defines.h:39,
                 from /usr/include/c++/4.8.2/x86_64-redhat-linux/bits/c++config.h:2097,
                 from /usr/include/c++/4.8.2/cmath:41,
                 from /home/tapju/R/x86_64-redhat-linux-gnu-library/3.6/Rcpp/include/Rcpp/platform/compiler.h:100,
                 from /home/tapju/R/x86_64-redhat-linux-gnu-library/3.6/Rcpp/include/Rcpp/r/headers.h:67,
                 from /home/tapju/R/x86_64-redhat-linux-gnu-library/3.6/Rcpp/include/RcppCommon.h:29,
                 from /home/tapju/R/x86_64-redhat-linux-gnu-library/3.6/RcppArmadillo/include/RcppArmadilloForward.h:26,
                 from /home/tapju/R/x86_64-redhat-linux-gnu-library/3.6/RcppArmadillo/include/RcppArmadillo.h:31,
                 from glm.cpp:3:
/usr/include/bits/mathcalls.h:202:1: note: int isinf(double)
 __MATHDECL_1 (int,isinf,, (_Mdouble_ __value)) __attribute__ ((__const__));
 ^
In file included from /home/tapju/R/x86_64-redhat-linux-gnu-library/3.6/Rcpp/include/Rcpp/platform/compiler.h:100:0,
                 from /home/tapju/R/x86_64-redhat-linux-gnu-library/3.6/Rcpp/include/Rcpp/r/headers.h:67,
                 from /home/tapju/R/x86_64-redhat-linux-gnu-library/3.6/Rcpp/include/RcppCommon.h:29,
                 from /home/tapju/R/x86_64-redhat-linux-gnu-library/3.6/RcppArmadillo/include/RcppArmadilloForward.h:26,
                 from /home/tapju/R/x86_64-redhat-linux-gnu-library/3.6/RcppArmadillo/include/RcppArmadillo.h:31,
                 from glm.cpp:3:
/usr/include/c++/4.8.2/cmath:608:3: note: constexpr bool std::isinf(long double)
   isinf(long double __x)
   ^
/usr/include/c++/4.8.2/cmath:604:3: note: constexpr bool std::isinf(double)
   isinf(double __x)
   ^
/usr/include/c++/4.8.2/cmath:600:3: note: constexpr bool std::isinf(float)
   isinf(float __x)
   ^
glm.cpp:69:17: error: call of overloaded ‘isinf(double&)’ is ambiguous
   if ( isinf(dev) )
                 ^
glm.cpp:69:17: note: candidates are:
In file included from /usr/include/features.h:375:0,
                 from /usr/include/c++/4.8.2/x86_64-redhat-linux/bits/os_defines.h:39,
                 from /usr/include/c++/4.8.2/x86_64-redhat-linux/bits/c++config.h:2097,
                 from /usr/include/c++/4.8.2/cmath:41,
                 from /home/tapju/R/x86_64-redhat-linux-gnu-library/3.6/Rcpp/include/Rcpp/platform/compiler.h:100,
                 from /home/tapju/R/x86_64-redhat-linux-gnu-library/3.6/Rcpp/include/Rcpp/r/headers.h:67,
                 from /home/tapju/R/x86_64-redhat-linux-gnu-library/3.6/Rcpp/include/RcppCommon.h:29,
                 from /home/tapju/R/x86_64-redhat-linux-gnu-library/3.6/RcppArmadillo/include/RcppArmadilloForward.h:26,
                 from /home/tapju/R/x86_64-redhat-linux-gnu-library/3.6/RcppArmadillo/include/RcppArmadillo.h:31,
                 from glm.cpp:3:
/usr/include/bits/mathcalls.h:202:1: note: int isinf(double)
 __MATHDECL_1 (int,isinf,, (_Mdouble_ __value)) __attribute__ ((__const__));
 ^
In file included from /home/tapju/R/x86_64-redhat-linux-gnu-library/3.6/Rcpp/include/Rcpp/platform/compiler.h:100:0,
                 from /home/tapju/R/x86_64-redhat-linux-gnu-library/3.6/Rcpp/include/Rcpp/r/headers.h:67,
                 from /home/tapju/R/x86_64-redhat-linux-gnu-library/3.6/Rcpp/include/RcppCommon.h:29,
                 from /home/tapju/R/x86_64-redhat-linux-gnu-library/3.6/RcppArmadillo/include/RcppArmadilloForward.h:26,
                 from /home/tapju/R/x86_64-redhat-linux-gnu-library/3.6/RcppArmadillo/include/RcppArmadillo.h:31,
                 from glm.cpp:3:
/usr/include/c++/4.8.2/cmath:608:3: note: constexpr bool std::isinf(long double)
   isinf(long double __x)
   ^
/usr/include/c++/4.8.2/cmath:604:3: note: constexpr bool std::isinf(double)
   isinf(double __x)
   ^
/usr/include/c++/4.8.2/cmath:600:3: note: constexpr bool std::isinf(float)
   isinf(float __x)
   ^
make: *** [glm.o] Error 1
ERROR: compilation failed for package ‘Rfast’
> sessionInfo()
R version 3.6.0 (2019-04-26)
Platform: x86_64-redhat-linux-gnu (64-bit)
Running under: CentOS Linux 7 (Core)

Matrix products: default
BLAS/LAPACK: /usr/lib64/R/lib/libRblas.so
tapj commented 4 years ago

ok this is related to https://github.com/RfastOfficial/Rfast/issues/8