You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[BUG] Java JNI build fails with CMake 4.0.7 due to Arrow/RapidJSON cmake_minimum_required compatibility #22540
After #22492 moved cuDF to require CMake 4, the cuDF Java JNI native build started failing on release/26.06 and main.
The failure appears to be caused by a third-party CMake compatibility issue in Arrow's RapidJSON dependency when running with CMake 4.0.7. Arrow calls find_package(RapidJSON), which loads RapidJSONConfig.cmake containing an old cmake_minimum_required policy version that CMake 4 no longer accepts.
Steps/Code to reproduce bug
Run the cuDF Java JNI native build on main after #22492 with CMake 4.0.7.
The build reaches Arrow 21.0.0 dependency configuration and fails while resolving RapidJSON:
-- Building using CMake version: 4.0.7
-- Arrow version: 21.0.0 (full: '21.0.0')
-- ARROW_RAPIDJSON_BUILD_VERSION: 232389d4f1012dddec4ef84861face2d2ba85709
...
CMake Error at .../RapidJSONConfig.cmake:3 (cmake_minimum_required):
Compatibility with CMake < 3.5 has been removed from CMake.
Update the VERSION argument <min> value. Or, use the <min>...<max> syntax
to tell CMake that the project requires at least <min> but has been updated
to work with policies introduced by <max> or earlier.
Or, add -DCMAKE_POLICY_VERSION_MINIMUM=3.5 to try configuring anyway.
Call Stack (most recent call first):
.../_deps/arrow-src/cpp/cmake_modules/FindRapidJSONAlt.cmake:29 (find_package)
.../_deps/arrow-src/cpp/cmake_modules/ThirdpartyToolchain.cmake:291 (find_package)
.../_deps/arrow-src/cpp/cmake_modules/ThirdpartyToolchain.cmake:2505 (resolve_dependency)
.../_deps/arrow-src/cpp/CMakeLists.txt:511 (include)
Environment overview
Environment location: Docker / Jenkins CI
Method of cuDF install: from source
If method of install is [Docker], provide docker pull & docker run commands used: TODO
Known build context from the failing log:
cuDF branch: main
CMake: 4.0.7
Arrow: 21.0.0
RapidJSON version from Arrow config: 232389d4f1012dddec4ef84861face2d2ba85709
Build path: cuDF Java JNI native build
Additional context
This started after #22492, which updated cuDF to require CMake 4.
I realize that @KyleFromNVIDIA is working on this. I have not been able to repro this failure locally, with spark-rapids-jni/main and cudf/main. I wonder if @KyleFromNVIDIA has had better luck.
Arrow is using an old pre-release version of RapidJSON that contains a long-since merged PR that they need. However, that pinned version is from a couple years ago. The latest commit includes the PR that they need, along with a fix to their generated CMake config file that would fix this issue.
I would recommend adding a local patch to Arrow that updates RapidJSON to the latest ToT. We should also upstream that change to Arrow.
As a side note, whatever CI process you're doing in Jenkins should probably be a job in cudf CI too, so that we can catch things like this more quickly.
As a side note, whatever CI process you're doing in Jenkins should probably be a job in cudf CI too, so that we can catch things like this more quickly.
I disagree with this. I feel the current process caught it in a timely manner. I don't want to add more jobs to cudf's already fragile CI.
Activity
pxLi commentedon May 18, 2026
cc @mythrocks can you help check this one? thanks
davidwendt commentedon May 18, 2026
cc @KyleFromNVIDIA
KyleFromNVIDIA commentedon May 18, 2026
Where are the failed JNI builds? I don't see them at all in GitHub Actions.
This is very surprising to me. My branch didn't target
release/26.06, onlymain. I don't see how it could be affecting release.pmattione-nvidia commentedon May 18, 2026
Sent a link to a failed build in a private chat
mythrocks commentedon May 18, 2026
I realize that @KyleFromNVIDIA is working on this. I have not been able to repro this failure locally, with spark-rapids-jni/main and cudf/main. I wonder if @KyleFromNVIDIA has had better luck.
KyleFromNVIDIA commentedon May 18, 2026
Can confirm that I have reproduced it locally - the key is to run
java/ci/build-in-docker.shwith atrueargument. Investigating root cause now.KyleFromNVIDIA commentedon May 18, 2026
Arrow is using an old pre-release version of RapidJSON that contains a long-since merged PR that they need. However, that pinned version is from a couple years ago. The latest commit includes the PR that they need, along with a fix to their generated CMake config file that would fix this issue.
I would recommend adding a local patch to Arrow that updates RapidJSON to the latest ToT. We should also upstream that change to Arrow.
KyleFromNVIDIA commentedon May 19, 2026
The
release/26.06failure is happening because Jenkins CI is using the image built frommain, which includes CMake 4.0.7, to buildrelease/26.06.KyleFromNVIDIA commentedon May 19, 2026
I've opened #22582 to fix this.
KyleFromNVIDIA commentedon May 19, 2026
As a side note, whatever CI process you're doing in Jenkins should probably be a job in cudf CI too, so that we can catch things like this more quickly.
davidwendt commentedon May 19, 2026
I disagree with this. I feel the current process caught it in a timely manner. I don't want to add more jobs to cudf's already fragile CI.
Patch Arrow to set CMAKE_POLICY_VERSION_MINIMUM for RapidJSON (#22582)
kou commentedon May 20, 2026
@pxLi Could you share the content of
RapidJSONConfig.cmakeyou used? I'm reviewing the upstream patch: apache/arrow#49993FYI: My
RapidJSONConfig.cmakeinstalled by (rapidjson-dev https://packages.debian.org/sid/rapidjson-dev ) doesn't havecmake_minimum_required():KyleFromNVIDIA commentedon May 20, 2026
Here is the config file generated by the RapidJSON pin that Arrow is using (232389d4f1012dddec4ef84861face2d2ba85709):
Notice the
cmake_minimum_required()on line 3.KyleFromNVIDIA commentedon May 20, 2026
See my explanation of the bug at apache/arrow#48801 (comment).
kou commentedon May 21, 2026
Thanks.