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

[CXX1429] error when building with cmake using #45

Closed
burhon97 opened this issue Aug 14, 2023 · 4 comments
Closed

[CXX1429] error when building with cmake using #45

burhon97 opened this issue Aug 14, 2023 · 4 comments

Comments

@burhon97
Copy link

I create new React-Native app and install the pakcage react-native-libsodium and run project.
Error when run project React-Native on android npm run android:

BUILD FAILED in 17s
error Failed to install the app. Command failed with exit code 1: ./gradlew app:installDebug -PreactNativeDevServerPort=8081 FAILURE: Build failed with an exception. * What went wrong:
Execution failed for task ':react-native-libsodium:configureCMakeDebug[arm64-v8a]'.
> [CXX1429] error when building with cmake using /Users/code_joker/Documents/react-native-libsodium/exampleMy/node_modules/react-native-libsodium/android/CMakeLists.txt: -- Android: Targeting API '21' with architecture 'arm64', ABI 'arm64-v8a', and processor 'aarch64' -- Android: Selected unified Clang toolchain -- The C compiler identification is Clang 12.0.8 -- The CXX compiler identification is Clang 12.0.8 -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working C compiler: /Users/code_joker/Library/Android/sdk/ndk/23.1.7779620/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/code_joker/Library/Android/sdk/ndk/23.1.7779620/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang++ - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done -- Configuring done C++ build system [configure] failed while executing: /Users/code_joker/Library/Android/sdk/cmake/3.22.1/bin/cmake \ -H/Users/code_joker/Documents/react-native-libsodium/exampleMy/node_modules/react-native-libsodium/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/code_joker/Library/Android/sdk/ndk/23.1.7779620 \ -DCMAKE_ANDROID_NDK=/Users/code_joker/Library/Android/sdk/ndk/23.1.7779620 \ -DCMAKE_TOOLCHAIN_FILE=/Users/code_joker/Library/Android/sdk/ndk/23.1.7779620/build/cmake/android.toolchain.cmake \ -DCMAKE_MAKE_PROGRAM=/Users/code_joker/Library/Android/sdk/cmake/3.22.1/bin/ninja \ "-DCMAKE_CXX_FLAGS=-O2 -frtti -fexceptions -Wall -fstack-protector-all" \ -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/Users/code_joker/Documents/react-native-libsodium/exampleMy/node_modules/react-native-libsodium/android/build/intermediates/cxx/Debug/h3q525i6/obj/arm64-v8a \ -DCMAKE_RUNTIME_OUTPUT_DIRECTORY=/Users/code_joker/Documents/react-native-libsodium/exampleMy/node_modules/react-native-libsodium/android/build/intermediates/cxx/Debug/h3q525i6/obj/arm64-v8a \ -DCMAKE_BUILD_TYPE=Debug \ -B/Users/code_joker/Documents/react-native-libsodium/exampleMy/node_modules/react-native-libsodium/android/.cxx/Debug/h3q525i6/arm64-v8a \ -GNinja \ -DANDROID_STL=c++_shared from /Users/code_joker/Documents/react-native-libsodium/exampleMy/node_modules/react-native-libsodium/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 at CMakeLists.txt:34 (add_library): Cannot find source file: ../node_modules/react-native/ReactCommon/jsi/jsi/jsi.cpp Tried extensions .c .C .c++ .cc .cpp .cxx .cu .mpp .m .M .mm .ixx .cppm .h .hh .h++ .hm .hpp .hxx .in .txx .f .F .for .f77 .f90 .f95 .f03 .hip .ispc CMake Error at CMakeLists.txt:34 (add_library): No SOURCES given to target: libsodium CMake Generate step failed. Build files cannot be regenerated correctly.

Versions

  • React-Native: 0.72.3
  • MacBook Air: M1, 2020, Chip Apple M1, macOS Ventura 13.4.1 (c)
@nikgraf
Copy link
Member

nikgraf commented Oct 2, 2023

@burhon97 thanks for reporting! just release 1.1.1 which should fix the issue due #47

Would appreciate if you can let me know that it works for you.

@emenocal07
Copy link

I just experienced the issue a couple hours ago and saw the release was not ready yet, in the mean time patched the lib. I'll try the new version and let you now, thanks @nikgraf !

@emenocal07
Copy link

Android build compiles @nikgraf, thanks again!

@nikgraf
Copy link
Member

nikgraf commented Oct 2, 2023

glad to you hear @emenocal07 👍

will close the issue, feel free to reopen in case it's not solved for someone

@nikgraf nikgraf closed this as completed Oct 3, 2023
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

3 participants