react-native-reanimated icon indicating copy to clipboard operation
react-native-reanimated copied to clipboard

react-native-reanimated:buildCMakeDebug taking too much time

Open shijoavb opened this issue 3 months ago • 47 comments

Description

react-native-reanimated:buildCMakeDebug taking long time 30 minutes can't able to do ./gradlew clean due to that. Tried in latest versions getting same issue. "react-native-reanimated": "^4.0.2", "react-native-worklets": "^0.4.0", "react-native": "0.81.1",

Steps to reproduce

npx react-native run-android

Snack or a link to a repository

github.com

Reanimated version

4.0.2

Worklets version

0.4.0

React Native version

0.81.1

Platforms

Android

JavaScript runtime

None

Workflow

None

Architecture

None

Build type

No response

Device

No response

Host machine

None

Device model

No response

Acknowledgements

No

shijoavb avatar Sep 09 '25 12:09 shijoavb

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?

github-actions[bot] avatar Sep 09 '25 12:09 github-actions[bot]

Hey! What is your machine's configuration? I mean the operating system, CPU model, and amount of RAM. It's important for me to understand the problem because, on my computer (macOS, M4, 24GB RAM), it takes 23 seconds.

piaskowyk avatar Sep 09 '25 15:09 piaskowyk

I am facing the same issue in RN 0.80 when trying to generate a release build in the pipeline, even though debug build works locally.

* What went wrong:
Execution failed for task ':react-native-reanimated:buildCMakeRelWithDebInfo[arm64-v8a][reanimated]'.
> com.android.ide.common.process.ProcessException: ninja: Entering directory `/home/circleci/project/node_modules/react-native-reanimated/android/.cxx/RelWithDebInfo/j2q1g1h4/arm64-v8a'
  [0/2] Re-checking globbed directories...
  [1/62] Building CXX object CMakeFiles/reanimated.dir/home/circleci/project/node_modules/react-native-reanimated/Common/cpp/reanimated/CSS/common/Quaternion.cpp.o
  [2/62] Building CXX object CMakeFiles/reanimated.dir/home/circleci/project/node_modules/react-native-reanimated/Common/cpp/reanimated/CSS/config/common.cpp.o
  [3/62] Building CXX object CMakeFiles/reanimated.dir/home/circleci/project/node_modules/react-native-reanimated/Common/cpp/reanimated/CSS/progress/RawProgressProvider.cpp.o
  [4/62] Building CXX object CMakeFiles/reanimated.dir/home/circleci/project/node_modules/react-native-reanimated/Common/cpp/reanimated/CSS/easing/steps.cpp.o
  [5/62] Building CXX object CMakeFiles/reanimated.dir/home/circleci/project/node_modules/react-native-reanimated/Common/cpp/reanimated/CSS/easing/cubicBezier.cpp.o
  [6/62] Building CXX object CMakeFiles/reanimated.dir/home/circleci/project/node_modules/react-native-reanimated/Common/cpp/reanimated/CSS/common/vectors.cpp.o
  [7/62] Building CXX object CMakeFiles/reanimated.dir/home/circleci/project/node_modules/react-native-reanimated/Common/cpp/reanimated/CSS/easing/linear.cpp.o
  [8/62] Building CXX object CMakeFiles/reanimated.dir/home/circleci/project/node_modules/react-native-reanimated/Common/cpp/reanimated/CSS/easing/EasingFunctions.cpp.o
  [9/62] Building CXX object CMakeFiles/reanimated.dir/home/circleci/project/node_modules/react-native-reanimated/Common/cpp/reanimated/CSS/util/algorithms.cpp.o
  [10/62] Building CXX object CMakeFiles/reanimated.dir/home/circleci/project/node_modules/react-native-reanimated/Common/cpp/reanimated/CSS/common/TransformMatrix.cpp.o
  [11/62] Building CXX object CMakeFiles/reanimated.dir/home/circleci/project/node_modules/react-native-reanimated/Common/cpp/reanimated/CSS/config/CSSTransitionConfig.cpp.o
  [12/62] Building CXX object CMakeFiles/reanimated.dir/home/circleci/project/node_modules/react-native-reanimated/Common/cpp/reanimated/CSS/interpolation/PropertyInterpolator.cpp.o
  [13/62] Building CXX object CMakeFiles/reanimated.dir/home/circleci/project/node_modules/react-native-reanimated/Common/cpp/reanimated/AnimatedSensor/AnimatedSensorModule.cpp.o
  [14/62] Building CXX object CMakeFiles/reanimated.dir/home/circleci/project/node_modules/react-native-reanimated/Common/cpp/reanimated/CSS/util/keyframes.cpp.o
  [15/62] Building CXX object CMakeFiles/reanimated.dir/home/circleci/project/node_modules/react-native-reanimated/Common/cpp/reanimated/CSS/registry/StaticPropsRegistry.cpp.o
  [16/62] Building CXX object CMakeFiles/reanimated.dir/home/circleci/project/node_modules/react-native-reanimated/Common/cpp/reanimated/CSS/common/values/CSSKeyword.cpp.o
  [17/62] Building CXX object CMakeFiles/reanimated.dir/home/circleci/project/node_modules/react-native-reanimated/Common/cpp/reanimated/CSS/common/values/CSSBoolean.cpp.o
  [18/62] Building CXX object CMakeFiles/reanimated.dir/home/circleci/project/node_modules/react-native-reanimated/Common/cpp/reanimated/CSS/misc/ViewStylesRepository.cpp.o
  [19/62] Building CXX object CMakeFiles/reanimated.dir/home/circleci/project/node_modules/react-native-reanimated/Common/cpp/reanimated/CSS/common/values/CSSNumber.cpp.o
  [20/62] Building CXX object CMakeFiles/reanimated.dir/home/circleci/project/node_modules/react-native-reanimated/Common/cpp/reanimated/CSS/interpolation/transforms/TransformOperationInterpolator.cpp.o
  [21/62] Building CXX object CMakeFiles/reanimated.dir/home/circleci/project/node_modules/react-native-reanimated/Common/cpp/reanimated/CSS/common/values/CSSDimension.cpp.o
  [22/62] Building CXX object CMakeFiles/reanimated.dir/home/circleci/project/node_modules/react-native-reanimated/Common/cpp/reanimated/CSS/common/values/CSSColor.cpp.o
  [23/62] Building CXX object CMakeFiles/reanimated.dir/home/circleci/project/node_modules/react-native-reanimated/Common/cpp/reanimated/CSS/interpolation/groups/ArrayPropertiesInterpolator.cpp.o
  [24/62] Building CXX object CMakeFiles/reanimated.dir/home/circleci/project/node_modules/react-native-reanimated/Common/cpp/reanimated/CSS/common/values/CSSDiscreteArray.cpp.o
  [25/62] Building CXX object CMakeFiles/reanimated.dir/home/circleci/project/node_modules/react-native-reanimated/Common/cpp/reanimated/CSS/interpolation/groups/RecordPropertiesInterpolator.cpp.o
  [26/62] Building CXX object CMakeFiles/reanimated.dir/home/circleci/project/node_modules/react-native-reanimated/Common/cpp/reanimated/CSS/interpolation/groups/GroupPropertiesInterpolator.cpp.o
  [27/62] Building CXX object CMakeFiles/reanimated.dir/home/circleci/project/node_modules/react-native-reanimated/Common/cpp/reanimated/Fabric/updates/AnimatedPropsRegistry.cpp.o
  [28/62] Building CXX object CMakeFiles/reanimated.dir/home/circleci/project/node_modules/react-native-reanimated/Common/cpp/reanimated/CSS/util/interpolators.cpp.o
  [29/62] Building CXX object CMakeFiles/reanimated.dir/home/circleci/project/node_modules/react-native-reanimated/Common/cpp/reanimated/CSS/interpolation/transforms/TransformOperation.cpp.o
  [30/62] Building CXX object CMakeFiles/reanimated.dir/home/circleci/project/node_modules/react-native-reanimated/Common/cpp/reanimated/Tools/FeatureFlags.cpp.o
  [31/62] Building CXX object CMakeFiles/reanimated.dir/home/circleci/project/node_modules/react-native-reanimated/Common/cpp/reanimated/LayoutAnimations/LayoutAnimationsManager.cpp.o
  [32/62] Building CXX object CMakeFiles/reanimated.dir/home/circleci/project/node_modules/react-native-reanimated/Common/cpp/reanimated/CSS/interpolation/transforms/TransformsStyleInterpolator.cpp.o
  [33/62] Building CXX object CMakeFiles/reanimated.dir/home/circleci/project/node_modules/react-native-reanimated/Common/cpp/reanimated/NativeModules/ReanimatedModuleProxySpec.cpp.o
  [34/62] Building CXX object CMakeFiles/reanimated.dir/home/circleci/project/node_modules/react-native-reanimated/Common/cpp/reanimated/Tools/ReanimatedVersion.cpp.o
  [35/62] Building CXX object CMakeFiles/reanimated.dir/home/circleci/project/node_modules/react-native-reanimated/Common/cpp/reanimated/CSS/interpolation/InterpolatorFactory.cpp.o
  [36/62] Building CXX object CMakeFiles/reanimated.dir/home/circleci/project/node_modules/react-native-reanimated/Common/cpp/reanimated/Fabric/ShadowTreeCloner.cpp.o
  [37/62] Building CXX object CMakeFiles/reanimated.dir/home/circleci/project/node_modules/react-native-reanimated/Common/cpp/reanimated/LayoutAnimations/LayoutAnimationsUtils.cpp.o
  [38/62] Building CXX object CMakeFiles/reanimated.dir/home/circleci/project/node_modules/react-native-reanimated/Common/cpp/reanimated/NativeModules/PropValueProcessor.cpp.o
  [39/62] Building CXX object CMakeFiles/reanimated.dir/home/circleci/project/node_modules/react-native-reanimated/Common/cpp/reanimated/CSS/common/values/CSSAngle.cpp.o
  [40/62] Building CXX object CMakeFiles/reanimated.dir/home/circleci/project/node_modules/react-native-reanimated/Common/cpp/reanimated/Fabric/updates/UpdatesRegistry.cpp.o
  [41/62] Building CXX object CMakeFiles/reanimated.dir/home/circleci/project/node_modules/react-native-reanimated/Common/cpp/reanimated/RuntimeDecorators/UIRuntimeDecorator.cpp.o
  [42/62] Building CXX object CMakeFiles/reanimated.dir/home/circleci/project/node_modules/react-native-reanimated/Common/cpp/reanimated/CSS/config/CSSKeyframesConfig.cpp.o
  FAILED: CMakeFiles/reanimated.dir/home/circleci/project/node_modules/react-native-reanimated/Common/cpp/reanimated/CSS/config/CSSKeyframesConfig.cpp.o 
  /home/circleci/android-sdk/ndk/27.1.12297006/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++ --target=aarch64-none-linux-android24 --sysroot=/home/circleci/android-sdk/ndk/27.1.12297006/toolchains/llvm/prebuilt/linux-x86_64/sysroot -Dreanimated_EXPORTS -I/home/circleci/project/node_modules/react-native-reanimated/android/../Common/cpp -I/home/circleci/project/node_modules/react-native-reanimated/android/src/main/cpp -I/home/circleci/project/node_modules/react-native/ReactCommon -I/home/circleci/project/node_modules/react-native/ReactCommon/yoga -I/home/circleci/project/node_modules/react-native/ReactAndroid/src/main/jni/react/turbomodule -I/home/circleci/project/node_modules/react-native/ReactCommon/callinvoker -I/home/circleci/project/node_modules/react-native/ReactCommon/runtimeexecutor -I/home/circleci/project/node_modules/react-native/ReactCommon/jsiexecutor -I/home/circleci/project/node_modules/react-native/ReactCommon/react/renderer/graphics/platform/cxx -I/home/circleci/project/node_modules/react-native-worklets/Common/cpp -I/home/circleci/project/node_modules/react-native-worklets/android/src/main/cpp -isystem /home/circleci/.gradle/caches/8.14.1/transforms/f068ef30bdc2b4b59e770b995889be91/transformed/jetified-react-android-0.80.2-release/prefab/modules/jsi/include -isystem /home/circleci/.gradle/caches/8.14.1/transforms/4cfadc75c68a3da58beec496092de60f/transformed/jetified-fbjni-0.7.0/prefab/modules/fbjni/include -isystem /home/circleci/.gradle/caches/8.14.1/transforms/f068ef30bdc2b4b59e770b995889be91/transformed/jetified-react-android-0.80.2-release/prefab/modules/reactnative/include -g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -D__BIONIC_NO_PAGE_SIZE_MACRO -D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security   -DREACT_NATIVE_MINOR_VERSION=80    -DREANIMATED_PROFILING=false    -DREANIMATED_VERSION=4.0.3    -DREANIMATED_FEATURE_FLAGS="[DISABLE_COMMIT_PAUSING_MECHANISM:false][ANDROID_SYNCHRONOUSLY_UPDATE_UI_PROPS:false][EXAMPLE_STATIC_FLAG:true]" -fexceptions -frtti -std=c++20 -Wall -Werror -fno-omit-frame-pointer -fstack-protector-all -DNDEBUG -O2 -g -DNDEBUG -fPIC -DFOLLY_NO_CONFIG=1 -DFOLLY_HAVE_CLOCK_GETTIME=1 -DFOLLY_USE_LIBCPP=1 -DFOLLY_CFG_NO_COROUTINES=1 -DFOLLY_MOBILE=1 -DFOLLY_HAVE_RECVMMSG=1 -DFOLLY_HAVE_PTHREAD=1 -DFOLLY_HAVE_XSI_STRERROR_R=1 -std=gnu++20 -MD -MT CMakeFiles/reanimated.dir/home/circleci/project/node_modules/react-native-reanimated/Common/cpp/reanimated/CSS/config/CSSKeyframesConfig.cpp.o -MF CMakeFiles/reanimated.dir/home/circleci/project/node_modules/react-native-reanimated/Common/cpp/reanimated/CSS/config/CSSKeyframesConfig.cpp.o.d -o CMakeFiles/reanimated.dir/home/circleci/project/node_modules/react-native-reanimated/Common/cpp/reanimated/CSS/config/CSSKeyframesConfig.cpp.o -c /home/circleci/project/node_modules/react-native-reanimated/Common/cpp/reanimated/CSS/config/CSSKeyframesConfig.cpp
  PLEASE submit a bug report to https://github.com/android-ndk/ndk/issues and include the crash backtrace, preprocessed source, and associated run script.
  Stack dump:
  0.    Program arguments: /home/circleci/android-sdk/ndk/27.1.12297006/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++ --target=aarch64-none-linux-android24 --sysroot=/home/circleci/android-sdk/ndk/27.1.12297006/toolchains/llvm/prebuilt/linux-x86_64/sysroot -Dreanimated_EXPORTS -I/home/circleci/project/node_modules/react-native-reanimated/android/../Common/cpp -I/home/circleci/project/node_modules/react-native-reanimated/android/src/main/cpp -I/home/circleci/project/node_modules/react-native/ReactCommon -I/home/circleci/project/node_modules/react-native/ReactCommon/yoga -I/home/circleci/project/node_modules/react-native/ReactAndroid/src/main/jni/react/turbomodule -I/home/circleci/project/node_modules/react-native/ReactCommon/callinvoker -I/home/circleci/project/node_modules/react-native/ReactCommon/runtimeexecutor -I/home/circleci/project/node_modules/react-native/ReactCommon/jsiexecutor -I/home/circleci/project/node_modules/react-native/ReactCommon/react/renderer/graphics/platform/cxx -I/home/circleci/project/node_modules/react-native-worklets/Common/cpp -I/home/circleci/project/node_modules/react-native-worklets/android/src/main/cpp -isystem /home/circleci/.gradle/caches/8.14.1/transforms/f068ef30bdc2b4b59e770b995889be91/transformed/jetified-react-android-0.80.2-release/prefab/modules/jsi/include -isystem /home/circleci/.gradle/caches/8.14.1/transforms/4cfadc75c68a3da58beec496092de60f/transformed/jetified-fbjni-0.7.0/prefab/modules/fbjni/include -isystem /home/circleci/.gradle/caches/8.14.1/transforms/f068ef30bdc2b4b59e770b995889be91/transformed/jetified-react-android-0.80.2-release/prefab/modules/reactnative/include -g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -D__BIONIC_NO_PAGE_SIZE_MACRO -D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -DREACT_NATIVE_MINOR_VERSION=80 -DREANIMATED_PROFILING=false -DREANIMATED_VERSION=4.0.3 -DREANIMATED_FEATURE_FLAGS=[DISABLE_COMMIT_PAUSING_MECHANISM:false][ANDROID_SYNCHRONOUSLY_UPDATE_UI_PROPS:false][EXAMPLE_STATIC_FLAG:true] -fexceptions -frtti -std=c++20 -Wall -Werror -fno-omit-frame-pointer -fstack-protector-all -DNDEBUG -O2 -g -DNDEBUG -fPIC -DFOLLY_NO_CONFIG=1 -DFOLLY_HAVE_CLOCK_GETTIME=1 -DFOLLY_USE_LIBCPP=1 -DFOLLY_CFG_NO_COROUTINES=1 -DFOLLY_MOBILE=1 -DFOLLY_HAVE_RECVMMSG=1 -DFOLLY_HAVE_PTHREAD=1 -DFOLLY_HAVE_XSI_STRERROR_R=1 -std=gnu++20 -MD -MT CMakeFiles/reanimated.dir/home/circleci/project/node_modules/react-native-reanimated/Common/cpp/reanimated/CSS/config/CSSKeyframesConfig.cpp.o -MF CMakeFiles/reanimated.dir/home/circleci/project/node_modules/react-native-reanimated/Common/cpp/reanimated/CSS/config/CSSKeyframesConfig.cpp.o.d -o CMakeFiles/reanimated.dir/home/circleci/project/node_modules/react-native-reanimated/Common/cpp/reanimated/CSS/config/CSSKeyframesConfig.cpp.o -c /home/circleci/project/node_modules/react-native-reanimated/Common/cpp/reanimated/CSS/config/CSSKeyframesConfig.cpp
  1.    <eof> parser at end of file
  2.    Code generation
  3.    Running pass 'Function Pass Manager' on module '/home/circleci/project/node_modules/react-native-reanimated/Common/cpp/reanimated/CSS/config/CSSKeyframesConfig.cpp'.
  4.    Running pass 'Loop Pass Manager' on function '@_ZN10reanimated3css17ValueInterpolatorIJNS0_12CSSDimensionEEEC2ERKNSt6__ndk16vectorINS4_12basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEENS9_ISB_EEEERKNS0_15CSSValueVariantIJS2_EEERKNS4_10shared_ptrINS0_20ViewStylesRepositoryEEE'
  5.    Running pass 'Canonicalize Freeze Instructions in Loops' on basic block '%21'
  #0 0x00005597ac82e8c2 (/home/circleci/android-sdk/ndk/27.1.12297006/toolchains/llvm/prebuilt/linux-x86_64/bin/clang+++0x442e8c2)
  #1 0x00005597ac82d7c0 (/home/circleci/android-sdk/ndk/27.1.12297006/toolchains/llvm/prebuilt/linux-x86_64/bin/clang+++0x442d7c0)
  #2 0x00005597ac8007ae (/home/circleci/android-sdk/ndk/27.1.12297006/toolchains/llvm/prebuilt/linux-x86_64/bin/clang+++0x44007ae)
  #3 0x00005597ac8008d6 (/home/circleci/android-sdk/ndk/27.1.12297006/toolchains/llvm/prebuilt/linux-x86_64/bin/clang+++0x44008d6)
  #4 0x00007f587ca12520 (/lib/x86_64-linux-gnu/libc.so.6+0x42520)
  #5 0x00005597ae269005 (/home/circleci/android-sdk/ndk/27.1.12297006/toolchains/llvm/prebuilt/linux-x86_64/bin/clang+++0x5e69005)
  #6 0x00007fff557814f0 
  clang++: error: clang frontend command failed with exit code 139 (use -v to see invocation)
  Android (12285214, +pgo, +bolt, +lto, +mlgo, based on r522817b) clang version 18.0.2 (https://android.googlesource.com/toolchain/llvm-project d8003a456d14a3deb8054cdaa529ffbf02d9b262)
  Target: aarch64-none-linux-android24
  Thread model: posix
  InstalledDir: /home/circleci/android-sdk/ndk/27.1.12297006/toolchains/llvm/prebuilt/linux-x86_64/bin
  clang++: note: diagnostic msg: 
  ********************
  
  PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
  Preprocessed source(s) and associated run script(s) are located at:
  clang++: note: diagnostic msg: /tmp/CSSKeyframesConfig-249cc7.cpp
  clang++: note: diagnostic msg: /tmp/CSSKeyframesConfig-249cc7.sh
  clang++: note: diagnostic msg: 
  
  ********************
  [43/62] Building CXX object CMakeFiles/reanimated.dir/home/circleci/project/node_modules/react-native-reanimated/Common/cpp/reanimated/CSS/core/CSSAnimation.cpp.o
  [44/62] Building CXX object CMakeFiles/reanimated.dir/home/circleci/project/node_modules/react-native-reanimated/Common/cpp/reanimated/CSS/registry/CSSKeyframesRegistry.cpp.o
  [45/62] Building CXX object CMakeFiles/reanimated.dir/home/circleci/project/node_modules/react-native-reanimated/Common/cpp/reanimated/CSS/progress/AnimationProgressProvider.cpp.o
  [46/62] Building CXX object CMakeFiles/reanimated.dir/home/circleci/project/node_modules/react-native-reanimated/Common/cpp/reanimated/CSS/interpolation/styles/TransitionStyleInterpolator.cpp.o
  [47/62] Building CXX object CMakeFiles/reanimated.dir/home/circleci/project/node_modules/react-native-reanimated/Common/cpp/reanimated/CSS/registry/CSSTransitionsRegistry.cpp.o
  [48/62] Building CXX object CMakeFiles/reanimated.dir/home/circleci/project/node_modules/react-native-reanimated/Common/cpp/reanimated/CSS/util/DelayedItemsManager.cpp.o
  [49/62] Building CXX object CMakeFiles/reanimated.dir/home/circleci/project/node_modules/react-native-reanimated/Common/cpp/reanimated/CSS/core/CSSTransition.cpp.o
  [50/62] Building CXX object CMakeFiles/reanimated.dir/home/circleci/project/node_modules/react-native-reanimated/Common/cpp/reanimated/CSS/progress/TransitionProgressProvider.cpp.o
  [51/62] Building CXX object CMakeFiles/reanimated.dir/home/circleci/project/node_modules/react-native-reanimated/Common/cpp/reanimated/CSS/util/props.cpp.o
  [52/62] Building CXX object CMakeFiles/reanimated.dir/home/circleci/project/node_modules/react-native-reanimated/Common/cpp/reanimated/CSS/config/CSSAnimationConfig.cpp.o
  [53/62] Building CXX object CMakeFiles/reanimated.dir/home/circleci/project/node_modules/react-native-reanimated/Common/cpp/reanimated/Fabric/ReanimatedMountHook.cpp.o
  [54/62] Building CXX object CMakeFiles/reanimated.dir/home/circleci/project/node_modules/react-native-reanimated/Common/cpp/reanimated/Fabric/ReanimatedCommitHook.cpp.o
  [55/62] Building CXX object CMakeFiles/reanimated.dir/home/circleci/project/node_modules/react-native-reanimated/Common/cpp/reanimated/Fabric/updates/UpdatesRegistryManager.cpp.o
  [56/62] Building CXX object CMakeFiles/reanimated.dir/home/circleci/project/node_modules/react-native-reanimated/Common/cpp/reanimated/CSS/registry/CSSAnimationsRegistry.cpp.o
  [57/62] Building CXX object CMakeFiles/reanimated.dir/home/circleci/project/node_modules/react-native-reanimated/Common/cpp/reanimated/RuntimeDecorators/RNRuntimeDecorator.cpp.o
  [58/62] Building CXX object CMakeFiles/reanimated.dir/src/main/cpp/reanimated/android/OnLoad.cpp.o
  [59/62] Building CXX object CMakeFiles/reanimated.dir/home/circleci/project/node_modules/react-native-reanimated/Common/cpp/reanimated/LayoutAnimations/LayoutAnimationsProxy.cpp.o
  [60/62] Building CXX object CMakeFiles/reanimated.dir/src/main/cpp/reanimated/android/NativeProxy.cpp.o
  [61/62] Building CXX object CMakeFiles/reanimated.dir/home/circleci/project/node_modules/react-native-reanimated/Common/cpp/reanimated/NativeModules/ReanimatedModuleProxy.cpp.o
  ninja: build stopped: subcommand failed.
  
  C++ build system [build] failed while executing:
      /usr/bin/ninja \
        -C \
        /home/circleci/project/node_modules/react-native-reanimated/android/.cxx/RelWithDebInfo/j2q1g1h4/arm64-v8a \
        reanimated
    from /home/circleci/project/node_modules/react-native-reanimated/android

rafaeIrf avatar Sep 09 '25 20:09 rafaeIrf

Hey! What is your machine's configuration? I mean the operating system, CPU model, and amount of RAM. It's important for me to understand the problem because, on my computer (macOS, M4, 24GB RAM), it takes 23 seconds.

i5 MAC INTEL 2019

shijoavb avatar Sep 10 '25 03:09 shijoavb

I am also facing same issue , I have tried to resolve it with all the suggestions and solution from the documentation , but nothing works till now . Is there any solutions @shijoavb you have found , Please let me know whenever you got it .

Devyansh18 avatar Sep 10 '25 17:09 Devyansh18

I'm taking too much time on :react-native-worklets:buildCMakeDebug step.

Image

GabeConsalter avatar Sep 10 '25 18:09 GabeConsalter

@shijoavb i9 2019 Mac and it takes a long time 1 hour+, why is the keyboard library depending on reanimated 😅, I just need a KeyboardAwareScrollView that is maintained, I might have to vibe code one, 1 hour builds will have to do for now I guess

oojr avatar Sep 13 '25 05:09 oojr

@shijoavb i9 2019 Mac and it takes a long time 1 hour+, why is the keyboard library depending on reanimated 😅, I just need a KeyboardAwareScrollView that is maintained, I might have to vibe code one, 1 hour builds will have to do for now I guess

For me it is Gesture handler

shijoavb avatar Sep 13 '25 05:09 shijoavb

+1 MACOS M2

SwikarBhattarai avatar Sep 18 '25 09:09 SwikarBhattarai

Any solution for this?

coulsptr avatar Sep 19 '25 02:09 coulsptr

Same here. It is taking more than 10 mins in MacBook Air M1.

haresh4d avatar Sep 22 '25 13:09 haresh4d

Still same issue , not resolved

shijoavb avatar Sep 23 '25 05:09 shijoavb

Also under node_modules, react-native-reanimated takes almost 6GB of space and react-native-worklets takes 3 GB of Space. What's wrong with the library?

haresh4d avatar Sep 23 '25 06:09 haresh4d

Please fix this asap :react-native-reanimated:buildCMakeDebug[x86][reanimated] taking minimum 10 mins to build

SwikarBhattarai avatar Sep 25 '25 03:09 SwikarBhattarai

@piaskowyk This one is still an issue. In CI build time increased from 25+- minutes to 45+-minutes. GitHub actions's ubuntu-latest, [email protected], [email protected]. Without reanimated and worklets project build time drops back to 25+- minutes.

anion155 avatar Sep 25 '25 19:09 anion155

+1

zainzafar avatar Sep 26 '25 01:09 zainzafar

I have Debian 12, 8 GB of RAM, and four Intel® Core™ i3-3217U CPUs at 1.80 GHz.

If I run ./gradlew clean or remove node_modules and reinstall all the packages and compile again, it takes over an hour.

AlexCernik avatar Sep 27 '25 15:09 AlexCernik

Any solution for this?

macielhubsoft avatar Oct 01 '25 17:10 macielhubsoft

+1

OS: Ubuntu 24.04.3 LTS x86_64 CPU: 11th Gen Intel i5-1135G7 (8) @ 4.200GHz Memory: 24 GB

skanderhk avatar Oct 06 '25 10:10 skanderhk

Still same issue , not resolved

UmarbekSaidov avatar Oct 07 '25 07:10 UmarbekSaidov

🐢 Very long build time & huge node_modules size Hi team,

My build time exceeds 35 minutes, and the project often freezes during build. After install, the packages take a huge amount of space inside node_modules: react-native-reanimated → ~10 GB react-native-worklets → ~5 GB

Environment: MacBook Pro M1 Pro (16 GB RAM / 1 TB SSD) "react-native-reanimated": "^4.1.2" "react-native-worklets": "^0.6.0" "react-native": "0.79.5", "0.81.1", "0.81.4"

Looks like the .cxx and build folders are getting huge. Is there a recommended cleanup or fix to reduce build artifacts and improve build time?

Thanks!

Image Image

UmarbekSaidov avatar Oct 07 '25 07:10 UmarbekSaidov

+1 even after 4.1.1 where the fix from above was added..

Alex7734 avatar Oct 22 '25 15:10 Alex7734

@MatiPl01 we have the same issue with the version 3.19.3. Is It possible to cherry pick the fix of this issue on this version? https://github.com/software-mansion/react-native-reanimated/pull/8272/files We have enabled the new architecture but we need to maintain both. Thx

alessioemireni avatar Oct 24 '25 09:10 alessioemireni

Hey @alessioemireni! This fix was mostly related to the v4 changes only and the code that was optimized doesn't exit in v3. If Reanimated 3.19.3 is taking too much time to build, we'd have to look for a different build time optimization.

MatiPl01 avatar Oct 24 '25 14:10 MatiPl01

Hey @alessioemireni! This fix was mostly related to the v4 changes only and the code that was optimized doesn't exit in v3. If Reanimated 3.19.3 is taking too much time to build, we'd have to look for a different build time optimization.

thx for your response. As said before we need the dual architecture support but it takes a lot of time to build on CI and locally. Could you please take a look? thx

alessioemireni avatar Oct 24 '25 14:10 alessioemireni

@alessioemireni I will discuss about this topic during the next week's meeting with a team. We will see if we can improve it somehow. I didn't see many people complaining that about the build time and the bundle size on reanimated v3 before, only v4 was problematic, but if v3 also have this problem, then I think we should take a look at this.

MatiPl01 avatar Oct 24 '25 14:10 MatiPl01

@alessioemireni I will discuss about this topic during the next week's meeting with a team. We will see if we can improve it somehow. I didn't see many people complaining that about the build time and the bundle size on reanimated v3 before, only v4 was problematic, but if v3 also have this problem, then I think we should take a look at this.

Awesome :) thx

Just some background. We have migrated the app from rn v0.78 to v0.81 with the old arch. Now we have enabled the new arch and we encounter this issue. If you need more infos let me know

alessioemireni avatar Oct 24 '25 15:10 alessioemireni

In our case, we started using v4 on the new arch with RN v0.81... v3 worked well for us (we were mainly on 0.76). Thanks for re-opening the issue and do let me know if I can provide any more insights.

There was a very slight improvement after removing the dynamic C++ templating imports ( so the upgrade to X.X.1 ) but not a huge one let's say :)

Alex7734 avatar Oct 25 '25 16:10 Alex7734

this is a blocker for us as well. Just moved to new arch with 0.82 and v4 and takes more than 25 mins+ on CI (that's the timeout limit we have added so it will go longer than that).

prabhav-mehra avatar Oct 26 '25 23:10 prabhav-mehra

Hey everyone! A quick update after the meeting. We’re all aware of the build time and package size issue, and we're planning to investigate it further. For now, we don’t yet know the exact cause, so I can’t provide a quick fix at this point. Hopefully, we’ll be able to improve both build time and bundle size soon.

If you encounter this issue, please let us know which version of Reanimated you’re using, which platform takes the most time to build (it’s usually Android), and which architectures you’re targeting (armeabi-v7a, x86, arm64-v8a, x86_64, etc.). The more details you provide, the easier it will be for us to understand when and why the issue occurs.

We’re also planning to test build times on older MacBooks (with M1 or Intel chips), since the builds on our M4/M3 Pro Macs are currently very fast.

MatiPl01 avatar Oct 27 '25 14:10 MatiPl01