Neal Richardson created ARROW-10395: ---------------------------------------
Summary: [R] If pkg-config finds arrow on default search path, we don't know if it was built with ARROW_S3 Key: ARROW-10395 URL: https://issues.apache.org/jira/browse/ARROW-10395 Project: Apache Arrow Issue Type: Bug Components: Packaging, R Affects Versions: 2.0.0 Reporter: Neal Richardson Fix For: 3.0.0 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. {code} ld --verbose | grep SEARCH_DIR | tr -s ' ;' \\012 | sed -E 's@SEARCH_DIR...(.*)..$@\1@g' {code} 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. -- This message was sent by Atlassian Jira (v8.3.4#803005)