Closed rLannes closed 1 year ago
Please post the complete output from install.packages("igraph")
in a new session, which will help us pinpoint the problem.
There is likely an incompatibility with CentOS 7, which should be fixable if we understand what it is. That said, I strongly recommend against using extremely outdated systems such as CentOS 7. Note that this OS was released more than 8 years ago, and it is based on GCC 4.8, released well over 9 years ago. We cannot test igraph on such ancient systems.
thank you for your answer, in the end I am unable to provides the full log as my sys admin installed it for me.
@rLannes Feel free to point your sysadmin to this issue. If they can provide the full output, it would be appreciated. This is almost certainly fixable, but we need to see the logs first.
I have the same issue:
Please indicate your operating system and it version, as well as the GCC version you have (gcc --version
). Also post the output of executing sessionInfo()
in R.
> sessionInfo()
R version 4.0.3 (2020-10-10)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: CentOS Linux 7 (Core)
Matrix products: default
BLAS: /usr/local/lib64/R/lib/libRblas.so
LAPACK: /usr/local/lib64/R/lib/libRlapack.so
locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
[3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8
[5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=en_US.UTF-8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] compiler_4.0.3 tools_4.0.3 tcltk_4.0.3
gcc --version
gcc (GCC) 8.4.0
Copyright (C) 2018 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
uname -a
Linux T01 3.10.0-1160.el7.x86_64 #1 SMP Mon Oct 19 16:18:59 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
cat /proc/version
Linux version 3.10.0-1160.el7.x86_64 (mockbuild@kbuilder.bsys.centos.org) (gcc version 4.8.5 20150623 (Red Hat 4.8.5-44) (GCC) ) #1 SMP Mon Oct 19 16:18:59 UTC 2020
cat /etc/redhat-release
CentOS Linux release 7.9.2009 (Core)
The headers on your system do not seem to include POSIX-standard functions such as strcasecmp
, fileno
or stpcpy
, even though igraph does define _GNU_SOURCE
.
I am not sure why this is. I wonder if you get any errors when you compile this C program:
// test.c
#include <string.h>
int main(void) {
char *a = "abc", *b = "def";
stpcpy(a,b);
return 0;
}
Do you get any errors when you compile in the following ways?
gcc test.c
gcc -D_GNU_SOURCE=1 test.c
gcc -D_POSIX_C_SOURCE=200809L test.c
To look into this properly, we'll need access to a CentOS 7 system, which will take time.
I should note that CentOS has been discontinued. CentOS 8 is already unsupported, and CentOS 7 (which is nearly 10 years old!) will lose all support in less than a year. https://endoflife.date/centos I suggest you do not use this extremely outdated operating system.
All the gcc commands ran with no error, but running the output file has the error: Segmentation fault (core dumped)
Looking into this in a Docker container with CentOS 7, FYI.
I cannot reproduce this problem in a clean CentOS 7 Docker container with R 4.0.3, installed from an official RPM package from cdn.rstudio.com
(since CentOS 7 originally comes with R 3.6.0). install.packages("igraph")
works just fine in this environment.
Output of sessionInfo()
:
> sessionInfo()
R version 4.0.3 (2020-10-10)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: CentOS Linux 7 (Core)
Matrix products: default
BLAS/LAPACK: /usr/lib64/libopenblasp-r0.3.3.so
locale:
[1] C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] compiler_4.0.3 tools_4.0.3
GCC version (standard, from CentOS 7):
[root@4daed352a77c /]# gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/4.8.5/lto-wrapper
Target: x86_64-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-linker-hash-style=gnu --enable-languages=c,c++,objc,obj-c++,java,fortran,ada,go,lto --enable-plugin --enable-initfini-array --disable-libgcj --with-isl=/builddir/build/BUILD/gcc-4.8.5-20150702/obj-x86_64-redhat-linux/isl-install --with-cloog=/builddir/build/BUILD/gcc-4.8.5-20150702/obj-x86_64-redhat-linux/cloog-install --enable-gnu-indirect-function --with-tune=generic --with-arch_32=x86-64 --build=x86_64-redhat-linux
Thread model: posix
gcc version 4.8.5 20150623 (Red Hat 4.8.5-44) (GCC)
Other relevant info:
[root@4daed352a77c /]# uname -a
Linux 4daed352a77c 5.10.124-linuxkit #1 SMP PREEMPT Thu Jun 30 08:18:26 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
[root@4daed352a77c /]# cat /proc/version
Linux version 5.10.124-linuxkit (root@buildkitsandbox) (gcc (Alpine 10.2.1_pre1) 10.2.1 20201203, GNU ld (GNU Binutils) 2.35.2) #1 SMP PREEMPT Thu Jun 30 08:18:26 UTC 2022
[root@4daed352a77c /]# cat /etc/redhat-release
CentOS Linux release 7.9.2009 (Core)
It seems the main difference is the gcc version 4.8.5 vs 8.4.0
I tried with GCC 8.3.1 installed from official CentOS repositories like so: https://unix.stackexchange.com/a/508769/309566 I still cannot reproduce the issue. There is something special about your setup that prevents POSIX functions from being visible to the compiler.
At this point we have to stop putting effort into this, considering that:
You might try the following:
Create ~/.R/Makevars
if it does not exist yet, and add the following to it:
CPPFLAGS += -D_GNU_SOURCE=1
The CPPFLAGS works. Thank you!
Thanks for the feedback about that. We'll apply this fix to the next version then. Can you add that compiler option, @krlmlr ?
This old thread has been automatically locked. If you think you have found something related to this, please open a new issue and link to this old issue if necessary.
I got the following error trying to install Rigraph either using install.packages or remotes::instal_github.
I don't understand the error message, could you help me?