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

Task :react-native-reanimated:buildCMakeDebug[arm64-v8a] FAILED C/C++: ninja: Entering directory `node_modules/react-native-reanimated/android/.cxx/Debug/1v4h12z2/arm64-v8a' #6847

Open
pavani1518 opened this issue Dec 20, 2024 · 10 comments
Labels
Missing repro This issue need minimum repro scenario Platform: Android This issue is specific to Android Platform: iOS This issue is specific to iOS

Comments

@pavani1518
Copy link

Description

I am trying to run the project in M3 apple chip Mac with React native reanimated version "^3.14" and react native version "0.74" but build is getting failed with Task :react-native-reanimated:buildCMakeDebug[arm64-v8a] FAILED

C/C++: ninja: Entering directory `/Users/project/node_modules/react-native-reanimated/android/.cxx/Debug/1v4h12z2/arm64-v8a'

React Native Info:
System:
OS: macOS 14.4.1
CPU: (14) arm64 Apple M3 Max
Memory: 345.09 MB / 36.00 GB
Shell:
version: 3.2.57
path: /bin/bash

Binaries:
Node:
version: 22.10.0
path: ~/.nvm/versions/node/v22.10.0/bin/node
Yarn:
version: 1.22.22
path: ~/.nvm/versions/node/v22.10.0/bin/yarn
npm:
version: 10.9.0
path: ~/.nvm/versions/node/v22.10.0/bin/npm

Watchman:
version: 2024.11.04.00
path: /opt/homebrew/bin/watchman

Managers:
CocoaPods:
version: 1.16.2
path: /opt/homebrew/bin/pod

SDKs:
iOS SDK:
Platforms:
- DriverKit 23.5
- iOS 17.5
- macOS 14.5
- tvOS 17.5
- visionOS 1.2
- watchOS 10.5
Android SDK: Not Found
IDEs:
Android Studio: 2024.2 AI-242.23339.11.2421.12700392
Xcode:
version: 15.4/15F31d
path: /usr/bin/xcodebuild

Languages:
Java:
version: 17.0.13
path: /usr/bin/javac

Ruby:
version: 3.3.6
path: /opt/homebrew/opt/ruby/bin/ruby

npmPackages:
"@react-native-community/cli": Not Found

react:
installed: 18.3.1
wanted: 18.3.1
react-native:
installed: 0.74.5
wanted: 0.74.5
react-native-macos: Not Found
npmGlobalPackages:
"react-native": Not Found
Android:
hermesEnabled: true
newArchEnabled: false

iOS:
hermesEnabled: true
newArchEnabled: false

I have NDK version - 26.1.10909125 and gradle - 8.6

Steps to reproduce

  1. yarn install
  2. sync the project has success.
  3. build the project in android
  4. Build is failing with react native reanimated build CMakeDebug

Snack or a link to a repository

https://snack.expo.io/

Reanimated version

3.14.0

React Native version

0.74.5

Platforms

Android

JavaScript runtime

Hermes

Workflow

React Native

Architecture

Fabric (New Architecture)

Build type

Debug app & dev bundle

Device

Android emulator

Device model

No response

Acknowledgements

Yes

@github-actions github-actions bot added Platform: Android This issue is specific to Android Platform: iOS This issue is specific to iOS Missing repro This issue need minimum repro scenario labels Dec 20, 2024
Copy link

Hey! 👋

The issue doesn't seem to contain a minimal reproduction.

Could you provide a snack or a link to a GitHub repository under your username that reproduces the problem?

@sebasbeleno
Copy link

same issue here

> Task :react-native-reanimated:buildCMakeDebug[arm64-v8a] FAILED C/C++: ninja: error: mkdir(src/main/cpp/worklets/CMakeFiles/worklets.dir/C_/Users/sebas/Desktop/react-native-test_sebasbeleno/flatironsApp/node_modules): No such file or directory 117 actionable tasks: 31 executed, 86 up-to-date

triying to install react-native reanimated 3.16.6 on react-native 0.76.5.

I cleaned gradle and changed the directory path to a shorter one and the problem persists

@sebasbeleno
Copy link

Edit:

Solved following the next steps:

  1. My project directory name was to large, renamed it to a short one and move the project to a shortest path. Example: users/user/desktop/myApp. (remove node_modules and clean gradlew too)
  2. On build.gradle make sure to use ndkVersion = "26.1.10909125" new versions may return error
  3. If the error persist, try remove all arm related builds from gradle.properties. Example: reactNativeArchitectures=x86,x86_64

Hopes this help

@vakadu
Copy link

vakadu commented Dec 21, 2024

  • What went wrong:
    Execution failed for task ':app:configureCMakeRelWithDebInfo[arm64-v8a]'.

[CXX1429] error when building with cmake using /Users/vakadu/Workspace/ayodhya/node_modules/react-native/ReactAndroid/cmake-utils/default-app-setup/CMakeLists.txt: -- The C compiler identification is Clang 17.0.2

Getting same issues using mac, working fine in ios but not in andoird, if i make newArchEnabled=false then build is running successful in android.

Using React Native: 0.76.5, react-native-reanimated: 3.16.5

@pavani1518
Copy link
Author

pavani1518 commented Dec 23, 2024

I will try above solutions and let you know if any issues.

@GSFZamai
Copy link

I'm on React Native 0.74.6.
Downgrading react-native-reanimated to 3.15.5 resolved

@GSFZamai
Copy link

GSFZamai commented Jan 6, 2025

For react-native-reanimated 3.16.* you can add a CMAKE_VERSION environment variable to the latest installed version:
image

Worked on:

  • Windows 10
  • React Native: 0.75.6
  • Reanimated: 3.16.6

@stickor
Copy link

stickor commented Jan 7, 2025

For react-native-reanimated 3.16.* you can add a CMAKE_VERSION environment variable to the latest installed version: image

Worked on:

  • Windows 10
  • React Native: 0.75.6
  • Reanimated: 3.16.6
    Where is this CMAKE_VERSION added ?

@GSFZamai
Copy link

GSFZamai commented Jan 7, 2025

For react-native-reanimated 3.16.* you can add a CMAKE_VERSION environment variable to the latest installed version: image
Worked on:

  • Windows 10
  • React Native: 0.75.6
  • Reanimated: 3.16.6
    Where is this CMAKE_VERSION added ?

You can add on your User's Environment Variable, through System Settings, or on cmd:

set CMAKE_VERSION=3.31.1 
::set Environment variable

Before that see if it's correctly setted

set 
::list all Environment Variables

Edit:

Just to give some context.
On this PR #6474 the enviroment variable for CMAKE_VERSION is used, and when It's not found it assigns the value "3.22.1"

@Muhammad-Hassam
Copy link

Muhammad-Hassam commented Jan 10, 2025

i was also facing this issue i also updated the CMAKE_VERSION to 3.31.1 but got same error so resolved this issue by changing uiScheduler_->scheduleOnUI([=]() to uiScheduler_->scheduleOnUI([=, this]() line inside NativeReanimatedModule.cpp file. You can find this file by ../node_modules/react-native-reanimated/Common/cpp/reanimated/NativeModules/NativeReanimatedModule.cpp

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Missing repro This issue need minimum repro scenario Platform: Android This issue is specific to Android Platform: iOS This issue is specific to iOS
Projects
None yet
Development

No branches or pull requests

6 participants