AlmaLinux 9.4编译R 4.4.1时出现段错误问题求助
在AlmaLinux 9.4 Docker容器编译R 4.4.1时遇到段错误问题
编译配置
在AlmaLinux 9.4的Docker容器中从源码编译R 4.4.1,使用的configure命令如下:
./configure --prefix ${installdir} \ --enable-year2038 --with-cairo --with-x --with-libpng --with-jpeglib --with-libtiff \ --enable-R-shlib --enable-BLAS-shlib --enable-memory-profiling --with-readline \ --with-blas
编译时的错误
执行make命令时出现以下段错误:
make[4]: Entering directory '/usr/R-4.4.1/src/library/grDevices' byte-compiling package 'grDevices' *** caught segfault *** address 0x1802bf1860, cause 'memory not mapped' Traceback: 1: solve.default(rgb) 2: solve(rgb) 3: drop(whitexyz %*% solve(rgb)) 4: make.rgb(red = c(0.625, 0.34), green = c(0.28, 0.595), blue = c(0.155, 0.07), gamma = 1.8, white = "D65", name = "Apple RGB") 5: eval(exprs[i], envir) 6: eval(exprs[i], envir) 7: sys.source(codeFile, env, keep.source = keep.source, keep.parse.data = keep.parse.data) 8: doTryCatch(return(expr), name, parentenv, handler) 9: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 10: tryCatchList(expr, classes, parentenv, handlers) 11: tryCatch(expr, error = function(e) { call <- conditionCall(e) if (!is.null(call)) { if (identical(call[[1L]], quote(doTryCatch))) call <- sys.call(-4L) dcall <- deparse(call, nlines = 1L) prefix <- paste("Error in", dcall, ": ") LONG <- 75L sm <- strsplit(conditionMessage(e), "\n")[[1L]] w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") if (is.na(w)) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], type = "b") if (w > LONG) prefix <- paste0(prefix, "\n ") } else prefix <- "Error : " msg <- paste0(prefix, conditionMessage(e), "\n") .Internal(seterrmessage(msg[1L])) if (!silent && isTRUE(getOption("show.error.messages"))) { cat(msg, file = outFile) .Internal(printDeferredWarnings()) } invisible(structure(msg, class = "try-error", condition = e))}) 12: try(sys.source(codeFile, env, keep.source = keep.source, keep.parse.data = keep.parse.data)) 13: loadNamespace(package = package, lib.loc = lib.loc, keep.source = keep.source, keep.parse.data = keep.parse.data, partial = TRUE) 14: withCallingHandlers(expr, packageStartupMessage = function(c) tryInvokeRestart("muffleMessage")) 15: suppressPackageStartupMessages(loadNamespace(package = package, lib.loc = lib.loc, keep.source = keep.source, keep.parse.data = keep.parse.data, partial = TRUE)) 16: code2LazyLoadDB(package, lib.loc = lib.loc, keep.source = keep.source, keep.parse.data = keep.parse.data, compress = compress, set.install.dir = set.install.dir) 17: tools:::makeLazyLoading("grDevices") An irrecoverable exception occurred. R is aborting now ... make[4]: *** [../../../share/make/lazycomp.mk:9: ../../../library/grDevices/R/grDevices.rdb] Error 139 make[4]: Leaving directory '/usr/R-4.4.1/src/library/grDevices' make[3]: *** [Makefile:28: all] Error 2 make[3]: Leaving directory '/usr/R-4.4.1/src/library/grDevices' make[2]: *** [Makefile:39: R] Error 1 make[2]: Leaving directory '/usr/R-4.4.1/src/library' make[1]: *** [Makefile:28: R] Error 1 make[1]: Leaving directory '/usr/R-4.4.1/src' make: *** [Makefile:62: R] Error 1
已确认的信息
曾怀疑问题与gcc-c++版本(11.4.1)有关,但configure执行完成后的输出显示编译器版本符合R官方要求:
Default C++ compiler: /usr/bin/g++ -std=gnu++17 -g -O2 C++11 compiler: /usr/bin/g++ -std=gnu++11 -g -O2 C++14 compiler: /usr/bin/g++ -std=gnu++14 -g -O2 C++17 compiler: /usr/bin/g++ -std=gnu++17 -g -O2 C++20 compiler: /usr/bin/g++ -std=gnu++20 -g -O2 C++23 compiler: /usr/bin/g++ -std=gnu++23 -g -O2
目前未找到该错误的相关解决细节,寻求帮助。
内容的提问来源于stack exchange,提问作者laura_poggio
相关产品推荐
相关产品推荐

