Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CMake Error: The following variables are used in this project, but they are set to NOTFOUND. JSI_LIB, REACT_NATIVE_JNI_LIB #582

Open
pankajver610 opened this issue Sep 15, 2023 · 3 comments

Comments

@pankajver610
Copy link

Hi,
I am getting this issue while syncing gradle and couldn't fix the issue by following this #145 (comment)

"react-native": "0.70.13"
"react-native-mmkv": "2.5.1"

[CXX1405] error when building with cmake using /node_modules/react-native-mmkv/android/CMakeLists.txt: -- The C compiler identification is Clang 11.0.5
-- The CXX compiler identification is Clang 11.0.5
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /Users/{username}/Library/Android/sdk/ndk/22.0.7026061/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /Users/{username}/Library/Android/sdk/ndk/22.0.7026061/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- The ASM compiler identification is Clang
-- Found assembler: /Users/{username}/Library/Android/sdk/ndk/22.0.7026061/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang
-- Configuring done
-- Generating done

C++ build system [configure] failed while executing:
/Users/{username}/Library/Android/sdk/cmake/3.18.1/bin/cmake
-H/node_modules/react-native-mmkv/android
-DCMAKE_SYSTEM_NAME=Android
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON
-DCMAKE_SYSTEM_VERSION=21
-DANDROID_PLATFORM=android-21
-DANDROID_ABI=arm64-v8a
-DCMAKE_ANDROID_ARCH_ABI=arm64-v8a
-DANDROID_NDK=/Users/{username}/Library/Android/sdk/ndk/22.0.7026061
-DCMAKE_ANDROID_NDK=/Users/{username}/Library/Android/sdk/ndk/22.0.7026061
-DCMAKE_TOOLCHAIN_FILE=/Users/{username}/Library/Android/sdk/ndk/22.0.7026061/build/cmake/android.toolchain.cmake
-DCMAKE_MAKE_PROGRAM=/Users/{username}/Library/Android/sdk/cmake/3.18.1/bin/ninja
"-DCMAKE_CXX_FLAGS=-fexceptions -frtti -std=c++1y -DONANDROID"
-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/node_modules/react-native-mmkv/android/build/intermediates/cxx/Debug/5l6d4l5b/obj/arm64-v8a
-DCMAKE_RUNTIME_OUTPUT_DIRECTORY=/node_modules/react-native-mmkv/android/build/intermediates/cxx/Debug/5l6d4l5b/obj/arm64-v8a
-DCMAKE_BUILD_TYPE=Debug
-B/node_modules/react-native-mmkv/android/.cxx/Debug/5l6d4l5b/arm64-v8a
-GNinja
-DANDROID_STL=c++_shared
-DREACT_NATIVE_VERSION=70
-DNODE_MODULES_DIR=/node_modules
"-DPREBUILT_DIR=/node_modules/react-native-mmkv/android/build/react-native-0*/jni"
from /node_modules/react-native-mmkv/android
CMake Warning (dev) in CMakeLists.txt:
No project() command is present. The top-level CMakeLists.txt file must
contain a literal, direct call to the project() command. Add a line of
code such as

project(ProjectName)

near the top of the file, but after cmake_minimum_required().

CMake is pretending there is a "project(Project)" command on the first
line.
This warning is for project developers. Use -Wno-dev to suppress it.

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:
JSI_LIB
linked by target "reactnativemmkv" in directory /node_modules/react-native-mmkv/android
REACT_NATIVE_JNI_LIB
linked by target "reactnativemmkv" in directory /node_modules/react-native-mmkv/android

CMake Generate step failed. Build files cannot be regenerated correctly.
CMake Warning (dev) in CMakeLists.txt:
No project() command is present. The top-level CMakeLists.txt file must
contain a literal, direct call to the project() command. Add a line of
code such as

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:
JSI_LIB
linked by target "reactnativemmkv" in directory /node_modules/react-native-mmkv/android
REACT_NATIVE_JNI_LIB
linked by target "reactnativemmkv" in directory /node_modules/react-native-mmkv/android

@nethergrim
Copy link

John Travolta looking around

@sudhakarmako
Copy link

Same here. It happened only recently.

@KartikLakhani009
Copy link

Same here. It happened with me also

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants