[
https://issues.apache.org/jira/browse/ARROW-7908?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17068657#comment-17068657
]
Taeke commented on ARROW-7908:
------------------------------
Hi,
Sorry for the long silence. With ARROW_R_DEV=TRUE I get:
{code:sh}
trying URL 'https://cloud.r-project.org/src/contrib/arrow_0.16.0.2.tar.gz'
Content type 'application/x-gzip' length 216119 bytes (211 KB)
==================================================
downloaded 211 KB
* installing *source* package ‘arrow’ ...
** package ‘arrow’ successfully unpacked and MD5 sums checked
** using staged installation
*** Generating code with data-raw/codegen.R
Fatal error: cannot open file 'data-raw/codegen.R': No such file or directory
PKG_CFLAGS=-I/tmp/Rtmp7CrqGP/R.INSTALL1bebe61d5312e/arrow/libarrow/arrow-0.16.0.2/include
-DARROW_R_WITH_ARROW
PKG_LIBS=-L/tmp/Rtmp7CrqGP/R.INSTALL1bebe61d5312e/arrow/libarrow/arrow-0.16.0.2/lib
-larrow_dataset -lparquet -larrow -lthrift -lsnappy -lz -lzstd -llz4
-lbrotlidec-static -lbrotlienc-static -lbrotlicommon-static -lboost_filesystem
-lboost_regex -lboost_system -ljemalloc_pic
** libs
g++ -m64 -std=gnu++11 -I"/usr/include/R" -DNDEBUG
-I/tmp/Rtmp7CrqGP/R.INSTALL1bebe61d5312e/arrow/libarrow/arrow-0.16.0.2/include
-DARROW_R_WITH_ARROW -I"/usr/lib64/R/library/Rcpp/include" -I/usr/local/include
-fpic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions
-fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64
-mtune=generic -c array.cpp -o array.o
In file included from array.cpp:18:0:
./arrow_types.h:201:31: fatal error: arrow/dataset/api.h: No such file or
directory
#include <arrow/dataset/api.h>
^
compilation terminated.
make: *** [array.o] Error 1
ERROR: compilation failed for package ‘arrow’
{code}
data-raw/codegen.R misses because it is specified in .Rbuildignore.
Removing that line from .Rbuildignore makes the installation run somewhat
further, but data-raw/codegen.R than fails:
{code:java}
*** Generating code with data-raw/codegen.R
Error in library(decor) : there is no package called ‘decor’
Calls: suppressPackageStartupMessages -> withCallingHandlers -> library
Execution halted
{code}
That I could fix (manually, at least) by installing decor:
{code:java}
remotes::install_github("romainfrancois/decor")
{code}
That line is, understandably, commented out in data-raw/codegen.R
Finally configure tries to run tools/linuxlibs.R, which tries to
download_source(), but that fails due to an invalid version:
{code:java}
trying URL
'https://dl.bintray.com/ursalabs/arrow-r/libarrow/src/arrow-0.16.0.9000.zip'
Error in download.file(source_url, tf1, quiet = quietly) :
(converted from warning) cannot open URL
'https://dl.bintray.com/ursalabs/arrow-r/libarrow/src/arrow-0.16.0.9000.zip':
HTTP status was '404 Not Found'
{code}
This I could fix by changing the version in the DESCRIPTION to 0.16.0.2
After that the installation concludes as expected.
In summary, for this to work:
* data_raw/codegen.R needs not be included in .Rbuildignore
* decor needs to become a dependency (?)
* version number needs to be updated in DESCRIPTION to correspond with an
available download
> [R] Can't install package without setting LIBARROW_DOWNLOAD=true
> ----------------------------------------------------------------
>
> Key: ARROW-7908
> URL: https://issues.apache.org/jira/browse/ARROW-7908
> Project: Apache Arrow
> Issue Type: Bug
> Components: R
> Affects Versions: 0.16.0
> Environment: Operating System: Red Hat Enterprise Linux Server 7.6
> (Maipo)
> CPE OS Name: cpe:/o:redhat:enterprise_linux:7.6:GA:server
> Kernel: Linux 3.10.0-957.35.2.el7.x86_64
> Architecture: x86-64
> Reporter: Taeke
> Priority: Major
>
> Hi,
> Installing arrow in R does not work intuitively on our server.
> {code:r}
> install.packages("arrow")`
> {code}
> results in an error:
> {code:sh}
> Installing package into '/home/<user>/R/x86_64-redhat-linux-gnu-library/3.6'
> (as 'lib' is unspecified)
> trying URL 'https://cloud.r-project.org/src/contrib/arrow_0.16.0.2.tar.gz'
> Content type 'application/x-gzip' length 216119 bytes (211 KB)
> ==================================================
> downloaded 211 KB
> * installing *source* package 'arrow' ...
> ** package 'arrow' successfully unpacked and MD5 sums checked
> ** using staged installation
> PKG_CFLAGS=-I/tmp/Rtmp3v1BDf/R.INSTALL4a5d5d9f8bc8/arrow/libarrow/arrow-0.16.0.2/include
> -DARROW_R_WITH_ARROW
> PKG_LIBS=-L/tmp/Rtmp3v1BDf/R.INSTALL4a5d5d9f8bc8/arrow/libarrow/arrow-0.16.0.2/lib
> -larrow_dataset -lparquet -larrow -lthrift -lsnappy -lz -lzstd -llz4
> -lbrotlidec-static -lbrotlienc-static -lbrotlicommon-static
> -lboost_filesystem -lboost_regex -lboost_system -ljemalloc_pic
> ** libs
> g++ -m64 -std=gnu++11 -I"/usr/include/R" -DNDEBUG
> -I/tmp/Rtmp3v1BDf/R.INSTALL4a5d5d9f8bc8/arrow/libarrow/arrow-0.16.0.2/include
> -DARROW_R_WITH_ARROW -I"/usr/lib64/R/library/Rcpp/include"
> -I/usr/local/include -fpic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2
> -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4
> -grecord-gcc-switches -m64 -mtune=generic -c array.cpp -o array.o
> In file included from array.cpp:18:0:
> ./arrow_types.h:201:31: fatal error: arrow/dataset/api.h: No such file or
> directory
> {code}
> It appears that the C++ code is not built. With arrow 0.16.0.1 things do work
> out, because it tries to build the C++ code from source. With arrow 0.16.0.2
> such is no longer the case. I could finish the installation by setting the
> environment variable LIBARROW_DOWNLOAD to 'true':
> {code:java}
> export LIBARROW_DOWNLOAD=true
> {code}
> That, apparently, triggers the build from source. I would have expected that
> I would not need to set this variable explicitly.
> I found that [between
> versions|https://github.com/apache/arrow/commit/660d0e7cbaa1cfb51498299d445636fdd6a58420],
> the default value of LIBARROW_DOWNLOAD has changed:
> {code:sh}
> - download_ok <- locally_installing && !env_is("LIBARROW_DOWNLOAD", "false")
> + download_ok <- env_is("LIBARROW_DOWNLOAD", "true")
> {code}
> In our environment, that variable was _not_ set, resulting (accidentally?) in
> download_ok being false and therefore the libraries not being installed and
> finally the resulting error above.
>
> I can't quite figure out the logic behind all this, but it would be nice if
> we'd be able to install the package without first having to set
> LIBARROW_DOWNLOAD.
>
> Thank you for looking into this!
--
This message was sent by Atlassian Jira
(v8.3.4#803005)