You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@arrow.apache.org by "Jonathan Keane (Jira)" <ji...@apache.org> on 2021/11/02 14:47:00 UTC

[jira] [Commented] (ARROW-14555) [R] install.packages("arrow") fails on docker image rocker/r-ver:4.0.2

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

Jonathan Keane commented on ARROW-14555:
----------------------------------------

A few other notes: you could try turning off build parallelism. In the log I see {{#12 58.19 *** Building with MAKEFLAGS= -j2}} which is our default (building with two cores), but if you're running into too little memory, building with one core might keep you under the limit. To do that, you could set {{MAKEFLAGS=-j1}}

Additionally, I see in your setup script that you first do {{install.packages("arrow")}} and then {{arrow::install_arrow()}}. This is not strictly necessary (and will basically install arrow twice over). Our behavior when running {{install.packages("arrow")}} should be all you need now. One thing to note: you should set the environment variable {{NOT_CRAN}} to true, and that will set the build process to 1. grab pre-build binaries from our hosted sources if compatible ones exist (which will get around running out of memory while compiling) and 2. build with a full(er) set of optional dependencies (including support for more compression codecs like snappy).

We used to recommend {{arrow::install_arrow()}}, but the standard install process should work just fine these days. 

> [R] install.packages("arrow") fails on docker image rocker/r-ver:4.0.2
> ----------------------------------------------------------------------
>
>                 Key: ARROW-14555
>                 URL: https://issues.apache.org/jira/browse/ARROW-14555
>             Project: Apache Arrow
>          Issue Type: Bug
>          Components: R
>    Affects Versions: 6.0.0
>            Reporter: Daniel Teske
>            Priority: Major
>         Attachments: complete-arrow_r_dev-output.log, complete-output.log
>
>
> Since last week we cannot build our R environment because the the arrow lib fails on
> {code:java}
> install.packages("arrow"){code}
> We're using rocker/r-vers:4.0.2 as our base image. It seems that it's possible to install arrow on Windows an Mac, but not on Linux.
> The effected part of the Dockerfile is the following:
> {code:java}
> FROM rocker/r-ver:4.0.2 AS builder
> RUN apt-get update && apt-get install -y \
>     git-core \
>     libcurl4-openssl-dev \
>     libgit2-dev \
>     libglpk-dev \
>     libgmp-dev \
>     libicu-dev \
>     libssh2-1-dev \
>     libssl-dev \
>     libxml2-dev \
>     make pandoc pandoc-citeproc zlib1g-dev && rm -rf /var/lib/apt/lists/*
> RUN echo "options(repos = c(CRAN = 'https://cran.rstudio.com/'), download.file.method = 'libcurl')" >> /usr/local/lib/R/etc/Rprofile.site
> RUN R -e 'install.packages("remotes")'
> RUN R -e 'remotes::install_github("r-lib/remotes", ref = "97bbf81")'
> # copy the setup script, run it, then delete it
> COPY dependencies/setup.R /
> RUN Rscript setup.R && rm setup.R
> {code}
> the dependencies/setup.R script contains 
> {code:java}
> install.packages(
>   c(
>     "arrow"
>   ),
>   quiet = FALSE,
>   verbose = TRUE
> )
> arrow::install_arrow()
> {code}
> I attached the complete log output, but the interesting part ist the following:
> {code:java}
> #12 55.88 * installing *source* package ‘arrow’ ...
> #12 55.96 ** package ‘arrow’ successfully unpacked and MD5 sums checked
> #12 55.96 ** using staged installation
> #12 56.46 *** Found local C++ source: 'tools/cpp'
> #12 56.46 *** Building C++ libraries
> #12 56.53 **** cmake
> #12 62.22 **** arrow  
> #12 663.6 **** Error building Arrow C++. Re-run with ARROW_R_DEV=true for debug information. 
> #12 665.3 ------------------------- NOTE ---------------------------
> #12 665.3 There was an issue preparing the Arrow C++ libraries.
> #12 665.3 See https://arrow.apache.org/docs/r/articles/install.html
> #12 665.3 ---------------------------------------------------------
> #12 665.5 ERROR: configuration failed for package ‘arrow’
> #12 665.5 * removing ‘/usr/local/lib/R/site-library/arrow’
> #12 666.0 
> #12 666.0 The downloaded source packages are in
> #12 666.0       ‘/tmp/RtmpDWxSqL/downloaded_packages’
> #12 666.0 Warning message:
> #12 666.0 In install.packages(c("arrow"), quiet = FALSE, verbose = TRUE) :
> #12 666.0   installation of package ‘arrow’ had non-zero exit status
> #12 666.1 Error in loadNamespace(name) : there is no package called ‘arrow’
> #12 666.1 Calls: :: ... loadNamespace -> withRestarts -> withOneRestart -> doWithOneRestart
> #12 666.1 Execution halted
> ------
> executor failed running [/bin/sh -c Rscript setup.R && rm setup.R]: exit code: 1
> {code}
>  



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