You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "nealrichardson (via GitHub)" <gi...@apache.org> on 2023/04/24 13:05:35 UTC

[GitHub] [arrow] nealrichardson commented on a diff in pull request #35147: GH-35140: [R] configure script needs LIB_DIR to find ArrowOptions.cmake

nealrichardson commented on code in PR #35147:
URL: https://github.com/apache/arrow/pull/35147#discussion_r1175256010


##########
r/configure:
##########
@@ -252,6 +252,10 @@ echo "#include $PKG_TEST_HEADER" | ${TEST_CMD} >/dev/null 2>&1
 
 if [ $? -eq 0 ]; then
   # Check for features
+  if [ "$LIB_DIR" = "" ]; then
+    # In case LIB_DIR wasn't previously set, infer from PKG_DIRS
+    LIB_DIR=`echo $PKG_DIRS | sed -e 's/^-L//'`
+  fi

Review Comment:
   The main reason I didn't take this approach is that `r/configure` has gotten so complex that I didn't think I could reason about all of the different branches of the code to know that I had found them all (see also https://github.com/apache/arrow/issues/35049). Other, more concrete issues:
   
   * I did [confirm](https://github.com/apache/arrow/issues/35140#issuecomment-1509271404) what @paleolimbot suggested, which is that if you have `pkg-config` available and have installed `apache-arrow` via `brew`, you won't get to this `*** Using Homebrew` block, you'll see that you're using arrow found by pkg-config. So at a minimum, we (also) need `LIB_DIR` set in the pkg-config section above this.
   * Likewise, there have been similar reports, like the conda-forge one and https://github.com/apache/arrow/issues/31989, not on macOS/brew, so a brew-only fix wouldn't be sufficient.
   * We actually *don't* need the autobrew one because (for "historical reasons", I assume) we explicitly set all of the feature flags in the autobrew script https://github.com/apache/arrow/blob/apache-arrow-11.0.0/r/tools/autobrew#L77



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org