Skip to content

Custom C/C++ failed with more errors in: autolinking.cpp and react-native-safe-area-context #47904

@ObscurusGrassator

Description

@ObscurusGrassator

Description

In old architecture (v.:0.74.2) this work ok.

In new architecture I (by instruction of #47352 (comment)) add include(${REACT_ANDROID_DIR}/cmake-utils/ReactNative-application.cmake) line to CMakeLists.txt

Steps to reproduce

  1. npx @react-native-community/cli@latest init Demo --install-pods false
  2. Adding steps from: https://github.com/ObscurusGrassator/openWakeWord-cpp/blob/AndroidImplementation
    Path to CMakeLists.txt: JJAssistant / android / app / src / main / срр / openWakeWord-cpp / src / android / CMakeLists.txt
  3. add include(${REACT_ANDROID_DIR}/cmake-utils/ReactNative-application.cmake) line to CMakeLists.txt
  4. react-native start --reset-cache --verbose

android/build.gradle

buildscript {
    ext {
        buildToolsVersion = "35.0.0"
        compileSdkVersion = 35
        targetSdkVersion = 34
        minSdkVersion = 27
        ndkVersion = "26.1.10909125"

package.json

"dependencies": {
    "@react-native-voice/voice": "github:react-native-voice/voice#pull/526/head",
    "react-native-fs": "^2.20.0",
    "react-native-reanimated": "^3.16.7",
    "react-native-safe-area-context": "^5.1.0",
    "react-native-tts": "^4.1.1"

React Native Version

0.76.6

Affected Platforms

Runtime - Android, Build - MacOS

Areas

Bridgeless - The New Initialization Flow

Output of npx react-native info

info Fetching system and libraries information...
System:
  OS: macOS 14.7
  CPU: (12) arm64 Apple M2 Max
  Memory: 112.00 MB / 32.00 GB
  Shell:
    version: "5.9"
    path: /bin/zsh
Binaries:
  Node:
    version: 20.17.0
    path: ~/.nvm/versions/node/v20.17.0/bin/node
  Yarn:
    version: 1.22.19
    path: /opt/homebrew/bin/yarn
  npm:
    version: 10.8.2
    path: ~/.nvm/versions/node/v20.17.0/bin/npm
  Watchman: Not Found
Managers:
  CocoaPods:
    version: 1.16.2
    path: /opt/homebrew/bin/pod
SDKs:
  iOS SDK:
    Platforms:
      - DriverKit 23.2
      - iOS 17.2
      - macOS 14.2
      - tvOS 17.2
      - visionOS 1.0
      - watchOS 10.2
  Android SDK:
    API Levels:
      - "34"
      - "35"
    Build Tools:
      - 34.0.0
      - 35.0.0
    System Images:
      - android-34 | AOSP ATD ARM 64 v8a
      - android-34 | ARM 64 v8a
      - android-34 | Google APIs ARM 64 v8a
      - android-34 | Google Play ARM 64 v8a
      - android-35 | AOSP ATD ARM 64
      - android-35 | ARM 64 v8a
      - android-35 | Google APIs ARM 64 v8a
      - android-35 | Google Play ARM 64 v8a
      - android-35 | Pre-Release 16 KB Page Size Google Play ARM 64 v8a
      - android-35 | Pre-Release 16 KB Page Size Google APIs ARM 64 v8a
      - android-35 | Google APIs ATD ARM 64
    Android NDK: Not Found
IDEs:
  Android Studio: 2023.1 AI-231.9392.1.2311.11330709
  Xcode:
    version: 15.2/15C500b
    path: /usr/bin/xcodebuild
Languages:
  Java:
    version: 17.0.6
    path: /usr/bin/javac
  Ruby:
    version: 2.7.8
    path: /opt/homebrew/opt/[email protected]/bin/ruby
npmPackages:
  "@react-native-community/cli":
    installed: 15.0.1
    wanted: 15.0.1
  react:
    installed: 18.3.1
    wanted: 18.3.1
  react-native:
    installed: 0.76.6
    wanted: 0.76.6
  react-native-macos: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: true
  newArchEnabled: true
iOS:
  hermesEnabled: Not found
  newArchEnabled: false

/android/app/build.gradle:

...
android {
    ndkVersion rootProject.ext.ndkVersion
    buildToolsVersion rootProject.ext.buildToolsVersion
    compileSdk rootProject.ext.compileSdkVersion

    defaultConfig {
        applicationId "com.jjassistant"
        minSdkVersion rootProject.ext.minSdkVersion
        targetSdkVersion rootProject.ext.targetSdkVersion
        ....
        ndk {
            ldLibs "log"
        }
        externalNativeBuild {
            cmake {
                arguments "-DANDROID_ARM_NEON=TRUE", "-DANDROID_TOOLCHAIN=clang"
                cFlags "-D__STDC_FORMAT_MACROS"
                cppFlags "-fexceptions", "-frtti" //, "-std=c++17"
            }
        }
    }
    externalNativeBuild {
        cmake {
            path "src/main/cpp/openWakeWord-cpp/src/android/CMakeLists.txt"
        }
    }
...

Stacktrace or Logs

> Task :app:buildCMakeDebug[arm64-v8a]
C/C++: ninja: Entering directory `/Users/xxx/xXx/Projekty/php/Projekty/MIKI4/JJAssistantNew/android/app/.cxx/Debug/1u1j4l13/arm64-v8a'
C/C++: /Applications/Android/sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang++ --target=aarch64-none-linux-android27 --sysroot=/Applications/Android/sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/darwin-x86_64/sysroot -Dappmodules_EXPORTS -I/Users/xxx/xXx/Projekty/php/Projekty/MIKI4/JJAssistantNew/android/app/src/main/cpp/openWakeWord-cpp/src/android -I/Users/xxx/xXx/Projekty/php/Projekty/MIKI4/JJAssistantNew/android/app/build/generated/autolinking/src/main/jni -I/Users/xxx/xXx/Projekty/php/Projekty/MIKI4/JJAssistantNew/node_modules/react-native-safe-area-context/android/src/main/jni -I/Users/xxx/xXx/Projekty/php/Projekty/MIKI4/JJAssistantNew/node_modules/@react-native-voice/voice/android/build/generated/source/codegen/jni/. -I/Users/xxx/xXx/Projekty/php/Projekty/MIKI4/JJAssistantNew/node_modules/@react-native-voice/voice/android/build/generated/source/codegen/jni/react/renderer/components/RNVoiceSpec -I/Users/xxx/xXx/Projekty/php/Projekty/MIKI4/JJAssistantNew/node_modules/react-native-gesture-handler/android/build/generated/source/codegen/jni/. -I/Users/xxx/xXx/Projekty/php/Projekty/MIKI4/JJAssistantNew/node_modules/react-native-gesture-handler/android/build/generated/source/codegen/jni/react/renderer/components/rngesturehandler_codegen -I/Users/xxx/xXx/Projekty/php/Projekty/MIKI4/JJAssistantNew/node_modules/react-native-safe-area-context/android/src/main/jni/. -I/Users/xxx/xXx/Projekty/php/Projekty/MIKI4/JJAssistantNew/node_modules/react-native-safe-area-context/android/src/main/jni/../../../../common/cpp -I/Users/xxx/xXx/Projekty/php/Projekty/MIKI4/JJAssistantNew/node_modules/react-native-safe-area-context/android/src/main/jni/../../../build/generated/source/codegen/jni -I/Users/xxx/xXx/Projekty/php/Projekty/MIKI4/JJAssistantNew/node_modules/react-native-safe-area-context/android/src/main/jni/../../../build/generated/source/codegen/jni/react/renderer/components/safeareacontext -isystem /Users/xxx/.gradle/caches/8.10.2/transforms/d20433b03c0f4da322d6720ef2bf4033/transformed/fbjni-0.6.0/prefab/modules/fbjni/include -isystem /Users/xxx/.gradle/caches/8.10.2/transforms/a1a2c121c336466851bd5ac9e4e8d65b/transformed/react-android-0.76.6-debug/prefab/modules/jsi/include -isystem /Users/xxx/.gradle/caches/8.10.2/transforms/a1a2c121c336466851bd5ac9e4e8d65b/transformed/react-android-0.76.6-debug/prefab/modules/reactnative/include -g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security  -fexceptions -frtti -Wall -Wextra -fno-limit-debug-info  -fPIC -Wall -Werror -Wno-error=cpp -fexceptions -frtti -std=c++20 -DLOG_TAG=\"ReactNative\" -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 -MD -MT CMakeFiles/appmodules.dir/Users/xxx/xXx/Projekty/php/Projekty/MIKI4/JJAssistantNew/android/app/build/generated/autolinking/src/main/jni/autolinking.cpp.o -MF CMakeFiles/appmodules.dir/Users/xxx/xXx/Projekty/php/Projekty/MIKI4/JJAssistantNew/android/app/build/generated/autolinking/src/main/jni/autolinking.cpp.o.d -o CMakeFiles/appmodules.dir/Users/xxx/xXx/Projekty/php/Projekty/MIKI4/JJAssistantNew/android/app/build/generated/autolinking/src/main/jni/autolinking.cpp.o -c /Users/xxx/xXx/Projekty/php/Projekty/MIKI4/JJAssistantNew/android/app/build/generated/autolinking/src/main/jni/autolinking.cpp
C/C++: In file included from /Users/xxx/xXx/Projekty/php/Projekty/MIKI4/JJAssistantNew/android/app/build/generated/autolinking/src/main/jni/autolinking.cpp:12:
C/C++: In file included from /Users/xxx/xXx/Projekty/php/Projekty/MIKI4/JJAssistantNew/node_modules/react-native-gesture-handler/android/build/generated/source/codegen/jni/./react/renderer/components/rngesturehandler_codegen/ComponentDescriptors.h:13:
C/C++: In file included from /Users/xxx/xXx/Projekty/php/Projekty/MIKI4/JJAssistantNew/node_modules/react-native-gesture-handler/android/build/generated/source/codegen/jni/./react/renderer/components/rngesturehandler_codegen/ShadowNodes.h:15:
C/C++: /Users/xxx/xXx/Projekty/php/Projekty/MIKI4/JJAssistantNew/node_modules/react-native-gesture-handler/android/build/generated/source/codegen/jni/./react/renderer/components/rngesturehandler_codegen/States.h:22:66: error: unused parameter 'previousState' [-Werror,-Wunused-parameter]
C/C++:   RNGestureHandlerButtonState(RNGestureHandlerButtonState const &previousState, folly::dynamic data){};
C/C++:                                                                  ^
C/C++: /Users/xxx/xXx/Projekty/php/Projekty/MIKI4/JJAssistantNew/node_modules/react-native-gesture-handler/android/build/generated/source/codegen/jni/./react/renderer/components/rngesturehandler_codegen/States.h:22:96: error: unused parameter 'data' [-Werror,-Wunused-parameter]
C/C++:   RNGestureHandlerButtonState(RNGestureHandlerButtonState const &previousState, folly::dynamic data){};
C/C++:                                                                                                ^
C/C++: /Users/xxx/xXx/Projekty/php/Projekty/MIKI4/JJAssistantNew/node_modules/react-native-gesture-handler/android/build/generated/source/codegen/jni/./react/renderer/components/rngesturehandler_codegen/States.h:34:70: error: unused parameter 'previousState' [-Werror,-Wunused-parameter]
C/C++:   RNGestureHandlerRootViewState(RNGestureHandlerRootViewState const &previousState, folly::dynamic data){};
C/C++:                                                                      ^
C/C++: /Users/xxx/xXx/Projekty/php/Projekty/MIKI4/JJAssistantNew/node_modules/react-native-gesture-handler/android/build/generated/source/codegen/jni/./react/renderer/components/rngesturehandler_codegen/States.h:34:100: error: unused parameter 'data' [-Werror,-Wunused-parameter]
C/C++:   RNGestureHandlerRootViewState(RNGestureHandlerRootViewState const &previousState, folly::dynamic data){};
C/C++:                                                                                                    ^
C/C++: In file included from /Users/xxx/xXx/Projekty/php/Projekty/MIKI4/JJAssistantNew/android/app/build/generated/autolinking/src/main/jni/autolinking.cpp:13:
C/C++: In file included from /Users/xxx/xXx/Projekty/php/Projekty/MIKI4/JJAssistantNew/node_modules/react-native-safe-area-context/android/src/main/jni/safeareacontext.h:6:
C/C++: In file included from /Users/xxx/xXx/Projekty/php/Projekty/MIKI4/JJAssistantNew/node_modules/react-native-safe-area-context/android/src/main/jni/../../../../common/cpp/react/renderer/components/safeareacontext/RNCSafeAreaViewComponentDescriptor.h:3:
C/C++: In file included from /Users/xxx/xXx/Projekty/php/Projekty/MIKI4/JJAssistantNew/node_modules/react-native-safe-area-context/android/src/main/jni/../../../../common/cpp/react/renderer/components/safeareacontext/RNCSafeAreaViewShadowNode.h:5:
C/C++: /Users/xxx/xXx/Projekty/php/Projekty/MIKI4/JJAssistantNew/node_modules/react-native-safe-area-context/android/src/main/jni/../../../build/generated/source/codegen/jni/react/renderer/components/safeareacontext/Props.h:30:59: error: unused parameter 'context' [-Werror,-Wunused-parameter]
C/C++: static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, RNCSafeAreaViewMode &result) {
C/C++:                                                           ^
C/C++: /Users/xxx/xXx/Projekty/php/Projekty/MIKI4/JJAssistantNew/node_modules/react-native-safe-area-context/android/src/main/jni/../../../build/generated/source/codegen/jni/react/renderer/components/safeareacontext/Props.h:71:70: error: unused parameter 'value' [-Werror,-Wunused-parameter]
C/C++: static inline std::string toString(const RNCSafeAreaViewEdgesStruct &value) {
C/C++:                                                                      ^
C/C++: In file included from /Users/xxx/xXx/Projekty/php/Projekty/MIKI4/JJAssistantNew/android/app/build/generated/autolinking/src/main/jni/autolinking.cpp:13:
C/C++: In file included from /Users/xxx/xXx/Projekty/php/Projekty/MIKI4/JJAssistantNew/node_modules/react-native-safe-area-context/android/src/main/jni/safeareacontext.h:6:
C/C++: In file included from /Users/xxx/xXx/Projekty/php/Projekty/MIKI4/JJAssistantNew/node_modules/react-native-safe-area-context/android/src/main/jni/../../../../common/cpp/react/renderer/components/safeareacontext/RNCSafeAreaViewComponentDescriptor.h:3:
C/C++: In file included from /Users/xxx/xXx/Projekty/php/Projekty/MIKI4/JJAssistantNew/node_modules/react-native-safe-area-context/android/src/main/jni/../../../../common/cpp/react/renderer/components/safeareacontext/RNCSafeAreaViewShadowNode.h:6:
C/C++: /Users/xxx/xXx/Projekty/php/Projekty/MIKI4/JJAssistantNew/node_modules/react-native-safe-area-context/android/src/main/jni/../../../../common/cpp/react/renderer/components/safeareacontext/RNCSafeAreaViewState.h:39:35: error: unused parameter 'previousState' [-Werror,-Wunused-parameter]
C/C++:       RNCSafeAreaViewState const &previousState,
C/C++:                                   ^
C/C++: In file included from /Users/xxx/xXx/Projekty/php/Projekty/MIKI4/JJAssistantNew/android/app/build/generated/autolinking/src/main/jni/autolinking.cpp:14:
C/C++: In file included from /Users/xxx/xXx/Projekty/php/Projekty/MIKI4/JJAssistantNew/node_modules/react-native-safe-area-context/android/src/main/jni/../../../build/generated/source/codegen/jni/react/renderer/components/safeareacontext/ComponentDescriptors.h:13:
C/C++: In file included from /Users/xxx/xXx/Projekty/php/Projekty/MIKI4/JJAssistantNew/node_modules/react-native-safe-area-context/android/src/main/jni/../../../build/generated/source/codegen/jni/react/renderer/components/safeareacontext/ShadowNodes.h:15:
C/C++: /Users/xxx/xXx/Projekty/php/Projekty/MIKI4/JJAssistantNew/node_modules/react-native-safe-area-context/android/src/main/jni/../../../build/generated/source/codegen/jni/react/renderer/components/safeareacontext/States.h:22:60: error: unused parameter 'previousState' [-Werror,-Wunused-parameter]
C/C++:   RNCSafeAreaProviderState(RNCSafeAreaProviderState const &previousState, folly::dynamic data){};
C/C++:                                                            ^
C/C++: /Users/xxx/xXx/Projekty/php/Projekty/MIKI4/JJAssistantNew/node_modules/react-native-safe-area-context/android/src/main/jni/../../../build/generated/source/codegen/jni/react/renderer/components/safeareacontext/States.h:22:90: error: unused parameter 'data' [-Werror,-Wunused-parameter]
C/C++:   RNCSafeAreaProviderState(RNCSafeAreaProviderState const &previousState, folly::dynamic data){};
C/C++:                                                                                          ^
C/C++: /Users/xxx/xXx/Projekty/php/Projekty/MIKI4/JJAssistantNew/android/app/build/generated/autolinking/src/main/jni/autolinking.cpp:35:78: error: unused parameter 'moduleName' [-Werror,-Wunused-parameter]
C/C++: std::shared_ptr<TurboModule> autolinking_cxxModuleProvider(const std::string moduleName, const std::shared_ptr<CallInvoker>& jsInvoker) {
C/C++:                                                                              ^
C/C++: /Users/xxx/xXx/Projekty/php/Projekty/MIKI4/JJAssistantNew/android/app/build/generated/autolinking/src/main/jni/autolinking.cpp:35:126: error: unused parameter 'jsInvoker' [-Werror,-Wunused-parameter]
C/C++: std::shared_ptr<TurboModule> autolinking_cxxModuleProvider(const std::string moduleName, const std::shared_ptr<CallInvoker>& jsInvoker) {
C/C++:                                                                                                                              ^
C/C++: 11 errors generated.

> Task :app:buildCMakeDebug[arm64-v8a] FAILED

> Task :react-native-gesture-handler:compileDebugKotlin
w: file:///Users/xxx/xXx/Projekty/php/Projekty/MIKI4/JJAssistantNew/node_modules/react-native-gesture-handler/android/src/main/java/com/swmansion/gesturehandler/core/FlingGestureHandler.kt:25:26 Parameter 'event' is never used
w: file:///Users/xxx/xXx/Projekty/php/Projekty/MIKI4/JJAssistantNew/node_modules/react-native-gesture-handler/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerButtonViewManager.kt:74:62 The corresponding parameter in the supertype 'ViewGroupManager' is named 'borderRadius'. This may cause problems when calling this function with named arguments.
w: file:///Users/xxx/xXx/Projekty/php/Projekty/MIKI4/JJAssistantNew/node_modules/react-native-gesture-handler/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerButtonViewManager.kt:79:63 The corresponding parameter in the supertype 'ViewGroupManager' is named 'borderRadius'. This may cause problems when calling this function with named arguments.
w: file:///Users/xxx/xXx/Projekty/php/Projekty/MIKI4/JJAssistantNew/node_modules/react-native-gesture-handler/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerButtonViewManager.kt:84:65 The corresponding parameter in the supertype 'ViewGroupManager' is named 'borderRadius'. This may cause problems when calling this function with named arguments.
w: file:///Users/xxx/xXx/Projekty/php/Projekty/MIKI4/JJAssistantNew/node_modules/react-native-gesture-handler/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerButtonViewManager.kt:89:66 The corresponding parameter in the supertype 'ViewGroupManager' is named 'borderRadius'. This may cause problems when calling this function with named arguments.

Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

For more on this, please refer to https://docs.gradle.org/8.10.2/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation.
184 actionable tasks: 29 executed, 155 up-to-date

info 💡 Tip: Make sure that you have set up your development environment correctly, by running npx react-native doctor. To read more about doctor command visit: https://github.com/react-native-community/cli/blob/main/packages/cli-doctor/README.md#doctor 


FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:buildCMakeDebug[arm64-v8a]'.
> com.android.ide.common.process.ProcessException: ninja: Entering directory `/Users/xxx/xXx/Projekty/php/Projekty/MIKI4/JJAssistantNew/android/app/.cxx/Debug/1u1j4l13/arm64-v8a'
  [0/2] Re-checking globbed directories...
  [1/2] Re-running CMake...
  -- Configuring done
  -- Generating done
  -- Build files have been written to: /Users/xxx/xXx/Projekty/php/Projekty/MIKI4/JJAssistantNew/android/app/.cxx/Debug/1u1j4l13/arm64-v8a
  [0/2] Re-checking globbed directories...
  [1/10] Building CXX object rngesturehandler_codegen_autolinked_build/CMakeFiles/react_codegen_rngesturehandler_codegen.dir/react/renderer/components/rngesturehandler_codegen/EventEmitters.cpp.o
  [2/10] Building CXX object rngesturehandler_codegen_autolinked_build/CMakeFiles/react_codegen_rngesturehandler_codegen.dir/react/renderer/components/rngesturehandler_codegen/States.cpp.o
  [3/10] Building CXX object rngesturehandler_codegen_autolinked_build/CMakeFiles/react_codegen_rngesturehandler_codegen.dir/react/renderer/components/rngesturehandler_codegen/ShadowNodes.cpp.o
  [4/10] Building CXX object rngesturehandler_codegen_autolinked_build/CMakeFiles/react_codegen_rngesturehandler_codegen.dir/rngesturehandler_codegen-generated.cpp.o
  [5/10] Building CXX object rngesturehandler_codegen_autolinked_build/CMakeFiles/react_codegen_rngesturehandler_codegen.dir/react/renderer/components/rngesturehandler_codegen/rngesturehandler_codegenJSI-generated.cpp.o
  [6/10] Building CXX object CMakeFiles/appmodules.dir/Users/xxx/xXx/Projekty/php/Projekty/MIKI4/JJAssistantNew/node_modules/react-native/ReactAndroid/cmake-utils/default-app-setup/OnLoad.cpp.o
  [7/10] Building CXX object rngesturehandler_codegen_autolinked_build/CMakeFiles/react_codegen_rngesturehandler_codegen.dir/react/renderer/components/rngesturehandler_codegen/ComponentDescriptors.cpp.o
  [8/10] Building CXX object CMakeFiles/appmodules.dir/Users/xxx/xXx/Projekty/php/Projekty/MIKI4/JJAssistantNew/android/app/build/generated/autolinking/src/main/jni/autolinking.cpp.o
  FAILED: CMakeFiles/appmodules.dir/Users/xxx/xXx/Projekty/php/Projekty/MIKI4/JJAssistantNew/android/app/build/generated/autolinking/src/main/jni/autolinking.cpp.o 
  /Applications/Android/sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang++ --target=aarch64-none-linux-android27 --sysroot=/Applications/Android/sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/darwin-x86_64/sysroot -Dappmodules_EXPORTS -I/Users/xxx/xXx/Projekty/php/Projekty/MIKI4/JJAssistantNew/android/app/src/main/cpp/openWakeWord-cpp/src/android -I/Users/xxx/xXx/Projekty/php/Projekty/MIKI4/JJAssistantNew/android/app/build/generated/autolinking/src/main/jni -I/Users/xxx/xXx/Projekty/php/Projekty/MIKI4/JJAssistantNew/node_modules/react-native-safe-area-context/android/src/main/jni -I/Users/xxx/xXx/Projekty/php/Projekty/MIKI4/JJAssistantNew/node_modules/@react-native-voice/voice/android/build/generated/source/codegen/jni/. -I/Users/xxx/xXx/Projekty/php/Projekty/MIKI4/JJAssistantNew/node_modules/@react-native-voice/voice/android/build/generated/source/codegen/jni/react/renderer/components/RNVoiceSpec -I/Users/xxx/xXx/Projekty/php/Projekty/MIKI4/JJAssistantNew/node_modules/react-native-gesture-handler/android/build/generated/source/codegen/jni/. -I/Users/xxx/xXx/Projekty/php/Projekty/MIKI4/JJAssistantNew/node_modules/react-native-gesture-handler/android/build/generated/source/codegen/jni/react/renderer/components/rngesturehandler_codegen -I/Users/xxx/xXx/Projekty/php/Projekty/MIKI4/JJAssistantNew/node_modules/react-native-safe-area-context/android/src/main/jni/. -I/Users/xxx/xXx/Projekty/php/Projekty/MIKI4/JJAssistantNew/node_modules/react-native-safe-area-context/android/src/main/jni/../../../../common/cpp -I/Users/xxx/xXx/Projekty/php/Projekty/MIKI4/JJAssistantNew/node_modules/react-native-safe-area-context/android/src/main/jni/../../../build/generated/source/codegen/jni -I/Users/xxx/xXx/Projekty/php/Projekty/MIKI4/JJAssistantNew/node_modules/react-native-safe-area-context/android/src/main/jni/../../../build/generated/source/codegen/jni/react/renderer/components/safeareacontext -isystem /Users/xxx/.gradle/caches/8.10.2/transforms/d20433b03c0f4da322d6720ef2bf4033/transformed/fbjni-0.6.0/prefab/modules/fbjni/include -isystem /Users/xxx/.gradle/caches/8.10.2/transforms/a1a2c121c336466851bd5ac9e4e8d65b/transformed/react-android-0.76.6-debug/prefab/modules/jsi/include -isystem /Users/xxx/.gradle/caches/8.10.2/transforms/a1a2c121c336466851bd5ac9e4e8d65b/transformed/react-android-0.76.6-debug/prefab/modules/reactnative/include -g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security  -fexceptions -frtti -Wall -Wextra -fno-limit-debug-info  -fPIC -Wall -Werror -Wno-error=cpp -fexceptions -frtti -std=c++20 -DLOG_TAG=\"ReactNative\" -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 -MD -MT CMakeFiles/appmodules.dir/Users/xxx/xXx/Projekty/php/Projekty/MIKI4/JJAssistantNew/android/app/build/generated/autolinking/src/main/jni/autolinking.cpp.o -MF CMakeFiles/appmodules.dir/Users/xxx/xXx/Projekty/php/Projekty/MIKI4/JJAssistantNew/android/app/build/generated/autolinking/src/main/jni/autolinking.cpp.o.d -o CMakeFiles/appmodules.dir/Users/xxx/xXx/Projekty/php/Projekty/MIKI4/JJAssistantNew/android/app/build/generated/autolinking/src/main/jni/autolinking.cpp.o -c /Users/xxx/xXx/Projekty/php/Projekty/MIKI4/JJAssistantNew/android/app/build/generated/autolinking/src/main/jni/autolinking.cpp
  In file included from /Users/xxx/xXx/Projekty/php/Projekty/MIKI4/JJAssistantNew/android/app/build/generated/autolinking/src/main/jni/autolinking.cpp:12:
  In file included from /Users/xxx/xXx/Projekty/php/Projekty/MIKI4/JJAssistantNew/node_modules/react-native-gesture-handler/android/build/generated/source/codegen/jni/./react/renderer/components/rngesturehandler_codegen/ComponentDescriptors.h:13:
  In file included from /Users/xxx/xXx/Projekty/php/Projekty/MIKI4/JJAssistantNew/node_modules/react-native-gesture-handler/android/build/generated/source/codegen/jni/./react/renderer/components/rngesturehandler_codegen/ShadowNodes.h:15:
  /Users/xxx/xXx/Projekty/php/Projekty/MIKI4/JJAssistantNew/node_modules/react-native-gesture-handler/android/build/generated/source/codegen/jni/./react/renderer/components/rngesturehandler_codegen/States.h:22:66: error: unused parameter 'previousState' [-Werror,-Wunused-parameter]
    RNGestureHandlerButtonState(RNGestureHandlerButtonState const &previousState, folly::dynamic data){};
                                                                   ^
  /Users/xxx/xXx/Projekty/php/Projekty/MIKI4/JJAssistantNew/node_modules/react-native-gesture-handler/android/build/generated/source/codegen/jni/./react/renderer/components/rngesturehandler_codegen/States.h:22:96: error: unused parameter 'data' [-Werror,-Wunused-parameter]
    RNGestureHandlerButtonState(RNGestureHandlerButtonState const &previousState, folly::dynamic data){};
                                                                                                 ^
  /Users/xxx/xXx/Projekty/php/Projekty/MIKI4/JJAssistantNew/node_modules/react-native-gesture-handler/android/build/generated/source/codegen/jni/./react/renderer/components/rngesturehandler_codegen/States.h:34:70: error: unused parameter 'previousState' [-Werror,-Wunused-parameter]
    RNGestureHandlerRootViewState(RNGestureHandlerRootViewState const &previousState, folly::dynamic data){};
                                                                       ^
  /Users/xxx/xXx/Projekty/php/Projekty/MIKI4/JJAssistantNew/node_modules/react-native-gesture-handler/android/build/generated/source/codegen/jni/./react/renderer/components/rngesturehandler_codegen/States.h:34:100: error: unused parameter 'data' [-Werror,-Wunused-parameter]
    RNGestureHandlerRootViewState(RNGestureHandlerRootViewState const &previousState, folly::dynamic data){};
                                                                                                     ^
  In file included from /Users/xxx/xXx/Projekty/php/Projekty/MIKI4/JJAssistantNew/android/app/build/generated/autolinking/src/main/jni/autolinking.cpp:13:
  In file included from /Users/xxx/xXx/Projekty/php/Projekty/MIKI4/JJAssistantNew/node_modules/react-native-safe-area-context/android/src/main/jni/safeareacontext.h:6:
  In file included from /Users/xxx/xXx/Projekty/php/Projekty/MIKI4/JJAssistantNew/node_modules/react-native-safe-area-context/android/src/main/jni/../../../../common/cpp/react/renderer/components/safeareacontext/RNCSafeAreaViewComponentDescriptor.h:3:
  In file included from /Users/xxx/xXx/Projekty/php/Projekty/MIKI4/JJAssistantNew/node_modules/react-native-safe-area-context/android/src/main/jni/../../../../common/cpp/react/renderer/components/safeareacontext/RNCSafeAreaViewShadowNode.h:5:
  /Users/xxx/xXx/Projekty/php/Projekty/MIKI4/JJAssistantNew/node_modules/react-native-safe-area-context/android/src/main/jni/../../../build/generated/source/codegen/jni/react/renderer/components/safeareacontext/Props.h:30:59: error: unused parameter 'context' [-Werror,-Wunused-parameter]
  static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, RNCSafeAreaViewMode &result) {
                                                            ^
  /Users/xxx/xXx/Projekty/php/Projekty/MIKI4/JJAssistantNew/node_modules/react-native-safe-area-context/android/src/main/jni/../../../build/generated/source/codegen/jni/react/renderer/components/safeareacontext/Props.h:71:70: error: unused parameter 'value' [-Werror,-Wunused-parameter]
  static inline std::string toString(const RNCSafeAreaViewEdgesStruct &value) {
                                                                       ^
  In file included from /Users/xxx/xXx/Projekty/php/Projekty/MIKI4/JJAssistantNew/android/app/build/generated/autolinking/src/main/jni/autolinking.cpp:13:
  In file included from /Users/xxx/xXx/Projekty/php/Projekty/MIKI4/JJAssistantNew/node_modules/react-native-safe-area-context/android/src/main/jni/safeareacontext.h:6:
  In file included from /Users/xxx/xXx/Projekty/php/Projekty/MIKI4/JJAssistantNew/node_modules/react-native-safe-area-context/android/src/main/jni/../../../../common/cpp/react/renderer/components/safeareacontext/RNCSafeAreaViewComponentDescriptor.h:3:
  In file included from /Users/xxx/xXx/Projekty/php/Projekty/MIKI4/JJAssistantNew/node_modules/react-native-safe-area-context/android/src/main/jni/../../../../common/cpp/react/renderer/components/safeareacontext/RNCSafeAreaViewShadowNode.h:6:
  /Users/xxx/xXx/Projekty/php/Projekty/MIKI4/JJAssistantNew/node_modules/react-native-safe-area-context/android/src/main/jni/../../../../common/cpp/react/renderer/components/safeareacontext/RNCSafeAreaViewState.h:39:35: error: unused parameter 'previousState' [-Werror,-Wunused-parameter]
        RNCSafeAreaViewState const &previousState,
                                    ^
  In file included from /Users/xxx/xXx/Projekty/php/Projekty/MIKI4/JJAssistantNew/android/app/build/generated/autolinking/src/main/jni/autolinking.cpp:14:
  In file included from /Users/xxx/xXx/Projekty/php/Projekty/MIKI4/JJAssistantNew/node_modules/react-native-safe-area-context/android/src/main/jni/../../../build/generated/source/codegen/jni/react/renderer/components/safeareacontext/ComponentDescriptors.h:13:
  In file included from /Users/xxx/xXx/Projekty/php/Projekty/MIKI4/JJAssistantNew/node_modules/react-native-safe-area-context/android/src/main/jni/../../../build/generated/source/codegen/jni/react/renderer/components/safeareacontext/ShadowNodes.h:15:
  /Users/xxx/xXx/Projekty/php/Projekty/MIKI4/JJAssistantNew/node_modules/react-native-safe-area-context/android/src/main/jni/../../../build/generated/source/codegen/jni/react/renderer/components/safeareacontext/States.h:22:60: error: unused parameter 'previousState' [-Werror,-Wunused-parameter]
    RNCSafeAreaProviderState(RNCSafeAreaProviderState const &previousState, folly::dynamic data){};
                                                             ^
  /Users/xxx/xXx/Projekty/php/Projekty/MIKI4/JJAssistantNew/node_modules/react-native-safe-area-context/android/src/main/jni/../../../build/generated/source/codegen/jni/react/renderer/components/safeareacontext/States.h:22:90: error: unused parameter 'data' [-Werror,-Wunused-parameter]
    RNCSafeAreaProviderState(RNCSafeAreaProviderState const &previousState, folly::dynamic data){};
                                                                                           ^
  /Users/xxx/xXx/Projekty/php/Projekty/MIKI4/JJAssistantNew/android/app/build/generated/autolinking/src/main/jni/autolinking.cpp:35:78: error: unused parameter 'moduleName' [-Werror,-Wunused-parameter]
  std::shared_ptr<TurboModule> autolinking_cxxModuleProvider(const std::string moduleName, const std::shared_ptr<CallInvoker>& jsInvoker) {
                                                                               ^
  /Users/xxx/xXx/Projekty/php/Projekty/MIKI4/JJAssistantNew/android/app/build/generated/autolinking/src/main/jni/autolinking.cpp:35:126: error: unused parameter 'jsInvoker' [-Werror,-Wunused-parameter]
  std::shared_ptr<TurboModule> autolinking_cxxModuleProvider(const std::string moduleName, const std::shared_ptr<CallInvoker>& jsInvoker) {
                                                                                                                               ^
  11 errors generated.
  [9/10] Building CXX object rngesturehandler_codegen_autolinked_build/CMakeFiles/react_codegen_rngesturehandler_codegen.dir/react/renderer/components/rngesturehandler_codegen/Props.cpp.o
  ninja: build stopped: subcommand failed.
  
  C++ build system [build] failed while executing:
      /Applications/Android/sdk/cmake/3.22.1/bin/ninja \
        -C \
        /Users/xxx/xXx/Projekty/php/Projekty/MIKI4/JJAssistantNew/android/app/.cxx/Debug/1u1j4l13/arm64-v8a \
        appmodules \
        openWakeWord \
        react_codegen_safeareacontext
    from /Users/xxx/xXx/Projekty/php/Projekty/MIKI4/JJAssistantNew/android/app

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at https://help.gradle.org.

BUILD FAILED in 5s

Reproducer

https://github.com/ObscurusGrassator/reactNativeIssue47904

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type: New ArchitectureIssues and PRs related to new architecture (Fabric/Turbo Modules)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions