nealrichardson commented on a change in pull request #10710:
URL: https://github.com/apache/arrow/pull/10710#discussion_r678380437



##########
File path: r/configure
##########
@@ -268,6 +269,11 @@ else
   PKG_CFLAGS=""
 fi
 
+
+if [ "$ARROW_DEPENDENCY_SOURCE" == "AUTO" ]; then
+  PKG_LIBS = "pkgconfig ${LIB_DIR} $PKG_LIBS"

Review comment:
       I *think* you want something like this, though we may need to adapt 
`PKG_CONFIG_NAME` based on whether dataset and parquet are built (i.e. listed 
in `BUNDLED_LIBS`, defined right above where this goes)
   
   ```suggestion
     PKG_LIBS="$PKG_LIBS `PKG_CONFIG_PATH=${LIB_DIR} pkg-config --libs-only-l 
--libs-only-other --static --silence-errors ${PKG_CONFIG_NAME}`"
   ```

##########
File path: r/configure
##########
@@ -80,7 +80,8 @@ elif [ "$INCLUDE_DIR" ] && [ "$LIB_DIR" ]; then
 else
   # Use pkg-config if available and allowed
   pkg-config --version >/dev/null 2>&1
-  if [ $? -eq 0 ] && [ "$ARROW_USE_PKG_CONFIG" != "false" ]; then
+  if [ $? -eq 0 ] && [ "$ARROW_USE_PKG_CONFIG" != "false" ] && [ 
"$ARROW_DEPENDENCY_SOURCE" == "AUTO" ]; then

Review comment:
       You don't want this change, this is for checking whether libarrow 
already exists on your system. (If you want to make a change here, edit the 
comments to clarify which case this is.)
   
   ```suggestion
     if [ $? -eq 0 ] && [ "$ARROW_USE_PKG_CONFIG" != "false" ]; then
   ```

##########
File path: r/configure
##########
@@ -268,6 +269,11 @@ else
   PKG_CFLAGS=""
 fi
 
+
+if [ "$ARROW_DEPENDENCY_SOURCE" == "AUTO" ]; then

Review comment:
       Also, before L160 (the call to nixlibs.R), add something like:
   
   ```
   if [ "${ARROW_DEPENDENCY_SOURCE}" = "" ]; then
     # TODO: BUNDLED is still default for now, but we plan to change it to AUTO
     ARROW_DEPENDENCY_SOURCE=BUNDLED; export ARROW_DEPENDENCY_SOURCE
   fi
   if [ "${ARROW_DEPENDENCY_SOURCE}" = "AUTO" ]; then
     which pkg-config >/dev/null 2>&1
     if [ $? -eq 0 ]; then
       export ARROW_DEPENDENCY_SOURCE=BUNDLED
       # echo something?
     fi
   fi
   
   Finally, you also need to edit build_arrow_static.sh to take 
ARROW_DEPENDENCY_SOURCE from the environment (default arg there BUNDLED)

##########
File path: r/configure
##########
@@ -268,6 +269,11 @@ else
   PKG_CFLAGS=""
 fi
 
+
+if [ "$ARROW_DEPENDENCY_SOURCE" == "AUTO" ]; then

Review comment:
       You don't want this here. This is only relevant if you've run nixlibs.R 
to build libarrow. Put this somewhere around L176.




-- 
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-unsubscr...@arrow.apache.org

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


Reply via email to