This is an automated email from the ASF dual-hosted git repository.

jbonofre pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow-java.git


The following commit(s) were added to refs/heads/main by this push:
     new c16f81ce1 MINOR: [CI] Fix RC JNI builds on Windows (ArrowS3 link) and 
macOS (runner) (#1315)
c16f81ce1 is described below

commit c16f81ce136915ca270614ffdda9b700066aea0f
Author: JB Onofré <[email protected]>
AuthorDate: Thu Oct 1 18:28:11 2026 +0200

    MINOR: [CI] Fix RC JNI builds on Windows (ArrowS3 link) and macOS (runner) 
(#1315)
    
    ## What's Changed
    
    Fix the `RC` workflow JNI builds, which have been failing on `main`
    since the Arrow C++ `main` checkout changed.
    
    - **JNI Windows (`dataset/CMakeLists.txt`)**: Arrow C++ moved S3 into
    its own library (apache/arrow GH-50194). `arrow_dataset_jni` still calls
    `arrow::fs::EnsureS3Finalized()` but no longer linked the library
    defining it, which failed with `LNK2019: unresolved external symbol`.
    Link `ArrowS3::arrow_s3_static` when the `ArrowS3` package is found, so
    builds against older Arrow C++ are unaffected.
    - **JNI macOS (`.github/workflows/rc.yml`)**: switch the runner from
    `macos-14` to `macos-15`. The Arrow C++ Brewfile installs `llvm`, which
    has no Homebrew bottle for macOS 14, so `brew bundle` compiled LLVM from
    source until the job hit the 1h timeout. `MACOSX_DEPLOYMENT_TARGET`
    stays at `14.0`.
---
 .github/workflows/rc.yml      | 2 +-
 ci/scripts/jni_macos_build.sh | 1 +
 dataset/CMakeLists.txt        | 8 ++++++++
 3 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/.github/workflows/rc.yml b/.github/workflows/rc.yml
index 15d417725..b3b1a39a3 100644
--- a/.github/workflows/rc.yml
+++ b/.github/workflows/rc.yml
@@ -162,7 +162,7 @@ jobs:
       fail-fast: false
       matrix:
         platform:
-          - { runs_on: macos-14, arch: "aarch_64" }
+          - { runs_on: macos-15, arch: "aarch_64" }
     env:
       MACOSX_DEPLOYMENT_TARGET: "14.0"
     steps:
diff --git a/ci/scripts/jni_macos_build.sh b/ci/scripts/jni_macos_build.sh
index c0040cb03..efc244675 100755
--- a/ci/scripts/jni_macos_build.sh
+++ b/ci/scripts/jni_macos_build.sh
@@ -75,6 +75,7 @@ cmake \
   --preset=ninja-release-jni-macos \
   -Dabsl_SOURCE=BUNDLED \
   -Dsimdjson_SOURCE=BUNDLED \
+  -Duriparser_SOURCE=BUNDLED \
   -DCMAKE_INSTALL_PREFIX="${install_dir}"
 cmake --build "${build_dir}/cpp" --target install
 github_actions_group_end
diff --git a/dataset/CMakeLists.txt b/dataset/CMakeLists.txt
index 348850c3b..c8beb370a 100644
--- a/dataset/CMakeLists.txt
+++ b/dataset/CMakeLists.txt
@@ -17,6 +17,11 @@
 
 find_package(ArrowDataset REQUIRED)
 find_package(ArrowSubstrait REQUIRED)
+# S3 support lives in its own library since Arrow C++ 26.0.0 (apache/arrow 
GH-50194).
+# Older versions bundle it into libarrow and don't provide the ArrowS3 package.
+if(ARROW_VERSION VERSION_GREATER_EQUAL 26.0.0)
+  find_package(ArrowS3 REQUIRED)
+endif()
 
 include_directories(${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}
                     ${JNI_INCLUDE_DIRS} ${JNI_HEADERS_DIR})
@@ -39,6 +44,9 @@ target_link_libraries(arrow_java_jni_dataset
                       jni
                       ArrowDataset::arrow_dataset_static
                       ArrowSubstrait::arrow_substrait_static)
+if(ArrowS3_FOUND)
+  target_link_libraries(arrow_java_jni_dataset ArrowS3::arrow_s3_static)
+endif()
 
 if(BUILD_TESTING)
   add_executable(arrow-java-jni-dataset-test src/main/cpp/jni_util_test.cc

Reply via email to