Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installation error #8

Closed
ponnet opened this issue Jan 9, 2020 · 8 comments
Closed

Installation error #8

ponnet opened this issue Jan 9, 2020 · 8 comments
Labels
bug Something isn't working

Comments

@ponnet
Copy link

ponnet commented Jan 9, 2020

Unable to install the package:
make: *** [glm.o] Error 1
ERROR: compilation failed for package ‘Rfast’

  • removing ‘/mnt/exports/shared/home/R/x86_64-redhat-linux-gnu-library/3.5/Rfast’
@ManosPapadakis95
Copy link
Contributor

This is the error?

@ponnet
Copy link
Author

ponnet commented Jan 14, 2020

make: *** [glm.o] Error 1

This is the only one that comes up

@zji90
Copy link

zji90 commented Jan 20, 2020

Same error

@Cortalak
Copy link

Cortalak commented Jan 23, 2020

Hello, first of all thanks a lot for the package I was always frustrated how some very simple function was so unoptimised in R.

I have the same issue on centos 7 with r version 3.6.
The issue didn't happen when using a conda environnment and when installing on my ubuntu machine.

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

Rcpp version is 1.03
RcppArmadillo_0.9.800.3.0

I actually suspect that it is due to the gcc compiler version (4.8.5 in my case)

@Japrin
Copy link

Japrin commented Feb 6, 2020

The same error when I use gcc 5.2.0. Then I installed another gcc version, ie gcc 6.4.0. The error had gone.

@HenrikBengtsson
Copy link

To narrow in on the gcc requirements: I can confirm that Rfast requires something newer than gcc 5.3.1. I got it to work gcc 6.3.1 (see next comment). Those are the only versions I could test with.

Maybe you could add a note on this in the DESCRIPTION file? It'll help people on RHEL/CentOS.

Details

FWIW, with gcc 4.8.3 (comes with CentOS 7) and gcc 5.3.1 (comes with SCL 'devtoolset-4'), the essential compilation error is:

g++ -std=gnu++11 -I"/wynton/home/cbi/shared/software/CBI/R-3.6.2/lib64/R/include" -DNDEBUG -I../inst/include -I"/wyn
ton/home/cbi/hb/R/x86_64-pc-linux-gnu-library/3.6-CBI-revdepcheck/Rcpp/include" -I"/wynton/home/cbi/hb/R/x86_64-pc-l
inux-gnu-library/3.6-CBI-revdepcheck/RcppArmadillo/include" -I/usr/local/include -fopenmp -fpic  -g -O2  -c glm.cpp 
-o glm.o
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) {
In file included from /usr/include/features.h:375:0,
                 from /opt/rh/devtoolset-4/root/usr/include/c++/5.3.1/x86_64-redhat-linux/bits/os_defines.h:39,
                 from /opt/rh/devtoolset-4/root/usr/include/c++/5.3.1/x86_64-redhat-linux/bits/c++config.h:2255,
                 from /opt/rh/devtoolset-4/root/usr/include/c++/5.3.1/cmath:41,
                 from /wynton/home/cbi/hb/R/x86_64-pc-linux-gnu-library/3.6-CBI-revdepcheck/Rcpp/include/Rcpp/platfo
rm/compiler.h:100,
                 from /wynton/home/cbi/hb/R/x86_64-pc-linux-gnu-library/3.6-CBI-revdepcheck/Rcpp/include/Rcpp/r/head
ers.h:67,
                 from /wynton/home/cbi/hb/R/x86_64-pc-linux-gnu-library/3.6-CBI-revdepcheck/Rcpp/include/RcppCommon.
h:29,
                 from /wynton/home/cbi/hb/R/x86_64-pc-linux-gnu-library/3.6-CBI-revdepcheck/RcppArmadillo/include/Rc
ppArmadilloForward.h:26,
                 from /wynton/home/cbi/hb/R/x86_64-pc-linux-gnu-library/3.6-CBI-revdepcheck/RcppArmadillo/include/Rc
ppArmadillo.h:31,
                 from glm.cpp:3:
/usr/include/bits/mathcalls.h:202:1: note: candidate: int isinf(double)
 __MATHDECL_1 (int,isinf,, (_Mdouble_ __value)) __attribute__ ((__const__));
...

@HenrikBengtsson
Copy link

RedHat/CentOS users: If you're on RHEL/CentOS and have CentOS Software Collections (SCL) installed - check with scl --list, you can compile Rfast using SCL devtools-6 or newer. This is what I did on an up-to-date CentOS 7 distro:

## Too old
$ gcc --version | head -1
gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-39)

## Use a less old gcc version
$ scl enable devtoolset-6 bash

$ gcc --version |head -1
gcc (GCC) 6.3.1 20170216 (Red Hat 6.3.1-3)

## Now we can compile Rfast
$ Rscript -e "install.packages('Rfast')"
* installing *source* package ‘Rfast’ ...
** package ‘Rfast’ successfully unpacked and MD5 sums checked
** using staged installation
...
** testing if installed package can be loaded from final location
** testing if installed package keeps a record of temporary installation path
* DONE (Rfast)

## Done; disable the SCL again
$ exit

## Back too old setup, ...
$ gcc --version | head -1
gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-39)

## ... but it doesn't matter when it comes using Rfast
$ Rscript -e "packageVersion('Rfast')" -e "loadNamespace('Rfast')"
[1] ‘1.9.8’
<environment: namespace:Rfast>

$

@ManosPapadakis95
Copy link
Contributor

The error has been fixed.

@ManosPapadakis95 ManosPapadakis95 added the bug Something isn't working label Apr 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

6 participants