4paradigm / 4paradigm/OpenMLDB

higher cmake may failed on find jni in required mode

オープン
#2,883 コメント 3 件 リアクション 0 件 担当者 1 名 @vagetablechicken が担当を希望しています GitHub で見る
bug build
主要言語
C++
スター
1.7k
フォーク
331
平均マージ
12日 12時間
マージ済み PR(30日)
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 を短くまとめたダイジェスト。