Error when installing igraph on Debian: isfinite() not available

Hello,

I’d like to use igraph in R, on Debian, but I’ve not succeeded in installing it via install.packages(“igraph”). The following error is returned: “configure: error: isfinite() not available”. My R version is 3.3.3. I’ve also attempted to install the package using the tar.gz file directly, but with no success.

Thanks in advance.

Which Debian version are you using?

What is your compiler version?

Hello,

I’m not familiar with this OS (it’s a remote server that I’m using), but this is what I have:

Debian 4.9.189-3 (2019-09-02) x86_64
gcc (Debian 6.3.0-18+deb9u1) 6.3.0 20170516

I’m not sure if this is what you asked for. Thanks.

Hello,

The configuration script of R-igraph complains that your C compiler does not provide the isfinite() function, which is supposed to be provided if the compiler supports C99.

What happens if you try to compile the following piece of C code with gcc?

#include <math.h>

int main(int argc, char* argv[]) {
    double f = 0.0; isfinite(f);
    return 0;
}

This is exactly the piece of code that R-igraph is trying to compile to determine whether your compiler supports isfinite().

GCC 6.3 should default to C11, i.e. newer than C99. Perhaps your very old (5 yrs+) R version is passing options that prevents this? You can try this, but it’s best to install a recent R (or ask your sysadmin to do it).

Hello tamas, nothing is returned, strangely. I did this: gcc test.c (where test.c is that program’s source file). I also tried gcc test.c -o test.exe (and chmod +x a.out followed by ./a.out, something I found on the web).

I followed the advice of that link, with both C11 and C99. The same error occurred. This states that certain prerequisites for Debian are contained in the build-essential package, which I also have a difficulty installing (because of the R version).

I suggest you install a recent R version, and try with that. If it still does not work, post the full output from the installation attempt.