react-native-reanimated: [BUILD ERROR] C++ build system [build] failed while executing

Description

Cannot build release apk after i upgrade version from 3.10.1 to 3.13.0. The issue is not existing in 3.10.1

I get this error

/Users/bayram/Desktop/Sorsware/omuzreact/node_modules/react-native-reanimated/android/src/main/cpp/NativeProxy.cpp:250:9: error: must specify at least one argument for '...' parameter of variadic macro [-Werror,-Wgnu-zero-variadic-macro-arguments]
         makeNativeMethod("performOperations", NativeProxy::performOperations)
         ^
 /Users/bayram/.gradle/caches/transforms-3/cf752b49e9002612d7c057f80c5fa6c7/transformed/jetified-fbjni-0.3.0/prefab/modules/fbjni/include/fbjni/detail/Registration.h:97:85: note: expanded from macro 'makeNativeMethod'
 #define makeNativeMethod(...) FBJNI_MACRO_EXPAND(makeNativeMethodN(__VA_ARGS__, 3, 2)(__VA_ARGS__))
                                                                                     ^
 /Users/bayram/.gradle/caches/transforms-3/cf752b49e9002612d7c057f80c5fa6c7/transformed/jetified-fbjni-0.3.0/prefab/modules/fbjni/include/fbjni/detail/Registration.h:96:9: note: macro 'makeNativeMethodN' defined here
 #define makeNativeMethodN(a, b, c, count, ...) makeNativeMethod ## count
         ^
 8 errors generated.
 ninja: build stopped: subcommand failed.
 
 C++ build system [build] failed while executing:
     /Users/bayram/Library/Android/sdk/cmake/3.22.1/bin/ninja \
       -C \
       /Users/bayram/Desktop/Sorsware/omuzreact/node_modules/react-native-reanimated/android/.cxx/RelWithDebInfo/272h6813/arm64-v8a \
       reanimated
   from /Users/bayram/Desktop/Sorsware/omuzreact/node_modules/react-native-reanimated/android

Steps to reproduce

none

Snack or a link to a repository

https://github.com/Bayramito/reanimated-build-error)

Reanimated version

3.13.0

React Native version

0.72.14

Platforms

Android

JavaScript runtime

Hermes

Workflow

React Native

Architecture

Paper (Old Architecture)

Build type

Release app & production bundle

Device

None

Device model

No response

Acknowledgements

Yes

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Reactions: 5
  • Comments: 24 (13 by maintainers)

Commits related to this issue

Most upvoted comments

app/build.gradle

` android {

afterEvaluate {
    def file = file('../../node_modules/react-native-reanimated/android/CMakeLists.txt')
    if (!file.exists()) {
        println "[Fix-CMakeLists] File not found: ${file}"
        return
    }
    def content = file.text
    def Wpedantic = "-Wpedantic -Werror"
    if (content.contains(Wpedantic)) {
        def modifiedContent = content.replace(Wpedantic, "-Werror")
        file.withWriter('UTF-8') { writer ->
            writer.write(modifiedContent)
        }
        println "[Fix-CMakeLists] Modified ${file}"
    } else {
        println "[Fix-CMakeLists] No changes needed in ${file}"
    }
}

}`

Hey @Bayramito we would love some repro (a link to repo or expo snack) so that we could see the error ourselves or help you with the setup in case it was done wrongly

https://github.com/Bayramito/reanimated-build-error