diff --git a/.github/workflows/rc.yml b/.github/workflows/rc.yml index 18a721ac02..70e270d888 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 diff --git a/CMakeLists.txt b/CMakeLists.txt index 318bd4d10c..11e6eb7448 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 65ab450666..c560f81632 100755 --- a/ci/scripts/jni_macos_build.sh +++ b/ci/scripts/jni_macos_build.sh @@ -73,12 +73,20 @@ cmake \ -S "${arrow_dir}/cpp" \ -B "${build_dir}/cpp" \ --preset=ninja-release-jni-macos \ + -Dabsl_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/gandiva/CMakeLists.txt b/gandiva/CMakeLists.txt index 369829d7a3..ca041c9fb1 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