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



##########
File path: r/inst/build_arrow_static.sh
##########
@@ -45,6 +45,19 @@ else
   ARROW_DEFAULT_PARAM="OFF"
 fi
 
+if [ "$R_STATIC_DEPENDENCY_SOURCE" = "AUTO" ]; then
+  pkg-config --version >/dev/null 2>&1
+  if [ $? -eq 0 ]; then
+    ARROW_DEPENDENCY_SOURCE="AUTO"
+  else
+    ARROW_DEPENDENCY_SOURCE="BUNDLED"
+    echo "**** Warning: $R_STATIC_DEPENDENCY_SOURCE set to 'AUTO' but 
pkg-config not detected"
+    echo "**** Using bundled dependencies instead"
+  fi

Review comment:
       Just to clarify then, the reason why ARROW_DEPENDENCY_SOURCE needs to be 
passed in via `-e` but `ARROW_R_DEV` doesn't is:
   
   - 'r' (defined in docker-compose.yml) is a service
   - specifying environment variables ahead of calling `docker run` allows you 
to set env vars for running that service
   - with `ARROW_R_DEV`, it doesn't matter whether you specify it via `-e` or 
via prefixing the call to `docker run` as it gets passed through anyway via the 
`environment` field of the `r` service
   - with `ARROW_DEPENDENCY_SOURCE`,  it must be set via `-e` as there's 
nothing defined in the service to explicitly pass it through

##########
File path: r/inst/build_arrow_static.sh
##########
@@ -45,6 +45,19 @@ else
   ARROW_DEFAULT_PARAM="OFF"
 fi
 
+if [ "$R_STATIC_DEPENDENCY_SOURCE" = "AUTO" ]; then
+  pkg-config --version >/dev/null 2>&1
+  if [ $? -eq 0 ]; then
+    ARROW_DEPENDENCY_SOURCE="AUTO"
+  else
+    ARROW_DEPENDENCY_SOURCE="BUNDLED"
+    echo "**** Warning: $R_STATIC_DEPENDENCY_SOURCE set to 'AUTO' but 
pkg-config not detected"
+    echo "**** Using bundled dependencies instead"
+  fi

Review comment:
       Just to clarify then, the reason why `ARROW_DEPENDENCY_SOURCE` needs to 
be passed in via `-e` but `ARROW_R_DEV` doesn't is:
   
   - 'r' (defined in docker-compose.yml) is a service
   - specifying environment variables ahead of calling `docker run` allows you 
to set env vars for running that service
   - with `ARROW_R_DEV`, it doesn't matter whether you specify it via `-e` or 
via prefixing the call to `docker run` as it gets passed through anyway via the 
`environment` field of the `r` service
   - with `ARROW_DEPENDENCY_SOURCE`,  it must be set via `-e` as there's 
nothing defined in the service to explicitly pass it through




-- 
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