[ 
https://issues.apache.org/jira/browse/ARROW-11963?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17303632#comment-17303632
 ] 

Ahmed Riza commented on ARROW-11963:
------------------------------------

Followed (2), i.e. set {{ARROW_R_DEV=true}}, and tried installing "arrow" from 
R.  Can see the problem now, but no idea why this is happening or what the 
solution might be.  Please see 
{color:#000000}R_install_with_debug.log.gz{color}. 

It appears that `je_malloc` configure fails and as a result, the R "arrow" 
installer just carries on without actually building the C++ libraries and 
reports success at the end.  Hence (unless we build with {{ARROW_R_DEV=true}}), 
we don't know that the C++ library build actually failed (the clue may be that 
it built rather too quickly, since the arrow C++ libraries should take a while 
to build).

I've captured the output from the `je_malloc` config step in 
{color:#000000}jemalloc_ep_config.log{color}.  We can see the error here:
{code:java}
configure:3209: checking whether we are cross compiling
configure:3217: /usr/bin/gcc -o conftest   -Wl,-z,relro -Wl,--as-needed 
-Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld conftest.c  >&5
/usr/bin/ld: /tmp/ccSIfPEI.o: relocation R_X86_64_32 against `.rodata' can not 
be used when making a PIE object; recompile with -fPIE
collect2: error: ld returned 1 exit status
{code}
This is rather odd, as I can compile an empty C program with the same exact 
compiler flags without a problem from an interactive shell.  i.e. the following 
works fine for me from a shell. I did not need to specify the `-fPIE` flag.
{code:java}
$ echo "int main() { return 0; }" > t.c
$ /usr/bin/gcc -o t -Wl,-z,relro -Wl,--as-needed -Wl,-z,now 
-specs=/usr/lib/rpm/redhat/redhat-hardened-ld t.c
$ ldd t
        linux-vdso.so.1 (0x00007ffe8096c000)
        libc.so.6 => /lib64/libc.so.6 (0x00007f1213c5d000)
        /lib64/ld-linux-x86-64.so.2 (0x00007f1213e5d000)

$ file t

t: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically linked, 
interpreter /lib64/ld-linux-x86-64.so.2, 
BuildID[sha1]=60128f23b0248b3b868d2f08f7108501db4c131c, for GNU/Linux 3.2.0, 
not stripped

{code}
So, not sure why it is failing during configure when triggered from the R 
"arrow" package install.  A bit of a mystery to me at this stage.

 

> Arrow installation issue with R 4.0.4 on Fedora 33
> --------------------------------------------------
>
>                 Key: ARROW-11963
>                 URL: https://issues.apache.org/jira/browse/ARROW-11963
>             Project: Apache Arrow
>          Issue Type: Bug
>          Components: R
>    Affects Versions: 3.0.0
>         Environment: Linux, Fedora 33
>            Reporter: Ahmed Riza
>            Priority: Major
>         Attachments: R_arrow_install.log.gz, R_arrow_install_clean.log.gz, 
> cmake.log, jemalloc_ep_config.log, make.log.gz
>
>
> I have been trying to install "arrow" package, using R 4.0.4 on Linux (Fedora 
> 33).  I have built and installed the C++ arrow libraries (using release 
> version 3.0.0) following the instructions at 
> [https://arrow.apache.org/docs/r/.|https://arrow.apache.org/docs/r/]
> Then, from R, I tried to install "arrow":
> {code:java}
>  install.packages("arrow"){code}
> This fails during the verification stage:
> {code:java}
> ** testing if installed package can be loaded from temporary location 
>  sh: line 1:  8386 Segmentation fault      (core dumped) R_TESTS= 
> '/usr/lib64/R/bin/R' --no-save --no-restore --no-echo 2>&1 < 
> '/tmp/RtmpWtq6vV/file1f4b570a7335'
> caught segfault ***
>  address (nil), cause 'memory not mapped'
> Traceback:
>  1: dyn.load(file, DLLpath = DLLpath, ...)
>  2: library.dynam(lib, package, package.lib)
>  3: loadNamespace(package, lib.loc)
>  4: doTryCatch(return(expr), name, parentenv, handler)
>  5: tryCatchOne(expr, names, parentenv, handlers[[1L]])
>  6: tryCatchList(expr, classes, parentenv, handlers)
>  7: tryCatch({    attr(package, "LibPath") <- which.lib.loc    ns <- 
> loadNamespace(package, lib.loc)    env <- attachNamespace(ns, pos = pos, 
> deps, exclude, include.only)}, error = function(e) {    P <- if (!is.null(cc 
> <- conditionCall(
> e)))         paste(" in", deparse(cc)[1L])    else ""    msg <- 
> gettextf("package or namespace load failed for %s%s:\n %s",         
> sQuote(package), P, conditionMessage(e))    if (logical.return)         
> message(paste("Error:", msg), do
> main = NA)    else stop(msg, call. = FALSE, domain = NA)})
>  8: library(pkg_name, lib.loc = lib, character.only = TRUE, logical.return = 
> TRUE)
>  9: withCallingHandlers(expr, packageStartupMessage = function(c) 
> tryInvokeRestart("muffleMessage"))
> 10: suppressPackageStartupMessages(library(pkg_name, lib.loc = lib,     
> character.only = TRUE, logical.return = TRUE))
> 11: doTryCatch(return(expr), name, parentenv, handler)
> 12: tryCatchOne(expr, names, parentenv, handlers[[1L]])
> 13: tryCatchList(expr, classes, parentenv, handlers)
> 14: 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)[1L]        prefix 
> <- past
> e("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))})
> 15: try(suppressPackageStartupMessages(library(pkg_name, lib.loc = lib,     
> character.only = TRUE, logical.return = TRUE)))
> 16: tools:::.test_load_package("arrow", 
> "/work/R/x86_64-redhat-linux-gnu-library/4.0/00LOCK-arrow/00new")
> An irrecoverable exception occurred. R is aborting now ...
> ERROR: loading failed
> {code}
> R version info:
> {code:java}
> R version 4.0.4 (2021-02-15) -- "Lost Library Book"
> Copyright (C) 2021 The R Foundation for Statistical Computing
> Platform: x86_64-redhat-linux-gnu (64-bit)
> {code}
> Any thoughts on where to look? (I can only get arrow to work with the latest 
> development version of R and not the release version of 4.0.4).  Thanks.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to