4paradigm / 4paradigm/OpenMLDB

higher cmake may failed on find jni in required mode

Ouverte
#2,883 3 commentaires 0 réactions 1 personne assignée Réclamée par @vagetablechicken Voir sur GitHub
bug build
Langage dominant
C++
Étoiles
1.7k
Forks
331
Merge moyen
12 j 12 h
PR mergées (30 j)
1

Description

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.

Guide de contribution

Ouvrir le guide de contribution

Piste de recherche

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.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
cmake
Domaine
build-system
Type d'issue
Bug
Difficulté
3/5
Temps estimé
1-2 jours
Activité
À l'abandon
Clarté
Plutôt claire
Accessibilité débutants
45/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.