margelo / margelo/react-native-fast-tflite
Got some CMake error while compiling the project using react-native-fast-tflite
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 1.2k
- Forks
- 92
- Avg merge
- 13h 9m
- Merged PRs (30d)
- 2
Description
I'm getting the following error while syncing my project. The error is:
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
TFLITE
linked by target "VisionCameraTflite" in directory C:/Data/Projects/react_native/robot-core-adv/node_modules/react-native-fast-tflite/android
TFLITE_GPU
linked by target "VisionCameraTflite" in directory C:/Data/Projects/react_native/robot-core-adv/node_modules/react-native-fast-tflite/android
I'm doing with Expo project, with the packages list below:
"react-native-fast-tflite": "^1.6.1",
"react-native-vision-camera": "^4.6.4",
"react-native-worklets-core": "^1.5.0",
"vision-camera-resize-plugin": "^3.2.0"
I also looked CMakeLists.txt and found related lines:
find_library(
TFLITE
tensorflowlite_jni
PATHS "./src/main/cpp/lib/litert/jni/${ANDROID_ABI}"
NO_DEFAULT_PATH
NO_CMAKE_FIND_ROOT_PATH
)
find_library(
TFLITE_GPU
tensorflowlite_gpu_jni
PATHS "./src/main/cpp/lib/litert/jni/${ANDROID_ABI}"
NO_DEFAULT_PATH
NO_CMAKE_FIND_ROOT_PATH
)
Seems like "lib/litert/jni/${ANDROID_ABI}" doesn't exist inside "./src/main/cpp/"
The source code I create is in https://github.com/tseng91301/robot-core-adv/tree/image-detection-using-3rd-party-package , maybe some modules conflicted? The error risen after installing react-native-worklets-core into the project.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with android/CMakeLists.txt and the find_library definitions for TFLITE and TFLITE_GPU, then inspect whether src/main/cpp/lib/litert/jni/${ANDROID_ABI} exists in react-native-fast-tflite 1.6.1. Reproduce the Expo Android sync with the listed packages; done means both variables resolve and the project builds without the CMake NOTFOUND errors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, cmake, react-native, tensorflow
- Domain
- build-system, machine-learning, mobile
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100