Hello,
My R crashes when I try to compile it manually. This is the output of make
when trying to compile sagemath
from scratch:
gcc -std=gnu99 -I../../../../include -I../../../include -I../../../../src/include -DHAVE_CONFIG_H -I/home/liori/sage/sage-4.8/l
e -L/home/liori/sage/sage-4.8/local/lib/ -march=nocona -O2 -fomit-frame-pointer -s -pipe -c md5.c -o md5.o
gcc -std=gnu99 -I../../../../include -I../../../include -I../../../../src/include -DHAVE_CONFIG_H -I/home/liori/sage/sage-4.8/l
e -L/home/liori/sage/sage-4.8/local/lib/ -march=nocona -O2 -fomit-frame-pointer -s -pipe -c signals.c -o signals.o
gcc -std=gnu99 -shared -L/home/liori/sage/sage-4.8/local/lib/ -o tools.so text.o init.o Rmd5.o md5.o signals.o -L../../../../li
make[8]: Entering directory `/home/liori/sage/sage-4.8/spkg/build/r-2.14.0.p1/src/src/library/tools/src'
make[8]: `Makedeps' is up to date.
make[8]: Leaving directory `/home/liori/sage/sage-4.8/spkg/build/r-2.14.0.p1/src/src/library/tools/src'
make[8]: Entering directory `/home/liori/sage/sage-4.8/spkg/build/r-2.14.0.p1/src/src/library/tools/src'
mkdir -p -- ../../../../library/tools/libs
make[8]: Leaving directory `/home/liori/sage/sage-4.8/spkg/build/r-2.14.0.p1/src/src/library/tools/src'
make[7]: Leaving directory `/home/liori/sage/sage-4.8/spkg/build/r-2.14.0.p1/src/src/library/tools/src'
make[6]: Leaving directory `/home/liori/sage/sage-4.8/spkg/build/r-2.14.0.p1/src/src/library/tools'
*** caught segfault ***
address 0x7fff17a1f090, cause 'memory not mapped'
aborting ...
/bin/bash: line 1: 9951 Done echo "tools:::.install_package_description('.', '"../../../library/tools"')"
9952 Segmentation fault | R_DEFAULT_PACKAGES=NULL ../../../bin/R --vanilla --slave > /dev/null
Same thing when I tried to use a binary sagemath
distribution and just recompile R there using ./sage -f r
. When R is run as standalone binary, it crashes right after printing invitation text. I launched it with .../R --debugger gdb
and printed backtrace:
[...]
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
Program received signal SIGSEGV, Segmentation fault.
strchrnul () at ../sysdeps/x86_64/strchrnul.S:34
34 ../sysdeps/x86_64/strchrnul.S: No such file or directory.
in ../sysdeps/x86_64/strchrnul.S
Current language: auto
The current source language is "auto; currently asm".
(gdb) bt
#0 strchrnul () at ../sysdeps/x86_64/strchrnul.S:34
#1 0x00007ffff712cd2f in __find_specmb (s=0x7fffffff9a00, format=0x7ffffffff028 <Address 0x7ffffffff028 out of bounds>,
ap=0x7fffffffbb80) at printf-parse.h:99
#2 _IO_vfprintf_internal (s=0x7fffffff9a00, format=0x7ffffffff028 <Address 0x7ffffffff028 out of bounds>, ap=0x7fffffffbb80)
at vfprintf.c:1325
#3 0x00007ffff71524f2 in _IO_vsnprintf (string=0x7fffffff9b80 "", maxlen=<value optimized out>,
format=0x7ffffffff028 <Address 0x7ffffffff028 out of bounds>, args=0x7fffffffbb80) at vsnprintf.c:120
#4 0x00007ffff793671b in Rvsnprintf () from /home/liori/sage/sage-4.8/spkg/build/r-2.14.0.p1/src/lib/libR.so
#5 0x00007ffff7939d5f in Rf_warning () from /home/liori/sage/sage-4.8/spkg/build/r-2.14.0.p1/src/lib/libR.so
#6 0x00007ffff797bd9c in setup_Rmainloop () from /home/liori/sage/sage-4.8/spkg/build/r-2.14.0.p1/src/lib/libR.so
#7 0x00007ffff797cff6 in Rf_mainloop () from /home/liori/sage/sage-4.8/spkg/build/r-2.14.0.p1/src/lib/libR.so
#8 0x00000000004008b8 in main ()
#9 0x00007ffff7109c8d in __libc_start_main (main=<value optimized out>, argc=<value optimized out>,
ubp_av=<value optimized out>, init=<value optimized out>, fini=<value optimized out>, rtld_fini=<value optimized out>,
stack_end=0x7fffffffe398) at libc-start.c:228
#10 0x00000000004007d9 in _start ()
R works when I use the precompiled binary from sagemath
binary distribution, but I need to recompile it because of R plots.