FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

GH-951: Fix CI completely, especially JNI on Windows 2022 and MacOS platforms by jbonofre · Pull Request #925 · apache/arrow-java · GitHub

GH-951: Fix CI completely, especially JNI on Windows 2022 and MacOS platforms - #925

Merged
jbonofre merged 7 commits into
apache:mainfrom
jbonofre:ci-test
Jan 8, 2026
Merged

GH-951: Fix CI completely, especially JNI on Windows 2022 and MacOS platforms#925
jbonofre merged 7 commits into
apache:mainfrom
jbonofre:ci-test

Conversation

jbonofre commented Dec 2, 2025
edited
Loading

Copy link
Copy Markdown
Member

This fixes #951

jbonofre changed the title Just an empty commit to trigger the CI MINOR: Test CI Dec 2, 2025

This comment has been minimized.

jbonofre added the bug-fix PRs that fix a big. label Dec 2, 2025
github-actions Bot added this to the 18.4.0 milestone Dec 2, 2025

jbonofre commented Jan 5, 2026

Copy link
Copy Markdown
Member Author

I did a new rebase to trigger a new run.

@lidavidm @kou I would like to have this green before moving forward on a new arrow-java release.

kou commented Jan 5, 2026

Copy link
Copy Markdown
Member

Could you try this for JNI on macOS? We need protoc for Gandiva JNI (not Gandiva itself).

diff --git a/.github/workflows/rc.yml b/.github/workflows/rc.yml
index efa69533..83235d2c 100644
--- a/.github/workflows/rc.yml
+++ b/.github/workflows/rc.yml
@@ -259,11 +259,6 @@ jobs:
           brew uninstall grpc || : # gRPC depends on RE2
           brew uninstall grpc@1.54 || : # gRPC 1.54 may be installed too
           brew uninstall re2
-          # We want to use bundled Protobuf for static linking. If
-          # Homebrew's Protobuf is installed, its library file may be
-          # used on test  We uninstall Homebrew's Protobuf to ensure using
-          # bundled Protobuf.
-          brew uninstall protobuf
 
           brew bundle --file=Brewfile
       - name: Prepare ccache
diff --git a/gandiva/CMakeLists.txt b/gandiva/CMakeLists.txt
index 369829d7..d75cbe28 100644
--- a/gandiva/CMakeLists.txt
+++ b/gandiva/CMakeLists.txt
@@ -57,7 +57,6 @@ set_property(TARGET arrow_java_jni_gandiva PROPERTY OUTPUT_NAME "gandiva_jni")
 target_link_libraries(arrow_java_jni_gandiva
                       arrow_java_jni_gandiva_headers
                       jni
-                      protobuf::libprotobuf
                       Gandiva::gandiva_static)
 
 # Localize thirdparty symbols using a linker version script. This hides them

Or can we remove Protobuf dependency from https://github.com/apache/arrow-java/tree/main/gandiva ...? It will simplify our build system...

kou commented Jan 5, 2026

Copy link
Copy Markdown
Member

Could you try apache/arrow#48726 for JNI on Windows?

diff --git a/.github/workflows/rc.yml b/.github/workflows/rc.yml
index efa69533d..fc8238717 100644
--- a/.github/workflows/rc.yml
+++ b/.github/workflows/rc.yml
@@ -324,7 +324,8 @@ jobs:
         # if: github.event_name == 'schedule'
         uses: actions/checkout@v6
         with:
-          repository: apache/arrow
+          repository: kou/arrow
+          ref: cpp-bundled-protobuf
           path: arrow
       - name: Set up Java
         uses: actions/setup-java@v5

kou commented Jan 6, 2026

Copy link
Copy Markdown
Member

Worked: https://github.com/apache/arrow-java/actions/runs/20740904802/job/59547364091?pr=925

I've merged apache/arrow#48726 .

jbonofre commented Jan 6, 2026

Copy link
Copy Markdown
Member Author

@kou yes, Windows 2022 JNI worked. Thanks ! Should I revert the repository in rc.yml ?

For the MacOS JNI, it's still failing (I removed protobuf). Let me investigate.

kou commented Jan 6, 2026

Copy link
Copy Markdown
Member

Should I revert the repository in rc.yml ?

Yes. We should use apache/arrow not kou/arrow because the change was merged into apache/arrow.

For the MacOS JNI, it's still failing (I removed protobuf). Let me investigate.

Ah, sorry. Bundled Protobuf directory in apache/arrow was changed by apache/arrow#48183 . Could you try this instead?

diff --git a/ci/scripts/jni_macos_build.sh b/ci/scripts/jni_macos_build.sh
index 13c0675d3..6c5cca409 100755
--- a/ci/scripts/jni_macos_build.sh
+++ b/ci/scripts/jni_macos_build.sh
@@ -77,7 +77,7 @@ cmake \
 cmake --build "${build_dir}/cpp" --target install
 github_actions_group_end
 
-export JAVA_JNI_CMAKE_ARGS="-DProtobuf_ROOT=${build_dir}/cpp/protobuf_ep-install"
+export JAVA_JNI_CMAKE_ARGS="-DProtobuf_ROOT=${build_dir}/cpp/_deps/protobuf-build"
 "${source_dir}/ci/scripts/jni_build.sh" \
   "${source_dir}" \
   "${install_dir}" \

jbonofre commented Jan 8, 2026

Copy link
Copy Markdown
Member Author

@kou I updated the JNI CMake in MacOS, it's still failing. Windows 2022 JNI is OK though.
I re-run and I will investigate.

Comment thread .github/workflows/rc.yml
Comment thread gandiva/CMakeLists.txt

kou commented Jan 8, 2026
edited
Loading

Copy link
Copy Markdown
Member

Hmm. We may need to specify not only build directory but also source directory:

diff --git a/ci/scripts/jni_macos_build.sh b/ci/scripts/jni_macos_build.sh
index 13c0675d3..189bbc81e 100755
--- a/ci/scripts/jni_macos_build.sh
+++ b/ci/scripts/jni_macos_build.sh
@@ -77,7 +77,9 @@ cmake \
 cmake --build "${build_dir}/cpp" --target install
 github_actions_group_end
 
-export JAVA_JNI_CMAKE_ARGS="-DProtobuf_ROOT=${build_dir}/cpp/protobuf_ep-install"
+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"
+export JAVA_JNI_CMAKE_ARGS
 "${source_dir}/ci/scripts/jni_build.sh" \
   "${source_dir}" \
   "${install_dir}" \

jbonofre commented Jan 8, 2026

Copy link
Copy Markdown
Member Author

Hmm. We may need to specify not only build directory but also source directory:

diff --git a/ci/scripts/jni_macos_build.sh b/ci/scripts/jni_macos_build.sh
index 13c0675d3..189bbc81e 100755
--- a/ci/scripts/jni_macos_build.sh
+++ b/ci/scripts/jni_macos_build.sh
@@ -77,7 +77,9 @@ cmake \
 cmake --build "${build_dir}/cpp" --target install
 github_actions_group_end
 
-export JAVA_JNI_CMAKE_ARGS="-DProtobuf_ROOT=${build_dir}/cpp/protobuf_ep-install"
+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"
+export JAVA_JNI_CMAKE_ARGS
 "${source_dir}/ci/scripts/jni_build.sh" \
   "${source_dir}" \
   "${install_dir}" \

Let me try.

kou commented Jan 8, 2026

Copy link
Copy Markdown
Member

jbonofre commented Jan 8, 2026

Copy link
Copy Markdown
Member Author

@kou thanks ! Let me create an issue, update this PR with the issue and merge.

jbonofre changed the title MINOR: Test CI GH-951: Fix CI completely, especially JNI on Windows 2022 and MacOS platforms Jan 8, 2026
jbonofre merged commit 94dfea8 into apache:main Jan 8, 2026
37 of 39 checks passed
jbonofre deleted the ci-test branch January 8, 2026 13:11

lidavidm commented Jan 8, 2026

Copy link
Copy Markdown
Member

Thank you @kou and @jbonofre for figuring this out!

ennuite pushed a commit to ennuite/arrow-java that referenced this pull request Jan 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug-fix PRs that fix a big.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[CI] Fix JNI build for Windows 2022 and MacOS

3 participants


Back | FazBrowse Home | New Git URL