Skip to content

Commit c16f81c

Browse files
authored
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`.
1 parent 53a9ccd commit c16f81c

3 files changed

Lines changed: 10 additions & 1 deletion

File tree

‎.github/workflows/rc.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ jobs:
162162
fail-fast: false
163163
matrix:
164164
platform:
165-
- { runs_on: macos-14, arch: "aarch_64" }
165+
- { runs_on: macos-15, arch: "aarch_64" }
166166
env:
167167
MACOSX_DEPLOYMENT_TARGET: "14.0"
168168
steps:

‎ci/scripts/jni_macos_build.sh‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ cmake \
7575
--preset=ninja-release-jni-macos \
7676
-Dabsl_SOURCE=BUNDLED \
7777
-Dsimdjson_SOURCE=BUNDLED \
78+
-Duriparser_SOURCE=BUNDLED \
7879
-DCMAKE_INSTALL_PREFIX="${install_dir}"
7980
cmake --build "${build_dir}/cpp" --target install
8081
github_actions_group_end

‎dataset/CMakeLists.txt‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,11 @@
1717

1818
find_package(ArrowDataset REQUIRED)
1919
find_package(ArrowSubstrait REQUIRED)
20+
# S3 support lives in its own library since Arrow C++ 26.0.0 (apache/arrow GH-50194).
21+
# Older versions bundle it into libarrow and don't provide the ArrowS3 package.
22+
if(ARROW_VERSION VERSION_GREATER_EQUAL 26.0.0)
23+
find_package(ArrowS3 REQUIRED)
24+
endif()
2025

2126
include_directories(${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}
2227
${JNI_INCLUDE_DIRS} ${JNI_HEADERS_DIR})
@@ -39,6 +44,9 @@ target_link_libraries(arrow_java_jni_dataset
3944
jni
4045
ArrowDataset::arrow_dataset_static
4146
ArrowSubstrait::arrow_substrait_static)
47+
if(ArrowS3_FOUND)
48+
target_link_libraries(arrow_java_jni_dataset ArrowS3::arrow_s3_static)
49+
endif()
4250

4351
if(BUILD_TESTING)
4452
add_executable(arrow-java-jni-dataset-test src/main/cpp/jni_util_test.cc

0 commit comments

Comments
 (0)