Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
2.0.0
-
None
-
None
Description
When (for example) using libarrow as installed by a system package manager, pkg-config will find it when installing the R package and will use it. But, it seems that if the install location is on the default search path, pkg-config won't return a -L flag, so the search for the cmake config (https://github.com/apache/arrow/blob/master/r/configure#L178-L179) won't find it, and we'll build without S3.
A workaround is to export ARROW_R_CXXFLAGS=-DARROW_R_WITH_S3 to hard-code the S3 flag.
A proper fix might check for -L in the return of pkg-config (in PKGCONFIG_LIBS), and if not present, walk the search path to determine where arrow (and thus the cmake file) is.
ld --verbose | grep SEARCH_DIR | tr -s ' ;' \\012 | sed -E 's@SEARCH_DIR...(.*)..$@\1@g'
seems to give a list of dirs in the search path, so we could loop over those until the file is found, then use that later.
A different solution would be to compile a test program instead of digging through cmake options.