FS#59523 - [gcc] g++ segfaults when compiling in R
Attached to Project:
Arch Linux
Opened by Oleg (wvxvw) - Saturday, 04 August 2018, 08:36 GMT
Last edited by Eli Schwartz (eschwartz) - Thursday, 09 August 2018, 19:10 GMT
Opened by Oleg (wvxvw) - Saturday, 04 August 2018, 08:36 GMT
Last edited by Eli Schwartz (eschwartz) - Thursday, 09 August 2018, 19:10 GMT
|
Details
Description:
I've updated and installed R package using: pacman -Suy r Then, I started the interpreter: R In interpreter, I then executed: install.packages("ggplot2") Answered "yes" to all prompts. Selected a mirror that's close to my location (it reproduces with other mirrors too). This started installation process, during which g++ is required to compile: g++ -I"/usr/include/R/" -DNDEBUG -I../inst/include/ -D_FORTIFY_SOURCE=2 -fpic -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt -c Module.cpp -o Module.o Which comes from Rcpp package. And resulted in this failure: Module.cpp: In function ‘SEXPREC* InternalFunction_invoke(SEXP)’: Module.cpp:117:6: internal compiler error: Segmentation fault SEXP InternalFunction_invoke(SEXP args) { ^~~~~~~~~~~~~~~~~~~~~~~ Please submit a full bug report, with preprocessed source if appropriate. See <https://bugs.archlinux.org/> for instructions. make: *** [/usr/lib64/R/etc/Makeconf:168: Module.o] Error 1 ERROR: compilation failed for package ‘Rcpp’ * removing ‘/home/wvxvw/R/x86_64-pc-linux-gnu-library/3.5/Rcpp’ * installing *source* package ‘RColorBrewer’ ... ** package ‘RColorBrewer’ successfully unpacked and MD5 sums checked ** R ** inst ** byte-compile and prepare package for lazy loading ** help *** installing help indices ** building package indices ** testing if installed package can be loaded * DONE (RColorBrewer) * installing *source* package ‘dichromat’ ... ** package ‘dichromat’ successfully unpacked and MD5 sums checked ** R ** data ** byte-compile and prepare package for lazy loading ** help *** installing help indices ** building package indices ** testing if installed package can be loaded * DONE (dichromat) * installing *source* package ‘labeling’ ... ** package ‘labeling’ successfully unpacked and MD5 sums checked ** R ** byte-compile and prepare package for lazy loading ** help *** installing help indices ** building package indices ** testing if installed package can be loaded * DONE (labeling) * installing *source* package ‘R6’ ... ** package ‘R6’ successfully unpacked and MD5 sums checked ** R ** inst ** byte-compile and prepare package for lazy loading ** help *** installing help indices ** building package indices ** installing vignettes ** testing if installed package can be loaded * DONE (R6) * installing *source* package ‘crayon’ ... ** package ‘crayon’ successfully unpacked and MD5 sums checked ** R ** inst ** byte-compile and prepare package for lazy loading ** help *** installing help indices ** building package indices ** testing if installed package can be loaded * DONE (crayon) * installing *source* package ‘digest’ ... ** package ‘digest’ successfully unpacked and MD5 sums checked ** libs I have g++ version: g++ (GCC) 8.1.1 20180531 R version: R version 3.5.1 (2018-07-02) -- "Feather Spray" |
This task depends upon
Closed by Eli Schwartz (eschwartz)
Thursday, 09 August 2018, 19:10 GMT
Reason for closing: Works for me
Additional comments about closing: no one can reproduce anymore
Thursday, 09 August 2018, 19:10 GMT
Reason for closing: Works for me
Additional comments about closing: no one can reproduce anymore
FS#59581#include <stdio.h>
//#include "tinycthread.h"
#include <threads.h>
int main() {
mtx_t mutex;
if (thrd_success != mtx_init(&mutex, mtx_plain | mtx_recursive)) {
fprintf(stderr, "Failed to create mutex\n");
return 1;
}
return 0;
}
gcc -pthread test.c
a.out works switch the include to "tinycthread.h" and "Failed to create mutex"
EDIT: the issue with "later" is not the same issue. First, that one I can reproduce, second, that one was a runtime error not a compiler error.