kou commented on code in PR #14235:
URL: https://github.com/apache/arrow/pull/14235#discussion_r991639375


##########
r/configure:
##########
@@ -149,53 +150,42 @@ else
       if [ "$UNAME" = "Darwin" ] && [ "${OPENSSL_ROOT_DIR}" = "" ]; then
         brew --prefix openssl >/dev/null 2>&1
         if [ $? -eq 0 ]; then
-          OPENSSL_ROOT_DIR="`brew --prefix openssl`"; export OPENSSL_ROOT_DIR
+          export OPENSSL_ROOT_DIR="`brew --prefix openssl`"
+          export PKG_CONFIG_PATH="`brew --prefix 
openssl`/lib/pkgconfig${PKG_CONFIG_PATH:+:${PKG_CONFIG_PATH}}"
         fi
       fi
 
       if [ "${ARROW_DEPENDENCY_SOURCE}" = "" ]; then
-        ARROW_DEPENDENCY_SOURCE=AUTO; export ARROW_DEPENDENCY_SOURCE
+        export ARROW_DEPENDENCY_SOURCE=AUTO
       fi
       if [ "${ARROW_DEPENDENCY_SOURCE}" = "AUTO" ]; then
         pkg-config --version >/dev/null 2>&1
         if [ $? -ne 0 ]; then
-          export ARROW_DEPENDENCY_SOURCE=BUNDLED
-          echo "**** pkg-config not installed, setting 
ARROW_DEPENDENCY_SOURCE=BUNDLED"
+          echo "**** pkg-config is required to use automatically installed 
Apache Arrow C++"

Review Comment:
   Because we always use `pkg-config` to resolve dependencies.
   I thought that we agreed on requiring `pkg-config` for it: 
https://github.com/apache/arrow/pull/14235#discussion_r981644004
   
   If we don't require `pkg-config` for it, we need to maintain `-lssl -lcrypto 
-lcurl -laws-cpp-sdk-identity-management -laws-cpp-sdk-sts ...` and so on.



##########
dev/tasks/r/github.packages.yml:
##########
@@ -309,12 +309,22 @@ jobs:
           curl -s \
             https://raw.githubusercontent.com/{{ arrow.github_repo }}/{{ 
arrow.head }}/ci/scripts/install_sccache.sh | \
             bash -s unknown-linux-musl /usr/local/bin
-      - run: sudo apt update && sudo apt install libcurl4-openssl-dev
-      - name: Prepare PKG_CONFIG_PATH for Homebrew
+      - name: Install curl and its dependencies for static link
         run: |
-          # zstd is installed by Homebrew on GitHub Actions.
-          echo "PKG_CONFIG_PATH=$(brew 
--prefix)/lib/pkgconfig${PKG_CONFIG_PATH:+:${PKG_CONFIG_PATH}}" \
-            >> "$GITHUB_ENV"
+          sudo apt update
+          sudo apt install -y \
+            libbrotli-dev \
+            libcurl4-openssl-dev \
+            libidn2-dev \

Review Comment:
   These extra dependencies are only for static linking. `libcurl4-openssl-dev` 
doesn't depend on them because they are only needed for static linking.
   
   We need to install them explicitly to get build flags for static linking by 
`pkg-config --static --libs libcurl`. Because `libcurl.pc` has the following 
`Libs.private`:
    
    ```text
    Libs.private: -lnghttp2 -lidn2 -lrtmp -lssh2 -lssh2 -lpsl -lnettle -lgnutls 
-L/usr/lib/x86_64-linux-gnu/mit-krb5 -lgssapi_krb5 -llber -lldap -llber -lzstd 
-lbrotlidec -lz -pthread
    ```
    
    If one of these `-lXXX`s are missing in system, build command is failed 
with `no such library: XXX`.
    



##########
ci/scripts/r_docker_configure.sh:
##########
@@ -74,20 +74,105 @@ if [[ -n "$DEVTOOLSET_VERSION" ]]; then
   $PACKAGE_MANAGER install -y "devtoolset-$DEVTOOLSET_VERSION"
 fi
 
+case "$PACKAGE_MANAGER" in

Review Comment:
   It's for GCS testbench for testing GCS that is implemented in Python.
   
   FYI: Python is already installed as an implicit dependency before this 
change.
   
   If you don't like this, we can put this `case` into `if [ "$ARROW_GCS" == 
"ON ]; then ... fi`.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to