4paradigm / 4paradigm/OpenMLDB

higher cmake may failed on find jni in required mode

未关闭
#2,883 3 条评论 0 个 reaction 已指派 1 人 已被 @vagetablechicken 认领 在 GitHub 查看
bug build
主要语言
C++
星标
1.7k
派生
331
平均合并
12 天 12 小时
30 天内合并 PR
1

描述

In higher cmake e.g. 3.24.1 https://github.com/Kitware/CMake/blob/v3.24.1/Modules/FindJNI.cmake
FindJNI will find the components, jvm and jawt, it's set by
https://github.com/Kitware/CMake/blob/8c7ac278cd5af00e0f6ec661635921af40ae3839/Modules/FindJNI.cmake#L119-L120

If we can find the Main JNI target, but can't find jvm and jawt(some weird env), it'll fatal too.
```
Could NOT find JNI (missing: AWT)
```

`set(JNI_FIND_COMPONENTS )` doesn't work.
If find missing components, `JNI_FOUND` will be FALSE.

贡献指南

打开贡献指南

调研方向

Look at the CMake configuration for JNI, likely in CMakeLists.txt or related build scripts. Understand how FindJNI.cmake works in CMake 3.24.1 and later. The issue is that missing components (jvm, jawt) cause JNI_FOUND to be false even if the main JNI target is found. Check the environment and see if setting JNI_FIND_COMPONENTS can be adjusted or if the find_package call needs modification. Test the build with a higher CMake version to reproduce the error.

由索引模型根据 Issue 内容生成。

评估

技术栈
cmake
领域
build-system
Issue 类型
缺陷
难度
3/5
预计耗时
1-2 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
45/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。