This is an automated email from the ASF dual-hosted git repository.
lidavidm 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 f43c4b865 GH-1242: fix macOS and Windows RC CI (#1264)
f43c4b865 is described below
commit f43c4b8652bac15b7356a4d5e733932c00e1cd8e
Author: David Li <[email protected]>
AuthorDate: Tue Aug 25 07:33:24 2026 +0900
GH-1242: fix macOS and Windows RC CI (#1264)
## What's Changed
- We need to use the latest Arrow, as it fixes some of the build config
around bundled dependencies.
- Because we build against the bundled Protobuf, we also need to point
at the bundled Abseil. This is fragile, as we're poking at the build
setup of arrow-cpp.
Closes #1242.
Closes #1243.
Assisted-by: GPT-5.6 Sol <[email protected]>
---
.github/workflows/rc.yml | 13 ++-----------
CMakeLists.txt | 4 ++++
ci/scripts/jni_macos_build.sh | 9 +++++++++
ci/scripts/jni_windows_build.sh | 2 ++
gandiva/CMakeLists.txt | 4 ++++
5 files changed, 21 insertions(+), 11 deletions(-)
diff --git a/.github/workflows/rc.yml b/.github/workflows/rc.yml
index 18a721ac0..c77c8be2a 100644
--- a/.github/workflows/rc.yml
+++ b/.github/workflows/rc.yml
@@ -174,15 +174,11 @@ jobs:
- name: Extract source archive
run: |
tar -xf apache-arrow-java-*.tar.gz --strip-components=1
- - name: Download the latest Apache Arrow C++
- if: github.event_name != 'schedule'
- run: |
- ci/scripts/download_cpp.sh
- name: Checkout Apache Arrow C++
- if: github.event_name == 'schedule'
uses: actions/checkout@v7
with:
repository: apache/arrow
+ ref: main
path: arrow
- name: Checkout apache/arrow-testing
uses: actions/checkout@v7
@@ -303,16 +299,11 @@ jobs:
shell: bash
run: |
tar -xf apache-arrow-java-*.tar.gz --strip-components=1
- - name: Download the latest Apache Arrow C++
- if: github.event_name != 'schedule'
- shell: bash
- run: |
- ci/scripts/download_cpp.sh
- name: Checkout Apache Arrow C++
- if: github.event_name == 'schedule'
uses: actions/checkout@v7
with:
repository: apache/arrow
+ ref: main
path: arrow
- name: Set up Java
uses: actions/setup-java@v5
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 318bd4d10..11e6eb744 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -37,6 +37,10 @@ option(ARROW_JAVA_JNI_ENABLE_C "Enable C data interface"
${ARROW_JAVA_JNI_ENABLE
option(ARROW_JAVA_JNI_ENABLE_DATASET "Enable dataset"
${ARROW_JAVA_JNI_ENABLE_DEFAULT})
option(ARROW_JAVA_JNI_ENABLE_GANDIVA "Enable Gandiva"
${ARROW_JAVA_JNI_ENABLE_DEFAULT})
option(ARROW_JAVA_JNI_ENABLE_ORC "Enable ORC" ${ARROW_JAVA_JNI_ENABLE_DEFAULT})
+set(ARROW_JAVA_JNI_ABSL_INCLUDE_DIR
+ ""
+ CACHE PATH "Path to Abseil source headers for the Gandiva JNI build")
+mark_as_advanced(ARROW_JAVA_JNI_ABSL_INCLUDE_DIR)
include(GNUInstallDirs)
diff --git a/ci/scripts/jni_macos_build.sh b/ci/scripts/jni_macos_build.sh
index 65ab45066..c0040cb03 100755
--- a/ci/scripts/jni_macos_build.sh
+++ b/ci/scripts/jni_macos_build.sh
@@ -73,12 +73,21 @@ cmake \
-S "${arrow_dir}/cpp" \
-B "${build_dir}/cpp" \
--preset=ninja-release-jni-macos \
+ -Dabsl_SOURCE=BUNDLED \
+ -Dsimdjson_SOURCE=BUNDLED \
-DCMAKE_INSTALL_PREFIX="${install_dir}"
cmake --build "${build_dir}/cpp" --target install
github_actions_group_end
+absl_include_dir="${build_dir}/cpp/_deps/absl-src"
+if [ ! -d "${absl_include_dir}/absl" ]; then
+ echo "Bundled Abseil headers were not found in ${absl_include_dir}" >&2
+ exit 1
+fi
+
JAVA_JNI_CMAKE_ARGS="-DProtobuf_ROOT=${build_dir}/cpp/_deps/protobuf-build"
JAVA_JNI_CMAKE_ARGS+="
-DProtobuf_SRC_ROOT_FOLDER=${build_dir}/cpp/_deps/protobuf-src"
+JAVA_JNI_CMAKE_ARGS+=" -DARROW_JAVA_JNI_ABSL_INCLUDE_DIR=${absl_include_dir}"
export JAVA_JNI_CMAKE_ARGS
"${source_dir}/ci/scripts/jni_build.sh" \
"${source_dir}" \
diff --git a/ci/scripts/jni_windows_build.sh b/ci/scripts/jni_windows_build.sh
index 6503ac63e..91a222b26 100755
--- a/ci/scripts/jni_windows_build.sh
+++ b/ci/scripts/jni_windows_build.sh
@@ -71,6 +71,7 @@ cmake \
-DARROW_BUILD_TESTS="${ARROW_BUILD_TESTS}" \
-DARROW_CSV="${ARROW_DATASET}" \
-DARROW_DATASET="${ARROW_DATASET}" \
+ -DARROW_JSON=ON \
-DARROW_SUBSTRAIT="${ARROW_DATASET}" \
-DARROW_DEPENDENCY_USE_SHARED=OFF \
-DARROW_ORC="${ARROW_ORC}" \
@@ -84,6 +85,7 @@ cmake \
-DCMAKE_BUILD_TYPE="${CMAKE_BUILD_TYPE}" \
-DCMAKE_INSTALL_PREFIX="${install_dir}" \
-DCMAKE_UNITY_BUILD="${CMAKE_UNITY_BUILD}" \
+ -Dsimdjson_SOURCE=BUNDLED \
-GNinja
cmake --build "${build_dir}/cpp"
cmake --install "${build_dir}/cpp"
diff --git a/gandiva/CMakeLists.txt b/gandiva/CMakeLists.txt
index 369829d7a..ca041c9fb 100644
--- a/gandiva/CMakeLists.txt
+++ b/gandiva/CMakeLists.txt
@@ -54,6 +54,10 @@ add_library(arrow_java_jni_gandiva SHARED
src/main/cpp/jni_common.cc
${GANDIVA_PROTO_OUTPUT_FILES})
set_property(TARGET arrow_java_jni_gandiva PROPERTY OUTPUT_NAME "gandiva_jni")
+if(ARROW_JAVA_JNI_ABSL_INCLUDE_DIR)
+ target_include_directories(arrow_java_jni_gandiva SYSTEM
+ PRIVATE "${ARROW_JAVA_JNI_ABSL_INCLUDE_DIR}")
+endif()
target_link_libraries(arrow_java_jni_gandiva
arrow_java_jni_gandiva_headers
jni