Closed terfender closed 2 years ago
hi there! i'm sorry that the minimum support of react-native-v8@v1 is react-native 0.66. please consider to upgrade your react-native if possible. thanks!
Thanks for the quick response @Kudo . I am using RN 0.69.5, the latest stable version so far.
Please check my package.json and let me know if I am missing something.
Thanks again.
oh sorry i misread the description. let me reopen this and i'll check it.
Hi, I also have a problem with building reanimated 2.10.0 with react-native-v8@1.4.7 and react-native-tvos@0.68.2-6. Logs from android studio:
> Configure project :react-native-reanimated
Native libs debug enabled: false
Android gradle plugin: 7.2.2
Gradle: 7.3.3
building Reanimated2
> Task :prepareKotlinBuildScriptModel UP-TO-DATE
C/C++: debug|x86 :CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
C/C++: debug|x86 :Please set them or make sure they are set and tested correctly in the CMake files:
C/C++: debug|x86 :V8EXECUTOR_LIB
C/C++: debug|x86 : linked by target "reanimated" in directory /Users/lukasz.kinasiewicz/dev/nitrox5/node_modules/react-native-reanimated/android
C/C++: debug|x86 :CMake Generate step failed. Build files cannot be regenerated correctly.
[CXX1405] error when building with cmake using /Users/lukasz.kinasiewicz/dev/nitrox5/node_modules/react-native-reanimated/android/CMakeLists.txt: Build command failed.
Error while executing process /Users/lukasz.kinasiewicz/Library/Android/sdk/cmake/3.18.1/bin/cmake with arguments {-H/Users/lukasz.kinasiewicz/dev/nitrox5/node_modules/react-native-reanimated/android -DCMAKE_SYSTEM_NAME=Android -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_SYSTEM_VERSION=22 -DANDROID_PLATFORM=android-22 -DANDROID_ABI=x86 -DCMAKE_ANDROID_ARCH_ABI=x86 -DANDROID_NDK=/Users/lukasz.kinasiewicz/Library/Android/sdk/ndk/21.4.7075529 -DCMAKE_ANDROID_NDK=/Users/lukasz.kinasiewicz/Library/Android/sdk/ndk/21.4.7075529 -DCMAKE_TOOLCHAIN_FILE=/Users/lukasz.kinasiewicz/Library/Android/sdk/ndk/21.4.7075529/build/cmake/android.toolchain.cmake -DCMAKE_MAKE_PROGRAM=/Users/lukasz.kinasiewicz/Library/Android/sdk/cmake/3.18.1/bin/ninja -DCMAKE_CXX_FLAGS=-fstack-protector-all -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/Users/lukasz.kinasiewicz/dev/nitrox5/node_modules/react-native-reanimated/android/build/intermediates/cxx/Debug/5716g4op/obj/x86 -DCMAKE_RUNTIME_OUTPUT_DIRECTORY=/Users/lukasz.kinasiewicz/dev/nitrox5/node_modules/react-native-reanimated/android/build/intermediates/cxx/Debug/5716g4op/obj/x86 -DCMAKE_BUILD_TYPE=Debug -B/Users/lukasz.kinasiewicz/dev/nitrox5/node_modules/react-native-reanimated/android/.cxx/Debug/5716g4op/x86 -GNinja -DANDROID_STL=c++_shared -DNATIVE_DEBUG=false -DREACT_NATIVE_TARGET_VERSION=68 -DANDROID_TOOLCHAIN=clang -DBOOST_VERSION=1_63_0 -DNODE_MODULES_DIR=/Users/lukasz.kinasiewicz/dev/nitrox5/node_modules -DJS_RUNTIME=v8 -DJS_RUNTIME_DIR=/Users/lukasz.kinasiewicz/dev/nitrox5/node_modules/react-native-v8 -DCLIENT_SIDE_BUILD=true -DIS_NEW_ARCHITECTURE_ENABLED=false -DPLAYGROUND_APP_NAME=native -DRNVERSION=68}
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /Users/lukasz.kinasiewicz/Library/Android/sdk/ndk/21.4.7075529/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/lukasz.kinasiewicz/Library/Android/sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring done
-- Generating done
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:
V8EXECUTOR_LIB
linked by target "reanimated" in directory /Users/lukasz.kinasiewicz/dev/nitrox5/node_modules/react-native-reanimated/android
CMake Generate step failed. Build files cannot be regenerated correctly.
C/C++: debug|x86 :CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
C/C++: debug|x86 :Please set them or make sure they are set and tested correctly in the CMake files:
C/C++: debug|x86 :FBJNI_LIB
C/C++: debug|x86 : linked by target "v8executor" in directory /Users/lukasz.kinasiewicz/dev/nitrox5/node_modules/react-native-v8/android
C/C++: debug|x86 :FOLLY_LIB
C/C++: debug|x86 : linked by target "reactnative_internal_static" in directory /Users/lukasz.kinasiewicz/dev/nitrox5/node_modules/react-native-v8/android
C/C++: debug|x86 : linked by target "v8executor" in directory /Users/lukasz.kinasiewicz/dev/nitrox5/node_modules/react-native-v8/android
C/C++: debug|x86 :GLOG_LIB
C/C++: debug|x86 : linked by target "v8executor" in directory /Users/lukasz.kinasiewicz/dev/nitrox5/node_modules/react-native-v8/android
C/C++: debug|x86 :JSINSPECTOR_LIB
C/C++: debug|x86 : linked by target "v8executor" in directory /Users/lukasz.kinasiewicz/dev/nitrox5/node_modules/react-native-v8/android
C/C++: debug|x86 :JSI_LIB
C/C++: debug|x86 : linked by target "v8executor" in directory /Users/lukasz.kinasiewicz/dev/nitrox5/node_modules/react-native-v8/android
C/C++: debug|x86 :REACT_NATIVE_JNI_LIB
C/C++: debug|x86 : linked by target "v8executor" in directory /Users/lukasz.kinasiewicz/dev/nitrox5/node_modules/react-native-v8/android
C/C++: debug|x86 :V8_ANDROID_LIB
C/C++: debug|x86 : linked by target "v8executor" in directory /Users/lukasz.kinasiewicz/dev/nitrox5/node_modules/react-native-v8/android
C/C++: debug|x86 :CMake Generate step failed. Build files cannot be regenerated correctly.
[CXX1405] error when building with cmake using /Users/lukasz.kinasiewicz/dev/nitrox5/node_modules/react-native-v8/android/CMakeLists.txt: Build command failed.
Error while executing process /Users/lukasz.kinasiewicz/Library/Android/sdk/cmake/3.18.1/bin/cmake with arguments {-H/Users/lukasz.kinasiewicz/dev/nitrox5/node_modules/react-native-v8/android -DCMAKE_SYSTEM_NAME=Android -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_SYSTEM_VERSION=22 -DANDROID_PLATFORM=android-22 -DANDROID_ABI=x86 -DCMAKE_ANDROID_ARCH_ABI=x86 -DANDROID_NDK=/Users/lukasz.kinasiewicz/Library/Android/sdk/ndk/21.4.7075529 -DCMAKE_ANDROID_NDK=/Users/lukasz.kinasiewicz/Library/Android/sdk/ndk/21.4.7075529 -DCMAKE_TOOLCHAIN_FILE=/Users/lukasz.kinasiewicz/Library/Android/sdk/ndk/21.4.7075529/build/cmake/android.toolchain.cmake -DCMAKE_MAKE_PROGRAM=/Users/lukasz.kinasiewicz/Library/Android/sdk/cmake/3.18.1/bin/ninja -DCMAKE_CXX_FLAGS=-fstack-protector-all -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/Users/lukasz.kinasiewicz/dev/nitrox5/node_modules/react-native-v8/android/build/intermediates/cxx/Debug/5k691h4q/obj/x86 -DCMAKE_RUNTIME_OUTPUT_DIRECTORY=/Users/lukasz.kinasiewicz/dev/nitrox5/node_modules/react-native-v8/android/build/intermediates/cxx/Debug/5k691h4q/obj/x86 -DCMAKE_BUILD_TYPE=Debug -B/Users/lukasz.kinasiewicz/dev/nitrox5/node_modules/react-native-v8/android/.cxx/Debug/5k691h4q/x86 -GNinja -DANDROID_STL=c++_shared -DBOOST_VERSION=1_63_0 -DBUILD_DIR=/Users/lukasz.kinasiewicz/dev/nitrox5/node_modules/react-native-v8/android/build -DRN_DIR=/Users/lukasz.kinasiewicz/dev/nitrox5/node_modules/react-native -DREACT_NATIVE_TARGET_VERSION=68 -DV8_ANDROID_DIR=/Users/lukasz.kinasiewicz/dev/nitrox5/node_modules/v8-android-jit -DSO_DIR=/Users/lukasz.kinasiewicz/dev/nitrox5/node_modules/react-native-v8/android/build/jniLibs}
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /Users/lukasz.kinasiewicz/Library/Android/sdk/ndk/21.4.7075529/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/lukasz.kinasiewicz/Library/Android/sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring done
-- Generating done
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:
FBJNI_LIB
linked by target "v8executor" in directory /Users/lukasz.kinasiewicz/dev/nitrox5/node_modules/react-native-v8/android
FOLLY_LIB
linked by target "reactnative_internal_static" in directory /Users/lukasz.kinasiewicz/dev/nitrox5/node_modules/react-native-v8/android
linked by target "v8executor" in directory /Users/lukasz.kinasiewicz/dev/nitrox5/node_modules/react-native-v8/android
GLOG_LIB
linked by target "v8executor" in directory /Users/lukasz.kinasiewicz/dev/nitrox5/node_modules/react-native-v8/android
JSINSPECTOR_LIB
linked by target "v8executor" in directory /Users/lukasz.kinasiewicz/dev/nitrox5/node_modules/react-native-v8/android
JSI_LIB
linked by target "v8executor" in directory /Users/lukasz.kinasiewicz/dev/nitrox5/node_modules/react-native-v8/android
REACT_NATIVE_JNI_LIB
linked by target "v8executor" in directory /Users/lukasz.kinasiewicz/dev/nitrox5/node_modules/react-native-v8/android
V8_ANDROID_LIB
linked by target "v8executor" in directory /Users/lukasz.kinasiewicz/dev/nitrox5/node_modules/react-native-v8/android
CMake Generate step failed. Build files cannot be regenerated correctly.
i've tried to build in on a rn 69.5 + reanimated 2.10 project and it works for me. could you provide a minimal reproducible example for me to further investigate?
@Kudo , thanks for looking into it.
Here is the bare minimum repo to reproduce the issue on my end. https://github.com/Terfender/rnrn
system:
OS: macOS 12.5.1
CPU: (16) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
Memory: 2.00 GB / 32.00 GB
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 16.13.1 - /usr/local/bin/node
Yarn: 1.22.17 - ~/.node/bin/yarn
npm: 8.4.1 - ~/.node/bin/npm
Watchman: 2022.08.22.00 - /usr/local/bin/watchman
Managers:
CocoaPods: Not Found
SDKs:
iOS SDK:
Platforms: DriverKit 21.4, iOS 15.5, macOS 12.3, tvOS 15.4, watchOS 8.5
Android SDK:
API Levels: 29
Build Tools: 29.0.2
Android NDK: 22.1.7171670
IDEs:
Android Studio: 2021.2 AI-212.5712.43.2112.8609683
Xcode: 13.4.1/13F100 - /usr/bin/xcodebuild
Languages:
Java: 1.8.0_292 - /usr/bin/javac
npmPackages:
@react-native-community/cli: Not Found
react: 18.0.0 => 18.0.0
react-native: 0.69.5 => 0.69.5
react-native-macos: Not Found
npmGlobalPackages:
*react-native*: Not Found
BTW, in my local.properties, I set NDK version to 25.1.8937393 (I had to do it to get around with Reanimted building issue).
However, react-native info
says I am using Android NDK: 22.1.7171670
. Not sure if this conflict has anything to do with the error.
I appreciate for looking into my issue.
Update:
@Terfender thanks for the help. unfortunately, i cloned the example with ndk 25.1.8937393 and it still works for me 🤔. i may get the problem from your build error log. it looks the linker was linking to your /usr/local/lib/libglog.a
. could you double check whether you have this file and why this was installed?
worked after deleting /usr/local/lib/libglog.a
Not sure what it is used for. Created on January 14, 2019 tho
Thanks for your help.
Hello, I am getting the following error. How to fix it?
MacOS: 12.5.1
package.json