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

Android NDK, Hermes and Gradle cache issues on Ubuntu, MacOS when building for android #13

Closed
fabOnReact opened this issue Mar 22, 2022 · 9 comments

Comments

@fabOnReact
Copy link
Owner

fabOnReact commented Mar 22, 2022

output from running build

after adding APP_ALLOW_MISSING_DEPS := true

Relevant Links

@fabOnReact
Copy link
Owner Author

fabOnReact commented Mar 24, 2022

output from yarn install-android-jsc

output from yarn install-android-jsc --stacktrace

yarn install-android-jsc --stacktrace second try

third try after deleting file init.gradle

image

image

image

image

image

files generates ReactAndroid/hermes-engine/.cxx

image

image

Commands executes after deleting gradle cache and build folders.

Relevant links:

@fabOnReact fabOnReact pinned this issue Mar 24, 2022
@fabOnReact
Copy link
Owner Author

fabOnReact commented Mar 24, 2022

wrong path error - that file does not exist in gradle/caches - issue with prefab

new react-native clone

git clone ...
yin && cd packages/rn-tester && yin && yarn install-android-jsc

image

full log

image

image

image

image

after updating to SDK 31 and ndk24

after install SDK 31 https://github.com/facebook/react-native/pull/33396/files#diff-b05c07809d909b212fb146f58bef66ffbf2b18d8ccfd2e5664788d5de883ccb8L90-R104
and updating ndk to 24

image

CMakeError.log
Checking whether the ASM compiler is GNU using "--version" did not match "(GNU assembler)|(GCC)|(Free Software Foundation)":
Android (7019983 based on r365631c3) clang version 9.0.9 (https://android.googlesource.com/toolchain/llvm-project a2a1e703c0edb03ba29944e529ccbf457742737b) (based on LLVM 9.0.9svn)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/bin

CMakeOutput.log

The target system is: Android - 1 - x86_64
The host system is: Linux - 5.4.0-104-generic - x86_64
Detecting C compiler ABI info compiled with the following output:
Change Dir: /home/fabrizio/Documents/sourcecode/opensource/react-native/ReactAndroid/.cxx/Debug/633s5i22/x86_64/CMakeFiles/CMakeTmp

Run Build Command(s):/home/fabrizio/Android/Sdk/cmake/3.18.1/bin/ninja cmTC_b54ba && [1/2] Building C object CMakeFiles/cmTC_b54ba.dir/CMakeCCompilerABI.c.o
Android (7019983 based on r365631c3) clang version 9.0.9 (https://android.googlesource.com/toolchain/llvm-project a2a1e703c0edb03ba29944e529ccbf457742737b) (based on LLVM 9.0.9svn)
Target: x86_64-none-linux-android21
Thread model: posix
InstalledDir: /home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/bin
Found candidate GCC installation: /home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/lib/gcc/i686-linux-android/4.9.x
Found candidate GCC installation: /home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/lib/gcc/x86_64-linux-android/4.9.x
Selected GCC installation: /home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/lib/gcc/x86_64-linux-android/4.9.x
Candidate multilib: .;@m64
Selected multilib: .;@m64
 "/home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/bin/clang" -cc1 -triple x86_64-none-linux-android21 -emit-obj -mrelax-all -mnoexecstack -disable-free -disable-llvm-verifier -discard-value-names -main-file-name CMakeCCompilerABI.c -mrelocation-model pic -pic-level 2 -pic-is-pie -mthread-model posix -mdisable-fp-elim -masm-verbose -mconstructor-aliases -munwind-tables -fuse-init-array -target-cpu x86-64 -target-feature +sse4.2 -target-feature +popcnt -target-feature +cx16 -dwarf-column-info -debug-info-kind=limited -dwarf-version=4 -debugger-tuning=gdb -v -ffunction-sections -fdata-sections -coverage-notes-file /home/fabrizio/Documents/sourcecode/opensource/react-native/ReactAndroid/.cxx/Debug/633s5i22/x86_64/CMakeFiles/CMakeTmp/CMakeFiles/cmTC_b54ba.dir/CMakeCCompilerABI.c.gcno -resource-dir /home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/lib64/clang/9.0.9 -dependency-file CMakeFiles/cmTC_b54ba.dir/CMakeCCompilerABI.c.o.d -sys-header-deps -MT CMakeFiles/cmTC_b54ba.dir/CMakeCCompilerABI.c.o -D ANDROID -D _FORTIFY_SOURCE=2 -isysroot /home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/sysroot -internal-isystem /home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/local/include -internal-isystem /home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/lib64/clang/9.0.9/include -internal-externc-isystem /home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/x86_64-linux-android -internal-externc-isystem /home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/sysroot/include -internal-externc-isystem /home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include -Wformat -fdebug-compilation-dir /home/fabrizio/Documents/sourcecode/opensource/react-native/ReactAndroid/.cxx/Debug/633s5i22/x86_64/CMakeFiles/CMakeTmp -ferror-limit 19 -fmessage-length 0 -stack-protector 2 -fobjc-runtime=gcc -fdiagnostics-show-option -o CMakeFiles/cmTC_b54ba.dir/CMakeCCompilerABI.c.o -x c /home/fabrizio/Android/Sdk/cmake/3.18.1/share/cmake-3.18/Modules/CMakeCCompilerABI.c
clang -cc1 version 9.0.9 based upon LLVM 9.0.9svn default target x86_64-unknown-linux-gnu
ignoring nonexistent directory "/home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/sysroot/include"
#include "..." search starts here:
#include <...> search starts here:
 /home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/local/include
 /home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/lib64/clang/9.0.9/include
 /home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/x86_64-linux-android
 /home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include
End of search list.
[2/2] Linking C executable cmTC_b54ba
Android (7019983 based on r365631c3) clang version 9.0.9 (https://android.googlesource.com/toolchain/llvm-project a2a1e703c0edb03ba29944e529ccbf457742737b) (based on LLVM 9.0.9svn)
Target: x86_64-none-linux-android21
Thread model: posix
InstalledDir: /home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/bin
Found candidate GCC installation: /home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/lib/gcc/i686-linux-android/4.9.x
Found candidate GCC installation: /home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/lib/gcc/x86_64-linux-android/4.9.x
Selected GCC installation: /home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/lib/gcc/x86_64-linux-android/4.9.x
Candidate multilib: .;@m64
Selected multilib: .;@m64
 "/home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/lib/gcc/x86_64-linux-android/4.9.x/../../../../x86_64-linux-android/bin/ld" --sysroot=/home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/sysroot -pie -z noexecstack --warn-shared-textrel -z now -z relro --hash-style=both --enable-new-dtags --eh-frame-hdr -m elf_x86_64 -dynamic-linker /system/bin/linker64 -o cmTC_b54ba /home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/x86_64-linux-android/21/crtbegin_dynamic.o -L/home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/lib64/clang/9.0.9/lib/linux/x86_64 -L/home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/lib/gcc/x86_64-linux-android/4.9.x -L/home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/lib/gcc/x86_64-linux-android/4.9.x/../../../../x86_64-linux-android/lib/../lib64 -L/home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/x86_64-linux-android/21 -L/home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/x86_64-linux-android -L/home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/lib/gcc/x86_64-linux-android/4.9.x/../../../../x86_64-linux-android/lib -L/home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib --exclude-libs libgcc.a --exclude-libs libgcc_real.a --exclude-libs libatomic.a --build-id --fatal-warnings --no-undefined --gc-sections CMakeFiles/cmTC_b54ba.dir/CMakeCCompilerABI.c.o -lgcc -ldl -lc -lgcc -ldl /home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/x86_64-linux-android/21/crtend_android.o



Parsed C implicit include dir info from above output: rv=done
  found start of include info
  found start of implicit include info
    add: [/home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/local/include]
    add: [/home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/lib64/clang/9.0.9/include]
    add: [/home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/x86_64-linux-android]
    add: [/home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include]
  end of search list found
  collapse include dir [/home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/local/include] ==> [/home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/local/include]
  collapse include dir [/home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/lib64/clang/9.0.9/include] ==> [/home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/lib64/clang/9.0.9/include]
  collapse include dir [/home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/x86_64-linux-android] ==> [/home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/x86_64-linux-android]
  collapse include dir [/home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include] ==> [/home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include]
  implicit include dirs: [/home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/local/include;/home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/lib64/clang/9.0.9/include;/home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/x86_64-linux-android;/home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include]


Parsed C implicit link information from above output:
  link line regex: [^( *|.*[/\])(x86_64-linux-android-ld|CMAKE_LINK_STARTFILE-NOTFOUND|([^/\]+-)?ld|collect2)[^/\]*( |$)]
  ignore line: [Change Dir: /home/fabrizio/Documents/sourcecode/opensource/react-native/ReactAndroid/.cxx/Debug/633s5i22/x86_64/CMakeFiles/CMakeTmp]
  ignore line: []
  ignore line: [Run Build Command(s):/home/fabrizio/Android/Sdk/cmake/3.18.1/bin/ninja cmTC_b54ba && [1/2] Building C object CMakeFiles/cmTC_b54ba.dir/CMakeCCompilerABI.c.o]
  ignore line: [Android (7019983 based on r365631c3) clang version 9.0.9 (https://android.googlesource.com/toolchain/llvm-project a2a1e703c0edb03ba29944e529ccbf457742737b) (based on LLVM 9.0.9svn)]
  ignore line: [Target: x86_64-none-linux-android21]
  ignore line: [Thread model: posix]
  ignore line: [InstalledDir: /home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/bin]
  ignore line: [Found candidate GCC installation: /home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/lib/gcc/i686-linux-android/4.9.x]
  ignore line: [Found candidate GCC installation: /home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/lib/gcc/x86_64-linux-android/4.9.x]
  ignore line: [Selected GCC installation: /home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/lib/gcc/x86_64-linux-android/4.9.x]
  ignore line: [Candidate multilib: .]
  ignore line: [@m64]
  ignore line: [Selected multilib: .]
  ignore line: [@m64]
  ignore line: [ "/home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/bin/clang" -cc1 -triple x86_64-none-linux-android21 -emit-obj -mrelax-all -mnoexecstack -disable-free -disable-llvm-verifier -discard-value-names -main-file-name CMakeCCompilerABI.c -mrelocation-model pic -pic-level 2 -pic-is-pie -mthread-model posix -mdisable-fp-elim -masm-verbose -mconstructor-aliases -munwind-tables -fuse-init-array -target-cpu x86-64 -target-feature +sse4.2 -target-feature +popcnt -target-feature +cx16 -dwarf-column-info -debug-info-kind=limited -dwarf-version=4 -debugger-tuning=gdb -v -ffunction-sections -fdata-sections -coverage-notes-file /home/fabrizio/Documents/sourcecode/opensource/react-native/ReactAndroid/.cxx/Debug/633s5i22/x86_64/CMakeFiles/CMakeTmp/CMakeFiles/cmTC_b54ba.dir/CMakeCCompilerABI.c.gcno -resource-dir /home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/lib64/clang/9.0.9 -dependency-file CMakeFiles/cmTC_b54ba.dir/CMakeCCompilerABI.c.o.d -sys-header-deps -MT CMakeFiles/cmTC_b54ba.dir/CMakeCCompilerABI.c.o -D ANDROID -D _FORTIFY_SOURCE=2 -isysroot /home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/sysroot -internal-isystem /home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/local/include -internal-isystem /home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/lib64/clang/9.0.9/include -internal-externc-isystem /home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/x86_64-linux-android -internal-externc-isystem /home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/sysroot/include -internal-externc-isystem /home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include -Wformat -fdebug-compilation-dir /home/fabrizio/Documents/sourcecode/opensource/react-native/ReactAndroid/.cxx/Debug/633s5i22/x86_64/CMakeFiles/CMakeTmp -ferror-limit 19 -fmessage-length 0 -stack-protector 2 -fobjc-runtime=gcc -fdiagnostics-show-option -o CMakeFiles/cmTC_b54ba.dir/CMakeCCompilerABI.c.o -x c /home/fabrizio/Android/Sdk/cmake/3.18.1/share/cmake-3.18/Modules/CMakeCCompilerABI.c]
  ignore line: [clang -cc1 version 9.0.9 based upon LLVM 9.0.9svn default target x86_64-unknown-linux-gnu]
  ignore line: [ignoring nonexistent directory "/home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/sysroot/include"]
  ignore line: [#include "..." search starts here:]
  ignore line: [#include <...> search starts here:]
  ignore line: [ /home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/local/include]
  ignore line: [ /home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/lib64/clang/9.0.9/include]
  ignore line: [ /home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/x86_64-linux-android]
  ignore line: [ /home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include]
  ignore line: [End of search list.]
  ignore line: [[2/2] Linking C executable cmTC_b54ba]
  ignore line: [Android (7019983 based on r365631c3) clang version 9.0.9 (https://android.googlesource.com/toolchain/llvm-project a2a1e703c0edb03ba29944e529ccbf457742737b) (based on LLVM 9.0.9svn)]
  ignore line: [Target: x86_64-none-linux-android21]
  ignore line: [Thread model: posix]
  ignore line: [InstalledDir: /home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/bin]
  ignore line: [Found candidate GCC installation: /home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/lib/gcc/i686-linux-android/4.9.x]
  ignore line: [Found candidate GCC installation: /home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/lib/gcc/x86_64-linux-android/4.9.x]
  ignore line: [Selected GCC installation: /home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/lib/gcc/x86_64-linux-android/4.9.x]
  ignore line: [Candidate multilib: .]
  ignore line: [@m64]
  ignore line: [Selected multilib: .]
  ignore line: [@m64]
  link line: [ "/home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/lib/gcc/x86_64-linux-android/4.9.x/../../../../x86_64-linux-android/bin/ld" --sysroot=/home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/sysroot -pie -z noexecstack --warn-shared-textrel -z now -z relro --hash-style=both --enable-new-dtags --eh-frame-hdr -m elf_x86_64 -dynamic-linker /system/bin/linker64 -o cmTC_b54ba /home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/x86_64-linux-android/21/crtbegin_dynamic.o -L/home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/lib64/clang/9.0.9/lib/linux/x86_64 -L/home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/lib/gcc/x86_64-linux-android/4.9.x -L/home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/lib/gcc/x86_64-linux-android/4.9.x/../../../../x86_64-linux-android/lib/../lib64 -L/home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/x86_64-linux-android/21 -L/home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/x86_64-linux-android -L/home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/lib/gcc/x86_64-linux-android/4.9.x/../../../../x86_64-linux-android/lib -L/home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib --exclude-libs libgcc.a --exclude-libs libgcc_real.a --exclude-libs libatomic.a --build-id --fatal-warnings --no-undefined --gc-sections CMakeFiles/cmTC_b54ba.dir/CMakeCCompilerABI.c.o -lgcc -ldl -lc -lgcc -ldl /home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/x86_64-linux-android/21/crtend_android.o]
    arg [/home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/lib/gcc/x86_64-linux-android/4.9.x/../../../../x86_64-linux-android/bin/ld] ==> ignore
    arg [--sysroot=/home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/sysroot] ==> ignore
    arg [-pie] ==> ignore
    arg [-znoexecstack] ==> ignore
    arg [--warn-shared-textrel] ==> ignore
    arg [-znow] ==> ignore
    arg [-zrelro] ==> ignore
    arg [--hash-style=both] ==> ignore
    arg [--enable-new-dtags] ==> ignore
    arg [--eh-frame-hdr] ==> ignore
    arg [-m] ==> ignore
    arg [elf_x86_64] ==> ignore
    arg [-dynamic-linker] ==> ignore
    arg [/system/bin/linker64] ==> ignore
    arg [-o] ==> ignore
    arg [cmTC_b54ba] ==> ignore
    arg [/home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/x86_64-linux-android/21/crtbegin_dynamic.o] ==> ignore
    arg [-L/home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/lib64/clang/9.0.9/lib/linux/x86_64] ==> dir [/home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/lib64/clang/9.0.9/lib/linux/x86_64]
    arg [-L/home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/lib/gcc/x86_64-linux-android/4.9.x] ==> dir [/home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/lib/gcc/x86_64-linux-android/4.9.x]
    arg [-L/home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/lib/gcc/x86_64-linux-android/4.9.x/../../../../x86_64-linux-android/lib/../lib64] ==> dir [/home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/lib/gcc/x86_64-linux-android/4.9.x/../../../../x86_64-linux-android/lib/../lib64]
    arg [-L/home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/x86_64-linux-android/21] ==> dir [/home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/x86_64-linux-android/21]
    arg [-L/home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/x86_64-linux-android] ==> dir [/home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/x86_64-linux-android]
    arg [-L/home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/lib/gcc/x86_64-linux-android/4.9.x/../../../../x86_64-linux-android/lib] ==> dir [/home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/lib/gcc/x86_64-linux-android/4.9.x/../../../../x86_64-linux-android/lib]
    arg [-L/home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib] ==> dir [/home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib]
    arg [--exclude-libs] ==> ignore
    arg [libgcc.a] ==> ignore
    arg [--exclude-libs] ==> ignore
    arg [libgcc_real.a] ==> ignore
    arg [--exclude-libs] ==> ignore
    arg [libatomic.a] ==> ignore
    arg [--build-id] ==> ignore
    arg [--fatal-warnings] ==> ignore
    arg [--no-undefined] ==> ignore
    arg [--gc-sections] ==> ignore
    arg [CMakeFiles/cmTC_b54ba.dir/CMakeCCompilerABI.c.o] ==> ignore
    arg [-lgcc] ==> lib [gcc]
    arg [-ldl] ==> lib [dl]
    arg [-lc] ==> lib [c]
    arg [-lgcc] ==> lib [gcc]
    arg [-ldl] ==> lib [dl]
    arg [/home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/x86_64-linux-android/21/crtend_android.o] ==> ignore
  collapse library dir [/home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/lib64/clang/9.0.9/lib/linux/x86_64] ==> [/home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/lib64/clang/9.0.9/lib/linux/x86_64]
  collapse library dir [/home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/lib/gcc/x86_64-linux-android/4.9.x] ==> [/home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/lib/gcc/x86_64-linux-android/4.9.x]
  collapse library dir [/home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/lib/gcc/x86_64-linux-android/4.9.x/../../../../x86_64-linux-android/lib/../lib64] ==> [/home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/x86_64-linux-android/lib64]
  collapse library dir [/home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/x86_64-linux-android/21] ==> [/home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/x86_64-linux-android/21]
  collapse library dir [/home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/x86_64-linux-android] ==> [/home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/x86_64-linux-android]
  collapse library dir [/home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/lib/gcc/x86_64-linux-android/4.9.x/../../../../x86_64-linux-android/lib] ==> [/home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/x86_64-linux-android/lib]
  collapse library dir [/home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib] ==> [/home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib]
  implicit libs: [gcc;dl;c;gcc;dl]
  implicit dirs: [/home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/lib64/clang/9.0.9/lib/linux/x86_64;/home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/lib/gcc/x86_64-linux-android/4.9.x;/home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/x86_64-linux-android/lib64;/home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/x86_64-linux-android/21;/home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/x86_64-linux-android;/home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/x86_64-linux-android/lib;/home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib]
  implicit fwks: []


Detecting CXX compiler ABI info compiled with the following output:
Change Dir: /home/fabrizio/Documents/sourcecode/opensource/react-native/ReactAndroid/.cxx/Debug/633s5i22/x86_64/CMakeFiles/CMakeTmp

Run Build Command(s):/home/fabrizio/Android/Sdk/cmake/3.18.1/bin/ninja cmTC_14aa5 && [1/2] Building CXX object CMakeFiles/cmTC_14aa5.dir/CMakeCXXCompilerABI.cpp.o
Android (7019983 based on r365631c3) clang version 9.0.9 (https://android.googlesource.com/toolchain/llvm-project a2a1e703c0edb03ba29944e529ccbf457742737b) (based on LLVM 9.0.9svn)
Target: x86_64-none-linux-android21
Thread model: posix
InstalledDir: /home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/bin
Found candidate GCC installation: /home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/lib/gcc/i686-linux-android/4.9.x
Found candidate GCC installation: /home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/lib/gcc/x86_64-linux-android/4.9.x
Selected GCC installation: /home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/lib/gcc/x86_64-linux-android/4.9.x
Candidate multilib: .;@m64
Selected multilib: .;@m64
 "/home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++" -cc1 -triple x86_64-none-linux-android21 -emit-obj -mrelax-all -mnoexecstack -disable-free -disable-llvm-verifier -discard-value-names -main-file-name CMakeCXXCompilerABI.cpp -mrelocation-model pic -pic-level 2 -pic-is-pie -mthread-model posix -mdisable-fp-elim -masm-verbose -mconstructor-aliases -munwind-tables -fuse-init-array -target-cpu x86-64 -target-feature +sse4.2 -target-feature +popcnt -target-feature +cx16 -dwarf-column-info -debug-info-kind=limited -dwarf-version=4 -debugger-tuning=gdb -v -ffunction-sections -fdata-sections -coverage-notes-file /home/fabrizio/Documents/sourcecode/opensource/react-native/ReactAndroid/.cxx/Debug/633s5i22/x86_64/CMakeFiles/CMakeTmp/CMakeFiles/cmTC_14aa5.dir/CMakeCXXCompilerABI.cpp.gcno -resource-dir /home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/lib64/clang/9.0.9 -dependency-file CMakeFiles/cmTC_14aa5.dir/CMakeCXXCompilerABI.cpp.o.d -sys-header-deps -MT CMakeFiles/cmTC_14aa5.dir/CMakeCXXCompilerABI.cpp.o -D ANDROID -D _FORTIFY_SOURCE=2 -isysroot /home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/sysroot -internal-isystem /home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/c++/v1 -internal-isystem /home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/local/include -internal-isystem /home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/lib64/clang/9.0.9/include -internal-externc-isystem /home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/x86_64-linux-android -internal-externc-isystem /home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/sysroot/include -internal-externc-isystem /home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include -Wformat -fdeprecated-macro -fdebug-compilation-dir /home/fabrizio/Documents/sourcecode/opensource/react-native/ReactAndroid/.cxx/Debug/633s5i22/x86_64/CMakeFiles/CMakeTmp -ferror-limit 19 -fmessage-length 0 -stack-protector 2 -fobjc-runtime=gcc -fcxx-exceptions -fexceptions -fdiagnostics-show-option -o CMakeFiles/cmTC_14aa5.dir/CMakeCXXCompilerABI.cpp.o -x c++ /home/fabrizio/Android/Sdk/cmake/3.18.1/share/cmake-3.18/Modules/CMakeCXXCompilerABI.cpp
clang -cc1 version 9.0.9 based upon LLVM 9.0.9svn default target x86_64-unknown-linux-gnu
ignoring nonexistent directory "/home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/sysroot/include"
#include "..." search starts here:
#include <...> search starts here:
 /home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/c++/v1
 /home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/local/include
 /home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/lib64/clang/9.0.9/include
 /home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/x86_64-linux-android
 /home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include
End of search list.
[2/2] Linking CXX executable cmTC_14aa5
Android (7019983 based on r365631c3) clang version 9.0.9 (https://android.googlesource.com/toolchain/llvm-project a2a1e703c0edb03ba29944e529ccbf457742737b) (based on LLVM 9.0.9svn)
Target: x86_64-none-linux-android21
Thread model: posix
InstalledDir: /home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/bin
Found candidate GCC installation: /home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/lib/gcc/i686-linux-android/4.9.x
Found candidate GCC installation: /home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/lib/gcc/x86_64-linux-android/4.9.x
Selected GCC installation: /home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/lib/gcc/x86_64-linux-android/4.9.x
Candidate multilib: .;@m64
Selected multilib: .;@m64
 "/home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/lib/gcc/x86_64-linux-android/4.9.x/../../../../x86_64-linux-android/bin/ld" --sysroot=/home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/sysroot -pie -z noexecstack --warn-shared-textrel -z now -z relro --hash-style=both --enable-new-dtags --eh-frame-hdr -m elf_x86_64 -dynamic-linker /system/bin/linker64 -o cmTC_14aa5 /home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/x86_64-linux-android/21/crtbegin_dynamic.o -L/home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/lib64/clang/9.0.9/lib/linux/x86_64 -L/home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/lib/gcc/x86_64-linux-android/4.9.x -L/home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/lib/gcc/x86_64-linux-android/4.9.x/../../../../x86_64-linux-android/lib/../lib64 -L/home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/x86_64-linux-android/21 -L/home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/x86_64-linux-android -L/home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/lib/gcc/x86_64-linux-android/4.9.x/../../../../x86_64-linux-android/lib -L/home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib --exclude-libs libgcc.a --exclude-libs libgcc_real.a --exclude-libs libatomic.a --build-id --fatal-warnings --no-undefined --gc-sections CMakeFiles/cmTC_14aa5.dir/CMakeCXXCompilerABI.cpp.o -lc++ -lm -lgcc -ldl -lc -lgcc -ldl /home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/x86_64-linux-android/21/crtend_android.o



Parsed CXX implicit include dir info from above output: rv=done
  found start of include info
  found start of implicit include info
    add: [/home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/c++/v1]
    add: [/home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/local/include]
    add: [/home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/lib64/clang/9.0.9/include]
    add: [/home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/x86_64-linux-android]
    add: [/home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include]
  end of search list found
  collapse include dir [/home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/c++/v1] ==> [/home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/c++/v1]
  collapse include dir [/home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/local/include] ==> [/home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/local/include]
  collapse include dir [/home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/lib64/clang/9.0.9/include] ==> [/home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/lib64/clang/9.0.9/include]
  collapse include dir [/home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/x86_64-linux-android] ==> [/home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/x86_64-linux-android]
  collapse include dir [/home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include] ==> [/home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include]
  implicit include dirs: [/home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/c++/v1;/home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/local/include;/home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/lib64/clang/9.0.9/include;/home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/x86_64-linux-android;/home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include]


Parsed CXX implicit link information from above output:
  link line regex: [^( *|.*[/\])(x86_64-linux-android-ld|CMAKE_LINK_STARTFILE-NOTFOUND|([^/\]+-)?ld|collect2)[^/\]*( |$)]
  ignore line: [Change Dir: /home/fabrizio/Documents/sourcecode/opensource/react-native/ReactAndroid/.cxx/Debug/633s5i22/x86_64/CMakeFiles/CMakeTmp]
  ignore line: []
  ignore line: [Run Build Command(s):/home/fabrizio/Android/Sdk/cmake/3.18.1/bin/ninja cmTC_14aa5 && [1/2] Building CXX object CMakeFiles/cmTC_14aa5.dir/CMakeCXXCompilerABI.cpp.o]
  ignore line: [Android (7019983 based on r365631c3) clang version 9.0.9 (https://android.googlesource.com/toolchain/llvm-project a2a1e703c0edb03ba29944e529ccbf457742737b) (based on LLVM 9.0.9svn)]
  ignore line: [Target: x86_64-none-linux-android21]
  ignore line: [Thread model: posix]
  ignore line: [InstalledDir: /home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/bin]
  ignore line: [Found candidate GCC installation: /home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/lib/gcc/i686-linux-android/4.9.x]
  ignore line: [Found candidate GCC installation: /home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/lib/gcc/x86_64-linux-android/4.9.x]
  ignore line: [Selected GCC installation: /home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/lib/gcc/x86_64-linux-android/4.9.x]
  ignore line: [Candidate multilib: .]
  ignore line: [@m64]
  ignore line: [Selected multilib: .]
  ignore line: [@m64]
  ignore line: [ "/home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++" -cc1 -triple x86_64-none-linux-android21 -emit-obj -mrelax-all -mnoexecstack -disable-free -disable-llvm-verifier -discard-value-names -main-file-name CMakeCXXCompilerABI.cpp -mrelocation-model pic -pic-level 2 -pic-is-pie -mthread-model posix -mdisable-fp-elim -masm-verbose -mconstructor-aliases -munwind-tables -fuse-init-array -target-cpu x86-64 -target-feature +sse4.2 -target-feature +popcnt -target-feature +cx16 -dwarf-column-info -debug-info-kind=limited -dwarf-version=4 -debugger-tuning=gdb -v -ffunction-sections -fdata-sections -coverage-notes-file /home/fabrizio/Documents/sourcecode/opensource/react-native/ReactAndroid/.cxx/Debug/633s5i22/x86_64/CMakeFiles/CMakeTmp/CMakeFiles/cmTC_14aa5.dir/CMakeCXXCompilerABI.cpp.gcno -resource-dir /home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/lib64/clang/9.0.9 -dependency-file CMakeFiles/cmTC_14aa5.dir/CMakeCXXCompilerABI.cpp.o.d -sys-header-deps -MT CMakeFiles/cmTC_14aa5.dir/CMakeCXXCompilerABI.cpp.o -D ANDROID -D _FORTIFY_SOURCE=2 -isysroot /home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/sysroot -internal-isystem /home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/c++/v1 -internal-isystem /home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/local/include -internal-isystem /home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/lib64/clang/9.0.9/include -internal-externc-isystem /home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/x86_64-linux-android -internal-externc-isystem /home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/sysroot/include -internal-externc-isystem /home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include -Wformat -fdeprecated-macro -fdebug-compilation-dir /home/fabrizio/Documents/sourcecode/opensource/react-native/ReactAndroid/.cxx/Debug/633s5i22/x86_64/CMakeFiles/CMakeTmp -ferror-limit 19 -fmessage-length 0 -stack-protector 2 -fobjc-runtime=gcc -fcxx-exceptions -fexceptions -fdiagnostics-show-option -o CMakeFiles/cmTC_14aa5.dir/CMakeCXXCompilerABI.cpp.o -x c++ /home/fabrizio/Android/Sdk/cmake/3.18.1/share/cmake-3.18/Modules/CMakeCXXCompilerABI.cpp]
  ignore line: [clang -cc1 version 9.0.9 based upon LLVM 9.0.9svn default target x86_64-unknown-linux-gnu]
  ignore line: [ignoring nonexistent directory "/home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/sysroot/include"]
  ignore line: [#include "..." search starts here:]
  ignore line: [#include <...> search starts here:]
  ignore line: [ /home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/c++/v1]
  ignore line: [ /home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/local/include]
  ignore line: [ /home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/lib64/clang/9.0.9/include]
  ignore line: [ /home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/x86_64-linux-android]
  ignore line: [ /home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include]
  ignore line: [End of search list.]
  ignore line: [[2/2] Linking CXX executable cmTC_14aa5]
  ignore line: [Android (7019983 based on r365631c3) clang version 9.0.9 (https://android.googlesource.com/toolchain/llvm-project a2a1e703c0edb03ba29944e529ccbf457742737b) (based on LLVM 9.0.9svn)]
  ignore line: [Target: x86_64-none-linux-android21]
  ignore line: [Thread model: posix]
  ignore line: [InstalledDir: /home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/bin]
  ignore line: [Found candidate GCC installation: /home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/lib/gcc/i686-linux-android/4.9.x]
  ignore line: [Found candidate GCC installation: /home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/lib/gcc/x86_64-linux-android/4.9.x]
  ignore line: [Selected GCC installation: /home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/lib/gcc/x86_64-linux-android/4.9.x]
  ignore line: [Candidate multilib: .]
  ignore line: [@m64]
  ignore line: [Selected multilib: .]
  ignore line: [@m64]
  link line: [ "/home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/lib/gcc/x86_64-linux-android/4.9.x/../../../../x86_64-linux-android/bin/ld" --sysroot=/home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/sysroot -pie -z noexecstack --warn-shared-textrel -z now -z relro --hash-style=both --enable-new-dtags --eh-frame-hdr -m elf_x86_64 -dynamic-linker /system/bin/linker64 -o cmTC_14aa5 /home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/x86_64-linux-android/21/crtbegin_dynamic.o -L/home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/lib64/clang/9.0.9/lib/linux/x86_64 -L/home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/lib/gcc/x86_64-linux-android/4.9.x -L/home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/lib/gcc/x86_64-linux-android/4.9.x/../../../../x86_64-linux-android/lib/../lib64 -L/home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/x86_64-linux-android/21 -L/home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/x86_64-linux-android -L/home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/lib/gcc/x86_64-linux-android/4.9.x/../../../../x86_64-linux-android/lib -L/home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib --exclude-libs libgcc.a --exclude-libs libgcc_real.a --exclude-libs libatomic.a --build-id --fatal-warnings --no-undefined --gc-sections CMakeFiles/cmTC_14aa5.dir/CMakeCXXCompilerABI.cpp.o -lc++ -lm -lgcc -ldl -lc -lgcc -ldl /home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/x86_64-linux-android/21/crtend_android.o]
    arg [/home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/lib/gcc/x86_64-linux-android/4.9.x/../../../../x86_64-linux-android/bin/ld] ==> ignore
    arg [--sysroot=/home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/sysroot] ==> ignore
    arg [-pie] ==> ignore
    arg [-znoexecstack] ==> ignore
    arg [--warn-shared-textrel] ==> ignore
    arg [-znow] ==> ignore
    arg [-zrelro] ==> ignore
    arg [--hash-style=both] ==> ignore
    arg [--enable-new-dtags] ==> ignore
    arg [--eh-frame-hdr] ==> ignore
    arg [-m] ==> ignore
    arg [elf_x86_64] ==> ignore
    arg [-dynamic-linker] ==> ignore
    arg [/system/bin/linker64] ==> ignore
    arg [-o] ==> ignore
    arg [cmTC_14aa5] ==> ignore
    arg [/home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/x86_64-linux-android/21/crtbegin_dynamic.o] ==> ignore
    arg [-L/home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/lib64/clang/9.0.9/lib/linux/x86_64] ==> dir [/home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/lib64/clang/9.0.9/lib/linux/x86_64]
    arg [-L/home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/lib/gcc/x86_64-linux-android/4.9.x] ==> dir [/home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/lib/gcc/x86_64-linux-android/4.9.x]
    arg [-L/home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/lib/gcc/x86_64-linux-android/4.9.x/../../../../x86_64-linux-android/lib/../lib64] ==> dir [/home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/lib/gcc/x86_64-linux-android/4.9.x/../../../../x86_64-linux-android/lib/../lib64]
    arg [-L/home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/x86_64-linux-android/21] ==> dir [/home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/x86_64-linux-android/21]
    arg [-L/home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/x86_64-linux-android] ==> dir [/home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/x86_64-linux-android]
    arg [-L/home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/lib/gcc/x86_64-linux-android/4.9.x/../../../../x86_64-linux-android/lib] ==> dir [/home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/lib/gcc/x86_64-linux-android/4.9.x/../../../../x86_64-linux-android/lib]
    arg [-L/home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib] ==> dir [/home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib]
    arg [--exclude-libs] ==> ignore
    arg [libgcc.a] ==> ignore
    arg [--exclude-libs] ==> ignore
    arg [libgcc_real.a] ==> ignore
    arg [--exclude-libs] ==> ignore
    arg [libatomic.a] ==> ignore
    arg [--build-id] ==> ignore
    arg [--fatal-warnings] ==> ignore
    arg [--no-undefined] ==> ignore
    arg [--gc-sections] ==> ignore
    arg [CMakeFiles/cmTC_14aa5.dir/CMakeCXXCompilerABI.cpp.o] ==> ignore
    arg [-lc++] ==> lib [c++]
    arg [-lm] ==> lib [m]
    arg [-lgcc] ==> lib [gcc]
    arg [-ldl] ==> lib [dl]
    arg [-lc] ==> lib [c]
    arg [-lgcc] ==> lib [gcc]
    arg [-ldl] ==> lib [dl]
    arg [/home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/x86_64-linux-android/21/crtend_android.o] ==> ignore
  collapse library dir [/home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/lib64/clang/9.0.9/lib/linux/x86_64] ==> [/home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/lib64/clang/9.0.9/lib/linux/x86_64]
  collapse library dir [/home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/lib/gcc/x86_64-linux-android/4.9.x] ==> [/home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/lib/gcc/x86_64-linux-android/4.9.x]
  collapse library dir [/home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/lib/gcc/x86_64-linux-android/4.9.x/../../../../x86_64-linux-android/lib/../lib64] ==> [/home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/x86_64-linux-android/lib64]
  collapse library dir [/home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/x86_64-linux-android/21] ==> [/home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/x86_64-linux-android/21]
  collapse library dir [/home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/x86_64-linux-android] ==> [/home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/x86_64-linux-android]
  collapse library dir [/home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/lib/gcc/x86_64-linux-android/4.9.x/../../../../x86_64-linux-android/lib] ==> [/home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/x86_64-linux-android/lib]
  collapse library dir [/home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib] ==> [/home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib]
  implicit libs: [c++;m;gcc;dl;c;gcc;dl]
  implicit dirs: [/home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/lib64/clang/9.0.9/lib/linux/x86_64;/home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/lib/gcc/x86_64-linux-android/4.9.x;/home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/x86_64-linux-android/lib64;/home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/x86_64-linux-android/21;/home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/x86_64-linux-android;/home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/x86_64-linux-android/lib;/home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib]
  implicit fwks: []


Checking whether the ASM compiler is Clang using "--version" matched "(clang version)":
Android (7019983 based on r365631c3) clang version 9.0.9 (https://android.googlesource.com/toolchain/llvm-project a2a1e703c0edb03ba29944e529ccbf457742737b) (based on LLVM 9.0.9svn)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /home/fabrizio/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/bin

@fabOnReact
Copy link
Owner Author

fabOnReact commented Mar 24, 2022

  • understand how the path ~/.gradle/caches/transforms-3 is generated, because the folder does not exist
  • read CMake ndk docs
  • search online
  • ask question on stackoverflow and set bounty

@fabOnReact
Copy link
Owner Author

after cleaning all caches

rm -rf node_modules
rm -rf android/app/build
rm -rf ReactAndroid/.cxx
rm -rf ReactAndroid/build
rm -rf ~/.gradle/caches
rm -rf ~/.gradle/build

@fabOnReact
Copy link
Owner Author

fabOnReact commented Mar 31, 2022

I believe this issue is caused by react-native internal ndk or other build cache. I tried to clear the cache with commands like

rm -rf node_modules
rm -rf android/app/build
rm -rf ReactAndroid/.cxx
rm -rf ReactAndroid/build
rm -rf ~/.gradle/caches
rm -rf ~/.gradle/build

but did not work. I cloned again the repo and built again, as I did not know which folders to delete.|
The following commands solved this issue:

git clone git@github.com:facebook/react-native.git react-native-second
rm -rf ~/.gradle
cd react-native-second
yarn install
cd packages/react-native
yarn install-android-hermes
yarn start --reset-cache

It works now on commit facebook/react-native@8adedfe

I believe some cache is saved in the react-native project, I tried many times to delete ~/.gradle, but was not enough
Probably deleting all of this files would fix the issue without need of creating a new clone https://github.com/facebook/react-native/blob/8adedfeb1581760629edfa48fb2e9b9ffe145bff/.gitignore#L24

Related #10

@cortinico
Copy link
Contributor

I think the issue here are files that are not in git history. Developers don't have any knowledge of this cached files (.cxx) and don't know how to clear them. Would be useful creating a yarn command to clear the react-native cache as I know other developer experienced this issue in the past. I'll publish a pr in the future.

When those kind of things happens, git clean -fdx is the gold solution IMHO. It deletes all the untracted + gitignored files (it's like re-cloning the project).

We also have a ./gradlew cleanAll tasks which does something similar, cleaning all the intermediate compilation folders.

@fabOnReact fabOnReact unpinned this issue Apr 4, 2022
@fabOnReact fabOnReact reopened this Apr 6, 2022
@fabOnReact
Copy link
Owner Author

I experienced again issues with the build after rebasing to fabOnReact/react-native@5534634

full log of the error

  -- Configuring incomplete, errors occurred!
  See also "/home/fabrizio/Documents/sourcecode/opensource/react-native-second/ReactAndroid/.cxx/Debug/36441u5f/x86/CMakeFiles/CMakeOutput.log".

  CMake Error at CMakeLists.txt:16 (add_subdirectory):
    The source directory

      /home/fabrizio/Documents/sourcecode/opensource/react-native-second/ReactAndroid/build/third-party-ndk/glog

    does not contain a CMakeLists.txt file.
  Call Stack (most recent call first):
    CMakeLists.txt:20 (add_react_android_subdir)
    CMakeLists.txt:31 (add_react_third_party_ndk_subdir)


  CMake Error at CMakeLists.txt:16 (add_subdirectory):
    add_subdirectory given source
    "/home/fabrizio/Documents/sourcecode/opensource/react-native-second/ReactAndroid/build/third-party-ndk/boost"
    which is not an existing directory.
  Call Stack (most recent call first):
    CMakeLists.txt:20 (add_react_android_subdir)
    CMakeLists.txt:32 (add_react_third_party_ndk_subdir)


  CMake Error at CMakeLists.txt:16 (add_subdirectory):
    add_subdirectory given source
    "/home/fabrizio/Documents/sourcecode/opensource/react-native-second/ReactAndroid/build/third-party-ndk/double-conversion"
    which is not an existing directory.
  Call Stack (most recent call first):
    CMakeLists.txt:20 (add_react_android_subdir)
    CMakeLists.txt:33 (add_react_third_party_ndk_subdir)


  CMake Error at CMakeLists.txt:16 (add_subdirectory):
    add_subdirectory given source
    "/home/fabrizio/Documents/sourcecode/opensource/react-native-second/ReactAndroid/build/third-party-ndk/fmt"
    which is not an existing directory.
  Call Stack (most recent call first):
    CMakeLists.txt:20 (add_react_android_subdir)
    CMakeLists.txt:34 (add_react_third_party_ndk_subdir)


  CMake Error at CMakeLists.txt:16 (add_subdirectory):
    add_subdirectory given source
    "/home/fabrizio/Documents/sourcecode/opensource/react-native-second/ReactAndroid/build/third-party-ndk/libevent"
    which is not an existing directory.
  Call Stack (most recent call first):
    CMakeLists.txt:20 (add_react_android_subdir)
    CMakeLists.txt:35 (add_react_third_party_ndk_subdir)


  CMake Error at CMakeLists.txt:16 (add_subdirectory):
    add_subdirectory given source
    "/home/fabrizio/Documents/sourcecode/opensource/react-native-second/ReactAndroid/build/third-party-ndk/folly"
    which is not an existing directory.
  Call Stack (most recent call first):
    CMakeLists.txt:20 (add_react_android_subdir)
    CMakeLists.txt:36 (add_react_third_party_ndk_subdir)


  CMake Error at CMakeLists.txt:16 (add_subdirectory):
    add_subdirectory given source
    "/home/fabrizio/Documents/sourcecode/opensource/react-native-second/ReactAndroid/build/third-party-ndk/jsc"
    which is not an existing directory.
  Call Stack (most recent call first):
    CMakeLists.txt:20 (add_react_android_subdir)
    CMakeLists.txt:37 (add_react_third_party_ndk_subdir)


  CMake Error at CMakeLists.txt:16 (add_subdirectory):
    add_subdirectory given source
    "/home/fabrizio/Documents/sourcecode/opensource/react-native-second/ReactAndroid/build/generated/source/codegen/jni"
    which is not an existing directory.
  Call Stack (most recent call first):

I solved them with the following steps:

rm -rf node_modules
rm -rf ~/.gradle
git clean -fdx
./gradlew cleanAll
yarn install
cd packages/rn-tester
yarn install-android-jsc

@cortinico
Copy link
Contributor

Small nit:

git clean -fdx
./gradlew cleanAll

the first command is cleaning a superset of the folders cleaned from the second command.

@fabOnReact fabOnReact reopened this May 12, 2022
@fabOnReact fabOnReact reopened this Jul 11, 2022
Repository owner deleted a comment from cortinico Jul 11, 2022
@fabOnReact fabOnReact reopened this Aug 1, 2022
@fabOnReact fabOnReact changed the title Android NDK: Module react_codegen_rncore depends on undefined modules: folly_json Android NDK and Gradle cache causes issues on Ubuntu and MacOS Aug 4, 2022
@fabOnReact fabOnReact reopened this Aug 4, 2022
@fabOnReact
Copy link
Owner Author

fabOnReact commented Aug 4, 2022

I include this for documentation purposes as I experience this issue many times.

Command

alias rntester="reactnative && cd packages/rn-tester"
alias yband="rntester && yarn install-android-jsc -PreactNativeArchitectures=arm64-v8a && startapp"
alias startapp="adbr && adb shell am start -n 'com.facebook.react.uiapp/com.facebook.react.uiapp.RNTesterActivity' -a android.intent.action.MAIN -c android.intent.category.LAUNCHER && adbreverse"

This and all the other issues are solved when running these commands, but the build will take 30-60 minutes. It reproduces often aften a rebase or changing branch.

This specific issue is caused by duplicated files. PlatformCollatorICU 2.java:19 is duplicate PlatformCollatorICU.java.

/Users/fabriziobertoglio/Documents/sourcecode/opensource/react-native/sdks/hermes/lib/Platform/Intl/java/com/facebook/hermes/intl/PlatformCollatorICU 2.java:19: error: class PlatformCollatorICU is public, should be declared in a file named PlatformCollatorICU.java
public class PlatformCollatorICU implements IPlatformCollator {

I was able to fix this with the following steps:

  1. running these commands
  2. using yarn install-android-hermes instead of yarn install-android-jsc
full log

➜  rn-tester git:(text-onPress-does-not-trigger-accessible) ✗ yband
yarn run v1.22.19
$ ../../gradlew :packages:rn-tester:android:app:installJscDebug -PreactNativeArchitectures=arm64-v8a
<===----------> 30% CONFIGURING [9s]
> :ReactAndroid > Compiling build file 'ReactAndroid/build.gradle'
^C
➜  rn-tester git:(text-onPress-does-not-trigger-accessible) ✗ ...
➜  react-native git:(text-onPress-does-not-trigger-accessible) ✗ yin && yband
yarn install v1.22.19
[1/5] 🔍  Validating package.json...
[2/5] 🔍  Resolving packages...
[3/5] 🚚  Fetching packages...
[4/5] 🔗  Linking dependencies...
warning " > @react-native-community/cli@9.0.0-alpha.9" has unmet peer dependency "react-native@*".
warning " > metro-react-native-babel-transformer@0.72.0" has unmet peer dependency "@babel/core@*".
warning " > @react-native/tester@0.0.1" has unmet peer dependency "react-native@*".
warning "workspace-aggregator-3cb008e1-ada1-4e5f-80da-73bf62163b08 > @react-native/eslint-plugin-specs > @babel/eslint-parser@7.18.2" has unmet peer dependency "eslint@^7.5.0 || ^8.0.0".
warning "workspace-aggregator-3cb008e1-ada1-4e5f-80da-73bf62163b08 > react-native-codegen > jscodeshift@0.13.1" has unmet peer dependency "@babel/preset-env@^7.1.6".
warning "workspace-aggregator-3cb008e1-ada1-4e5f-80da-73bf62163b08 > @react-native/repo-config > @reactions/component@2.0.2" has incorrect peer dependency "react@15.x || 16.x".
warning "workspace-aggregator-3cb008e1-ada1-4e5f-80da-73bf62163b08 > @react-native/repo-config > eslint-plugin-jest > @typescript-eslint/utils > @typescript-eslint/typescript-estree > tsutils@3.21.0" has unmet peer dependency "typescript@>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta".
[5/5] 🔨  Building fresh packages...
✨  Done in 24.31s.
yarn run v1.22.19
$ ../../gradlew :packages:rn-tester:android:app:installJscDebug -PreactNativeArchitectures=arm64-v8a

> Task :ReactAndroid:hermes-engine:downloadHermes UP-TO-DATE
Download https://github.com/facebook/hermes/tarball/main

> Task :ReactAndroid:downloadBoost UP-TO-DATE
Download https://boostorg.jfrog.io/artifactory/main/release/1.76.0/source/boost_1_76_0.tar.gz

> Task :ReactAndroid:downloadDoubleConversion UP-TO-DATE
Download https://github.com/google/double-conversion/archive/v1.1.6.tar.gz

> Task :ReactAndroid:hermes-engine:configureBuildForHermes
CMake Deprecation Warning at CMakeLists.txt:42 (cmake_policy):
  The OLD behavior for policy CMP0026 will be removed from a future version
  of CMake.

  The cmake-policies(7) manual explains that the OLD behaviors of all
  policies are deprecated and that a policy should be set to OLD only under
  specific short-term circumstances.  Projects should be ported to the NEW
  behavior and not rely on setting a policy to OLD.


-- Threads enabled.
-- Doxygen disabled.
-- Go bindings disabled.
-- Found ld64 - /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld
-- Could NOT find Python module pygments
-- Could NOT find Python module pygments.lexers.c_cpp
-- Could NOT find Python module yaml
-- CMAKE_HOST_SYSTEM_NAME = Darwin
-- CMAKE_SYSTEM_NAME = Darwin
-- HERMES_APPLE_TARGET_PLATFORM =
-- CMAKE_CROSSCOMPILING = FALSE
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/fabriziobertoglio/Documents/sourcecode/opensource/react-native/ReactAndroid/hermes-engine/build/hermes

> Task :ReactAndroid:hermes-engine:buildHermes
[  3%] Built target zip
[ 10%] Built target LLVHDemangle
[ 10%] Built target dtoa
[ 36%] Built target LLVHSupport
[ 36%] Built target hermesFrontEndDefs
[ 40%] Built target hermesPlatformUnicode
[ 50%] Built target hermesOptimizer
[ 50%] Built target hermesRegex
[ 63%] Built target hermesSupport
[ 63%] Built target hermesADT
[ 66%] Built target hermesInst
[ 66%] Built target hermesFlowParser
[ 70%] Built target hermesAST
[ 70%] Built target hermesAST2JS
[ 73%] Built target hermesParser
[ 76%] Built target hermesSourceMap
[ 83%] Built target hermesFrontend
[ 83%] Built target hermesBackend
[ 96%] Built target hermesHBCBackend
[100%] Built target hermesCompilerDriver
[100%] Built target hermesc

> Task :ReactAndroid:hermes-engine:compileDebugJavaWithJavac
/Users/fabriziobertoglio/Documents/sourcecode/opensource/react-native/sdks/hermes/lib/Platform/Intl/java/com/facebook/hermes/intl/JSObjects 2.java:13: error: class JSObjects is public, should be declared in a file named JSObjects.java
public class JSObjects {
       ^
/Users/fabriziobertoglio/Documents/sourcecode/opensource/react-native/sdks/hermes/lib/Platform/Intl/java/com/facebook/hermes/intl/PlatformDateTimeFormatterAndroid 2.java:19: error: class PlatformDateTimeFormatterAndroid is public, should be declared in a file named PlatformDateTimeFormatterAndroid.java
public class PlatformDateTimeFormatterAndroid implements IPlatformDateTimeFormatter {
       ^
/Users/fabriziobertoglio/Documents/sourcecode/opensource/react-native/sdks/hermes/lib/Platform/Intl/java/com/facebook/hermes/intl/LocaleIdentifier 2.java:471: error: class LocaleIdentifier is public, should be declared in a file named LocaleIdentifier.java
public class LocaleIdentifier {
       ^
/Users/fabriziobertoglio/Documents/sourcecode/opensource/react-native/sdks/hermes/lib/Platform/Intl/java/com/facebook/hermes/intl/PlatformNumberFormatterAndroid 2.java:22: error: class PlatformNumberFormatterAndroid is public, should be declared in a file named PlatformNumberFormatterAndroid.java
public class PlatformNumberFormatterAndroid implements IPlatformNumberFormatter {
       ^
/Users/fabriziobertoglio/Documents/sourcecode/opensource/react-native/sdks/hermes/lib/Platform/Intl/java/com/facebook/hermes/intl/IPlatformNumberFormatter 2.java:22: error: interface IPlatformNumberFormatter is public, should be declared in a file named IPlatformNumberFormatter.java
public interface IPlatformNumberFormatter {
       ^
/Users/fabriziobertoglio/Documents/sourcecode/opensource/react-native/sdks/hermes/lib/Platform/Intl/java/com/facebook/hermes/intl/PlatformDateTimeFormatterAndroid.java:19: error: duplicate class: com.facebook.hermes.intl.PlatformDateTimeFormatterAndroid
public class PlatformDateTimeFormatterAndroid implements IPlatformDateTimeFormatter {
       ^
/Users/fabriziobertoglio/Documents/sourcecode/opensource/react-native/sdks/hermes/lib/Platform/Intl/java/com/facebook/hermes/intl/ParsedLocaleIdentifier 3.java:13: error: class ParsedLocaleIdentifier is public, should be declared in a file named ParsedLocaleIdentifier.java
public class ParsedLocaleIdentifier {
       ^
/Users/fabriziobertoglio/Documents/sourcecode/opensource/react-native/sdks/hermes/lib/Platform/Intl/java/com/facebook/hermes/intl/LocaleIdentifier.java:14: error: duplicate class: com.facebook.hermes.intl.LanguageTagsGenerated
class LanguageTagsGenerated {
^
/Users/fabriziobertoglio/Documents/sourcecode/opensource/react-native/sdks/hermes/lib/Platform/Intl/java/com/facebook/hermes/intl/LocaleIdentifier.java:291: error: duplicate class: com.facebook.hermes.intl.LocaleIdTokenizer
class LocaleIdTokenizer {
^
/Users/fabriziobertoglio/Documents/sourcecode/opensource/react-native/sdks/hermes/lib/Platform/Intl/java/com/facebook/hermes/intl/LocaleIdentifier.java:471: error: duplicate class: com.facebook.hermes.intl.LocaleIdentifier
public class LocaleIdentifier {
       ^
/Users/fabriziobertoglio/Documents/sourcecode/opensource/react-native/sdks/hermes/lib/Platform/Intl/java/com/facebook/hermes/intl/PlatformNumberFormatterICU 2.java:37: error: class PlatformNumberFormatterICU is public, should be declared in a file named PlatformNumberFormatterICU.java
public class PlatformNumberFormatterICU implements IPlatformNumberFormatter {
       ^
/Users/fabriziobertoglio/Documents/sourcecode/opensource/react-native/sdks/hermes/lib/Platform/Intl/java/com/facebook/hermes/intl/PlatformCollatorAndroid 2.java:18: error: class PlatformCollatorAndroid is public, should be declared in a file named PlatformCollatorAndroid.java
public class PlatformCollatorAndroid implements IPlatformCollator {
       ^
/Users/fabriziobertoglio/Documents/sourcecode/opensource/react-native/sdks/hermes/lib/Platform/Intl/java/com/facebook/hermes/intl/Intl 2.java:17: error: class Intl is public, should be declared in a file named Intl.java
public class Intl {
       ^
/Users/fabriziobertoglio/Documents/sourcecode/opensource/react-native/sdks/hermes/lib/Platform/Intl/java/com/facebook/hermes/intl/JSObjects.java:13: error: duplicate class: com.facebook.hermes.intl.JSObjects
public class JSObjects {
       ^
/Users/fabriziobertoglio/Documents/sourcecode/opensource/react-native/sdks/hermes/lib/Platform/Intl/java/com/facebook/hermes/intl/IPlatformCollator 2.java:10: error: interface IPlatformCollator is public, should be declared in a file named IPlatformCollator.java
public interface IPlatformCollator {
       ^
/Users/fabriziobertoglio/Documents/sourcecode/opensource/react-native/sdks/hermes/lib/Platform/Intl/java/com/facebook/hermes/intl/IPlatformNumberFormatter.java:22: error: duplicate class: com.facebook.hermes.intl.IPlatformNumberFormatter
public interface IPlatformNumberFormatter {
       ^
/Users/fabriziobertoglio/Documents/sourcecode/opensource/react-native/sdks/hermes/lib/Platform/Intl/java/com/facebook/hermes/intl/Constants 2.java:10: error: class Constants is public, should be declared in a file named Constants.java
public class Constants {
       ^
/Users/fabriziobertoglio/Documents/sourcecode/opensource/react-native/sdks/hermes/lib/Platform/Intl/java/com/facebook/hermes/intl/IPlatformDateTimeFormatter 2.java:12: error: interface IPlatformDateTimeFormatter is public, should be declared in a file named IPlatformDateTimeFormatter.java
public interface IPlatformDateTimeFormatter {
       ^
/Users/fabriziobertoglio/Documents/sourcecode/opensource/react-native/sdks/hermes/lib/Platform/Intl/java/com/facebook/hermes/intl/ILocaleObject 3.java:13: error: interface ILocaleObject is public, should be declared in a file named ILocaleObject.java
public interface ILocaleObject<T> {
       ^
/Users/fabriziobertoglio/Documents/sourcecode/opensource/react-native/sdks/hermes/lib/Platform/Intl/java/com/facebook/hermes/intl/IntlTextUtils 2.java:10: error: class IntlTextUtils is public, should be declared in a file named IntlTextUtils.java
public class IntlTextUtils {
       ^
/Users/fabriziobertoglio/Documents/sourcecode/opensource/react-native/sdks/hermes/lib/Platform/Intl/java/com/facebook/hermes/intl/NumberFormat 2.java:36: error: class NumberFormat is public, should be declared in a file named NumberFormat.java
public class NumberFormat {
       ^
/Users/fabriziobertoglio/Documents/sourcecode/opensource/react-native/sdks/hermes/lib/Platform/Intl/java/com/facebook/hermes/intl/PlatformNumberFormatterICU.java:37: error: duplicate class: com.facebook.hermes.intl.PlatformNumberFormatterICU
public class PlatformNumberFormatterICU implements IPlatformNumberFormatter {
       ^
/Users/fabriziobertoglio/Documents/sourcecode/opensource/react-native/sdks/hermes/lib/Platform/Intl/java/com/facebook/hermes/intl/JSRangeErrorException 3.java:12: error: class JSRangeErrorException is public, should be declared in a file named JSRangeErrorException.java
public class JSRangeErrorException extends Exception {
       ^
/Users/fabriziobertoglio/Documents/sourcecode/opensource/react-native/sdks/hermes/lib/Platform/Intl/java/com/facebook/hermes/intl/LocaleResolver 2.java:17: error: class LocaleResolver is public, should be declared in a file named LocaleResolver.java
public class LocaleResolver {
       ^
/Users/fabriziobertoglio/Documents/sourcecode/opensource/react-native/sdks/hermes/lib/Platform/Intl/java/com/facebook/hermes/intl/LocaleObjectICU 2.java:19: error: class LocaleObjectICU is public, should be declared in a file named LocaleObjectICU.java
public class LocaleObjectICU implements ILocaleObject<ULocale> {
       ^
/Users/fabriziobertoglio/Documents/sourcecode/opensource/react-native/sdks/hermes/lib/Platform/Intl/java/com/facebook/hermes/intl/IPlatformDateTimeFormatter.java:12: error: duplicate class: com.facebook.hermes.intl.IPlatformDateTimeFormatter
public interface IPlatformDateTimeFormatter {
       ^
/Users/fabriziobertoglio/Documents/sourcecode/opensource/react-native/sdks/hermes/lib/Platform/Intl/java/com/facebook/hermes/intl/LocaleObject 3.java:12: error: class LocaleObject is public, should be declared in a file named LocaleObject.java
public class LocaleObject {
       ^
/Users/fabriziobertoglio/Documents/sourcecode/opensource/react-native/sdks/hermes/lib/Platform/Intl/java/com/facebook/hermes/intl/Collator 2.java:28: error: class Collator is public, should be declared in a file named Collator.java
public class Collator {
       ^
/Users/fabriziobertoglio/Documents/sourcecode/opensource/react-native/sdks/hermes/lib/Platform/Intl/java/com/facebook/hermes/intl/PlatformDateTimeFormatterICU 2.java:21: error: class PlatformDateTimeFormatterICU is public, should be declared in a file named PlatformDateTimeFormatterICU.java
public class PlatformDateTimeFormatterICU implements IPlatformDateTimeFormatter {
       ^
/Users/fabriziobertoglio/Documents/sourcecode/opensource/react-native/sdks/hermes/lib/Platform/Intl/java/com/facebook/hermes/intl/OptionHelpers 2.java:12: error: class OptionHelpers is public, should be declared in a file named OptionHelpers.java
public class OptionHelpers {
       ^
/Users/fabriziobertoglio/Documents/sourcecode/opensource/react-native/sdks/hermes/lib/Platform/Intl/java/com/facebook/hermes/intl/NumberFormat.java:36: error: duplicate class: com.facebook.hermes.intl.NumberFormat
public class NumberFormat {
       ^
/Users/fabriziobertoglio/Documents/sourcecode/opensource/react-native/sdks/hermes/lib/Platform/Intl/java/com/facebook/hermes/intl/UnicodeExtensionKeys 2.java:16: error: class UnicodeExtensionKeys is public, should be declared in a file named UnicodeExtensionKeys.java
public class UnicodeExtensionKeys {
       ^
/Users/fabriziobertoglio/Documents/sourcecode/opensource/react-native/sdks/hermes/lib/Platform/Intl/java/com/facebook/hermes/intl/LocaleMatcher 2.java:17: error: class LocaleMatcher is public, should be declared in a file named LocaleMatcher.java
public class LocaleMatcher {
       ^
/Users/fabriziobertoglio/Documents/sourcecode/opensource/react-native/sdks/hermes/lib/Platform/Intl/java/com/facebook/hermes/intl/ILocaleObject.java:13: error: duplicate class: com.facebook.hermes.intl.ILocaleObject
public interface ILocaleObject<T> {
       ^
/Users/fabriziobertoglio/Documents/sourcecode/opensource/react-native/sdks/hermes/lib/Platform/Intl/java/com/facebook/hermes/intl/LocaleObjectAndroid 2.java:18: error: class LocaleObjectAndroid is public, should be declared in a file named LocaleObjectAndroid.java
public class LocaleObjectAndroid implements ILocaleObject<Locale> {
       ^
/Users/fabriziobertoglio/Documents/sourcecode/opensource/react-native/sdks/hermes/lib/Platform/Intl/java/com/facebook/hermes/intl/LocaleObjectICU.java:19: error: duplicate class: com.facebook.hermes.intl.LocaleObjectICU
public class LocaleObjectICU implements ILocaleObject<ULocale> {
       ^
/Users/fabriziobertoglio/Documents/sourcecode/opensource/react-native/sdks/hermes/lib/Platform/Intl/java/com/facebook/hermes/intl/ParsedLocaleIdentifier.java:13: error: duplicate class: com.facebook.hermes.intl.ParsedLocaleIdentifier
public class ParsedLocaleIdentifier {
       ^
/Users/fabriziobertoglio/Documents/sourcecode/opensource/react-native/sdks/hermes/lib/Platform/Intl/java/com/facebook/hermes/intl/PlatformCollatorAndroid.java:18: error: duplicate class: com.facebook.hermes.intl.PlatformCollatorAndroid
public class PlatformCollatorAndroid implements IPlatformCollator {
       ^
/Users/fabriziobertoglio/Documents/sourcecode/opensource/react-native/sdks/hermes/lib/Platform/Intl/java/com/facebook/hermes/intl/Constants.java:10: error: duplicate class: com.facebook.hermes.intl.Constants
public class Constants {
       ^
/Users/fabriziobertoglio/Documents/sourcecode/opensource/react-native/sdks/hermes/lib/Platform/Intl/java/com/facebook/hermes/intl/DateTimeFormat 2.java:53: error: class DateTimeFormat is public, should be declared in a file named DateTimeFormat.java
public class DateTimeFormat {
       ^
/Users/fabriziobertoglio/Documents/sourcecode/opensource/react-native/sdks/hermes/lib/Platform/Intl/java/com/facebook/hermes/intl/PlatformCollatorICU 2.java:19: error: class PlatformCollatorICU is public, should be declared in a file named PlatformCollatorICU.java
public class PlatformCollatorICU implements IPlatformCollator {
       ^
Note: /Users/fabriziobertoglio/Documents/sourcecode/opensource/react-native/sdks/hermes/lib/Platform/Intl/java/com/facebook/hermes/intl/JSObjects 2.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
41 errors

> Task :ReactAndroid:hermes-engine:compileDebugJavaWithJavac FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':ReactAndroid:hermes-engine:compileDebugJavaWithJavac'.
> Compilation failed; see the compiler error output for details.

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.

* Get more help at https://help.gradle.org

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

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

See https://docs.gradle.org/7.5/userguide/command_line_interface.html#sec:command_line_warnings

BUILD FAILED in 34s
26 actionable tasks: 9 executed, 17 up-to-date
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

partial log

> Task :ReactAndroid:hermes-engine:compileDebugJavaWithJavac
/Users/fabriziobertoglio/Documents/sourcecode/opensource/react-native/sdks/hermes/lib/Platform/Intl/java/com/facebook/hermes/intl/JSObjects 2.java:13: error: class JSObjects is public, should be declared in a file named JSObjects.java
public class JSObjects {
       ^
/Users/fabriziobertoglio/Documents/sourcecode/opensource/react-native/sdks/hermes/lib/Platform/Intl/java/com/facebook/hermes/intl/PlatformDateTimeFormatterAndroid 2.java:19: error: class PlatformDateTimeFormatterAndroid is public, should be declared in a file named PlatformDateTimeFormatterAndroid.java
public class PlatformDateTimeFormatterAndroid implements IPlatformDateTimeFormatter {
       ^
/Users/fabriziobertoglio/Documents/sourcecode/opensource/react-native/sdks/hermes/lib/Platform/Intl/java/com/facebook/hermes/intl/LocaleIdentifier 2.java:471: error: class LocaleIdentifier is public, should be declared in a file named LocaleIdentifier.java
public class LocaleIdentifier {
       ^
/Users/fabriziobertoglio/Documents/sourcecode/opensource/react-native/sdks/hermes/lib/Platform/Intl/java/com/facebook/hermes/intl/PlatformNumberFormatterAndroid 2.java:22: error: class PlatformNumberFormatterAndroid is public, should be declared in a file named PlatformNumberFormatterAndroid.java
public class PlatformNumberFormatterAndroid implements IPlatformNumberFormatter {
       ^
/Users/fabriziobertoglio/Documents/sourcecode/opensource/react-native/sdks/hermes/lib/Platform/Intl/java/com/facebook/hermes/intl/IPlatformNumberFormatter 2.java:22: error: interface IPlatformNumberFormatter is public, should be declared in a file named IPlatformNumberFormatter.java
public interface IPlatformNumberFormatter {
       ^
/Users/fabriziobertoglio/Documents/sourcecode/opensource/react-native/sdks/hermes/lib/Platform/Intl/java/com/facebook/hermes/intl/PlatformDateTimeFormatterAndroid.java:19: error: duplicate class: com.facebook.hermes.intl.PlatformDateTimeFormatterAndroid
public class PlatformDateTimeFormatterAndroid implements IPlatformDateTimeFormatter {
       ^
/Users/fabriziobertoglio/Documents/sourcecode/opensource/react-native/sdks/hermes/lib/Platform/Intl/java/com/facebook/hermes/intl/ParsedLocaleIdentifier 3.java:13: error: class ParsedLocaleIdentifier is public, should be declared in a file named ParsedLocaleIdentifier.java
public class ParsedLocaleIdentifier {
       ^
/Users/fabriziobertoglio/Documents/sourcecode/opensource/react-native/sdks/hermes/lib/Platform/Intl/java/com/facebook/hermes/intl/LocaleIdentifier.java:14: error: duplicate class: com.facebook.hermes.intl.LanguageTagsGenerated
class LanguageTagsGenerated {
^
/Users/fabriziobertoglio/Documents/sourcecode/opensource/react-native/sdks/hermes/lib/Platform/Intl/java/com/facebook/hermes/intl/LocaleIdentifier.java:291: error: duplicate class: com.facebook.hermes.intl.LocaleIdTokenizer
class LocaleIdTokenizer {
^
/Users/fabriziobertoglio/Documents/sourcecode/opensource/react-native/sdks/hermes/lib/Platform/Intl/java/com/facebook/hermes/intl/LocaleIdentifier.java:471: error: duplicate class: com.facebook.hermes.intl.LocaleIdentifier
public class LocaleIdentifier {
       ^
/Users/fabriziobertoglio/Documents/sourcecode/opensource/react-native/sdks/hermes/lib/Platform/Intl/java/com/facebook/hermes/intl/PlatformNumberFormatterICU 2.java:37: error: class PlatformNumberFormatterICU is public, should be declared in a file named PlatformNumberFormatterICU.java
public class PlatformNumberFormatterICU implements IPlatformNumberFormatter {
       ^
/Users/fabriziobertoglio/Documents/sourcecode/opensource/react-native/sdks/hermes/lib/Platform/Intl/java/com/facebook/hermes/intl/PlatformCollatorAndroid 2.java:18: error: class PlatformCollatorAndroid is public, should be declared in a file named PlatformCollatorAndroid.java
public class PlatformCollatorAndroid implements IPlatformCollator {
       ^
/Users/fabriziobertoglio/Documents/sourcecode/opensource/react-native/sdks/hermes/lib/Platform/Intl/java/com/facebook/hermes/intl/Intl 2.java:17: error: class Intl is public, should be declared in a file named Intl.java
public class Intl {
       ^
/Users/fabriziobertoglio/Documents/sourcecode/opensource/react-native/sdks/hermes/lib/Platform/Intl/java/com/facebook/hermes/intl/JSObjects.java:13: error: duplicate class: com.facebook.hermes.intl.JSObjects
public class JSObjects {
       ^
/Users/fabriziobertoglio/Documents/sourcecode/opensource/react-native/sdks/hermes/lib/Platform/Intl/java/com/facebook/hermes/intl/IPlatformCollator 2.java:10: error: interface IPlatformCollator is public, should be declared in a file named IPlatformCollator.java
public interface IPlatformCollator {
       ^
/Users/fabriziobertoglio/Documents/sourcecode/opensource/react-native/sdks/hermes/lib/Platform/Intl/java/com/facebook/hermes/intl/IPlatformNumberFormatter.java:22: error: duplicate class: com.facebook.hermes.intl.IPlatformNumberFormatter
public interface IPlatformNumberFormatter {
       ^
/Users/fabriziobertoglio/Documents/sourcecode/opensource/react-native/sdks/hermes/lib/Platform/Intl/java/com/facebook/hermes/intl/Constants 2.java:10: error: class Constants is public, should be declared in a file named Constants.java
public class Constants {
       ^
/Users/fabriziobertoglio/Documents/sourcecode/opensource/react-native/sdks/hermes/lib/Platform/Intl/java/com/facebook/hermes/intl/IPlatformDateTimeFormatter 2.java:12: error: interface IPlatformDateTimeFormatter is public, should be declared in a file named IPlatformDateTimeFormatter.java
public interface IPlatformDateTimeFormatter {
       ^
/Users/fabriziobertoglio/Documents/sourcecode/opensource/react-native/sdks/hermes/lib/Platform/Intl/java/com/facebook/hermes/intl/ILocaleObject 3.java:13: error: interface ILocaleObject is public, should be declared in a file named ILocaleObject.java
public interface ILocaleObject<T> {
       ^
/Users/fabriziobertoglio/Documents/sourcecode/opensource/react-native/sdks/hermes/lib/Platform/Intl/java/com/facebook/hermes/intl/IntlTextUtils 2.java:10: error: class IntlTextUtils is public, should be declared in a file named IntlTextUtils.java
public class IntlTextUtils {
       ^
/Users/fabriziobertoglio/Documents/sourcecode/opensource/react-native/sdks/hermes/lib/Platform/Intl/java/com/facebook/hermes/intl/NumberFormat 2.java:36: error: class NumberFormat is public, should be declared in a file named NumberFormat.java
public class NumberFormat {
       ^
/Users/fabriziobertoglio/Documents/sourcecode/opensource/react-native/sdks/hermes/lib/Platform/Intl/java/com/facebook/hermes/intl/PlatformNumberFormatterICU.java:37: error: duplicate class: com.facebook.hermes.intl.PlatformNumberFormatterICU
public class PlatformNumberFormatterICU implements IPlatformNumberFormatter {
       ^
/Users/fabriziobertoglio/Documents/sourcecode/opensource/react-native/sdks/hermes/lib/Platform/Intl/java/com/facebook/hermes/intl/JSRangeErrorException 3.java:12: error: class JSRangeErrorException is public, should be declared in a file named JSRangeErrorException.java
public class JSRangeErrorException extends Exception {
       ^
/Users/fabriziobertoglio/Documents/sourcecode/opensource/react-native/sdks/hermes/lib/Platform/Intl/java/com/facebook/hermes/intl/LocaleResolver 2.java:17: error: class LocaleResolver is public, should be declared in a file named LocaleResolver.java
public class LocaleResolver {
       ^
/Users/fabriziobertoglio/Documents/sourcecode/opensource/react-native/sdks/hermes/lib/Platform/Intl/java/com/facebook/hermes/intl/LocaleObjectICU 2.java:19: error: class LocaleObjectICU is public, should be declared in a file named LocaleObjectICU.java
public class LocaleObjectICU implements ILocaleObject<ULocale> {
       ^
/Users/fabriziobertoglio/Documents/sourcecode/opensource/react-native/sdks/hermes/lib/Platform/Intl/java/com/facebook/hermes/intl/IPlatformDateTimeFormatter.java:12: error: duplicate class: com.facebook.hermes.intl.IPlatformDateTimeFormatter
public interface IPlatformDateTimeFormatter {
       ^
/Users/fabriziobertoglio/Documents/sourcecode/opensource/react-native/sdks/hermes/lib/Platform/Intl/java/com/facebook/hermes/intl/LocaleObject 3.java:12: error: class LocaleObject is public, should be declared in a file named LocaleObject.java
public class LocaleObject {
       ^
/Users/fabriziobertoglio/Documents/sourcecode/opensource/react-native/sdks/hermes/lib/Platform/Intl/java/com/facebook/hermes/intl/Collator 2.java:28: error: class Collator is public, should be declared in a file named Collator.java
public class Collator {
       ^
/Users/fabriziobertoglio/Documents/sourcecode/opensource/react-native/sdks/hermes/lib/Platform/Intl/java/com/facebook/hermes/intl/PlatformDateTimeFormatterICU 2.java:21: error: class PlatformDateTimeFormatterICU is public, should be declared in a file named PlatformDateTimeFormatterICU.java
public class PlatformDateTimeFormatterICU implements IPlatformDateTimeFormatter {
       ^
/Users/fabriziobertoglio/Documents/sourcecode/opensource/react-native/sdks/hermes/lib/Platform/Intl/java/com/facebook/hermes/intl/OptionHelpers 2.java:12: error: class OptionHelpers is public, should be declared in a file named OptionHelpers.java
public class OptionHelpers {
       ^
/Users/fabriziobertoglio/Documents/sourcecode/opensource/react-native/sdks/hermes/lib/Platform/Intl/java/com/facebook/hermes/intl/NumberFormat.java:36: error: duplicate class: com.facebook.hermes.intl.NumberFormat
public class NumberFormat {
       ^
/Users/fabriziobertoglio/Documents/sourcecode/opensource/react-native/sdks/hermes/lib/Platform/Intl/java/com/facebook/hermes/intl/UnicodeExtensionKeys 2.java:16: error: class UnicodeExtensionKeys is public, should be declared in a file named UnicodeExtensionKeys.java
public class UnicodeExtensionKeys {
       ^
/Users/fabriziobertoglio/Documents/sourcecode/opensource/react-native/sdks/hermes/lib/Platform/Intl/java/com/facebook/hermes/intl/LocaleMatcher 2.java:17: error: class LocaleMatcher is public, should be declared in a file named LocaleMatcher.java
public class LocaleMatcher {
       ^
/Users/fabriziobertoglio/Documents/sourcecode/opensource/react-native/sdks/hermes/lib/Platform/Intl/java/com/facebook/hermes/intl/ILocaleObject.java:13: error: duplicate class: com.facebook.hermes.intl.ILocaleObject
public interface ILocaleObject<T> {
       ^
/Users/fabriziobertoglio/Documents/sourcecode/opensource/react-native/sdks/hermes/lib/Platform/Intl/java/com/facebook/hermes/intl/LocaleObjectAndroid 2.java:18: error: class LocaleObjectAndroid is public, should be declared in a file named LocaleObjectAndroid.java
public class LocaleObjectAndroid implements ILocaleObject<Locale> {
       ^
/Users/fabriziobertoglio/Documents/sourcecode/opensource/react-native/sdks/hermes/lib/Platform/Intl/java/com/facebook/hermes/intl/LocaleObjectICU.java:19: error: duplicate class: com.facebook.hermes.intl.LocaleObjectICU
public class LocaleObjectICU implements ILocaleObject<ULocale> {
       ^
/Users/fabriziobertoglio/Documents/sourcecode/opensource/react-native/sdks/hermes/lib/Platform/Intl/java/com/facebook/hermes/intl/ParsedLocaleIdentifier.java:13: error: duplicate class: com.facebook.hermes.intl.ParsedLocaleIdentifier
public class ParsedLocaleIdentifier {
       ^
/Users/fabriziobertoglio/Documents/sourcecode/opensource/react-native/sdks/hermes/lib/Platform/Intl/java/com/facebook/hermes/intl/PlatformCollatorAndroid.java:18: error: duplicate class: com.facebook.hermes.intl.PlatformCollatorAndroid
public class PlatformCollatorAndroid implements IPlatformCollator {
       ^
/Users/fabriziobertoglio/Documents/sourcecode/opensource/react-native/sdks/hermes/lib/Platform/Intl/java/com/facebook/hermes/intl/Constants.java:10: error: duplicate class: com.facebook.hermes.intl.Constants
public class Constants {
       ^
/Users/fabriziobertoglio/Documents/sourcecode/opensource/react-native/sdks/hermes/lib/Platform/Intl/java/com/facebook/hermes/intl/DateTimeFormat 2.java:53: error: class DateTimeFormat is public, should be declared in a file named DateTimeFormat.java
public class DateTimeFormat {
       ^
/Users/fabriziobertoglio/Documents/sourcecode/opensource/react-native/sdks/hermes/lib/Platform/Intl/java/com/facebook/hermes/intl/PlatformCollatorICU 2.java:19: error: class PlatformCollatorICU is public, should be declared in a file named PlatformCollatorICU.java
public class PlatformCollatorICU implements IPlatformCollator {
       ^
Note: /Users/fabriziobertoglio/Documents/sourcecode/opensource/react-native/sdks/hermes/lib/Platform/Intl/java/com/facebook/hermes/intl/JSObjects 2.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
41 errors

> Task :ReactAndroid:hermes-engine:compileDebugJavaWithJavac FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':ReactAndroid:hermes-engine:compileDebugJavaWithJavac'.
> Compilation failed; see the compiler error output for details.

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.

* Get more help at https://help.gradle.org

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

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

See https://docs.gradle.org/7.5/userguide/command_line_interface.html#sec:command_line_warnings

BUILD FAILED in 34s
26 actionable tasks: 9 executed, 17 up-to-date
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

error after deleting .gradle cache

> Task :packages:rn-tester:android:app:buildCMakeDebug[arm64-v8a][rntester_appmodules]
C/C++: ninja: Entering directory `/Users/fabriziobertoglio/Documents/sourcecode/opensource/react-native/packages/rn-tester/android/app/.cxx/Debug/1c493p1o/arm64-v8a'
C/C++: clang++: error: linker command failed with exit code 1 (use -v to see invocation)

> Task :packages:rn-tester:android:app:buildCMakeDebug[arm64-v8a][rntester_appmodules] FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':packages:rn-tester:android:app:buildCMakeDebug[arm64-v8a][rntester_appmodules]'.
> Build command failed.
  Error while executing process /Users/fabriziobertoglio/Library/Android/sdk/cmake/3.18.1/bin/ninja with arguments {-C /Users/fabriziobertoglio/Documents/sourcecode/opensource/react-native/packages/rn-tester/android/app/.cxx/Debug/1c493p1o/arm64-v8a rntester_appmodules}
  ninja: Entering directory `/Users/fabriziobertoglio/Documents/sourcecode/opensource/react-native/packages/rn-tester/android/app/.cxx/Debug/1c493p1o/arm64-v8a'
  [0/2] Re-checking globbed directories...
  [1/13] Building CXX object codegen_build/CMakeFiles/react_codegen_AppSpecs.dir/react/renderer/components/AppSpecs/EventEmitters.cpp.o
  [2/13] Building CXX object CMakeFiles/rntester_appmodules.dir/RNTesterAppModuleProvider.cpp.o
  [3/13] Building CXX object codegen_build/CMakeFiles/react_codegen_AppSpecs.dir/react/renderer/components/AppSpecs/ShadowNodes.cpp.o
  [4/13] Building CXX object sampleturbomodule_build/CMakeFiles/sampleturbomodule.dir/ReactCommon/SampleTurboModuleSpec.cpp.o
  [5/13] Building CXX object CMakeFiles/rntester_appmodules.dir/RNTesterTurboModuleManagerDelegate.cpp.o
  [6/13] Building CXX object codegen_build/CMakeFiles/react_codegen_AppSpecs.dir/AppSpecs-generated_2.cpp.o
  [7/13] Building CXX object codegen_build/CMakeFiles/react_codegen_AppSpecs.dir/AppSpecs-generated.cpp.o
  [8/13] Linking CXX static library sampleturbomodule_build/libsampleturbomodule.a
  [9/13] Building CXX object codegen_build/CMakeFiles/react_codegen_AppSpecs.dir/react/renderer/components/AppSpecs/Props.cpp.o
  [10/13] Linking CXX shared library /Users/fabriziobertoglio/Documents/sourcecode/opensource/react-native/packages/rn-tester/android/app/build/intermediates/cxx/Debug/1c493p1o/obj/arm64-v8a/libreact_codegen_AppSpecs.so
  FAILED: /Users/fabriziobertoglio/Documents/sourcecode/opensource/react-native/packages/rn-tester/android/app/build/intermediates/cxx/Debug/1c493p1o/obj/arm64-v8a/libreact_codegen_AppSpecs.so
  : && /Users/fabriziobertoglio/Library/Android/sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang++ --target=aarch64-none-linux-android21 --gcc-toolchain=/Users/fabriziobertoglio/Library/Android/sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/darwin-x86_64 --sysroot=/Users/fabriziobertoglio/Library/Android/sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/darwin-x86_64/sysroot -fPIC -g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security   -O0 -fno-limit-debug-info  -Wl,--exclude-libs,libgcc.a -Wl,--exclude-libs,libgcc_real.a -Wl,--exclude-libs,libatomic.a -Wl,--build-id -Wl,--fatal-warnings -Wl,--no-undefined -Qunused-arguments -shared -Wl,-soname,libreact_codegen_AppSpecs.so -o /Users/fabriziobertoglio/Documents/sourcecode/opensource/react-native/packages/rn-tester/android/app/build/intermediates/cxx/Debug/1c493p1o/obj/arm64-v8a/libreact_codegen_AppSpecs.so codegen_build/CMakeFiles/react_codegen_AppSpecs.dir/AppSpecs-generated_2.cpp.o codegen_build/CMakeFiles/react_codegen_AppSpecs.dir/AppSpecs-generated.cpp.o codegen_build/CMakeFiles/react_codegen_AppSpecs.dir/react/renderer/components/AppSpecs/EventEmitters.cpp.o codegen_build/CMakeFiles/react_codegen_AppSpecs.dir/react/renderer/components/AppSpecs/Props.cpp.o codegen_build/CMakeFiles/react_codegen_AppSpecs.dir/react/renderer/components/AppSpecs/ShadowNodes.cpp.o  /Users/fabriziobertoglio/Documents/sourcecode/opensource/react-native/ReactAndroid/src/main/jni/first-party/fbjni/jni/arm64-v8a/libfbjni.so  /Users/fabriziobertoglio/Documents/sourcecode/opensource/react-native/packages/rn-tester/android/app/build/react-ndk/exported/arm64-v8a/libglog.so  /Users/fabriziobertoglio/Documents/sourcecode/opensource/react-native/packages/rn-tester/android/app/build/react-ndk/exported/arm64-v8a/libjsi.so  /Users/fabriziobertoglio/Documents/sourcecode/opensource/react-native/packages/rn-tester/android/app/build/react-ndk/exported/arm64-v8a/libreact_codegen_rncore.so  /Users/fabriziobertoglio/Documents/sourcecode/opensource/react-native/packages/rn-tester/android/app/build/react-ndk/exported/arm64-v8a/libreact_debug.so  /Users/fabriziobertoglio/Documents/sourcecode/opensource/react-native/packages/rn-tester/android/app/build/react-ndk/exported/arm64-v8a/libreact_nativemodule_core.so  /Users/fabriziobertoglio/Documents/sourcecode/opensource/react-native/packages/rn-tester/android/app/build/react-ndk/exported/arm64-v8a/libreact_render_core.so  /Users/fabriziobertoglio/Documents/sourcecode/opensource/react-native/packages/rn-tester/android/app/build/react-ndk/exported/arm64-v8a/libreact_render_debug.so  /Users/fabriziobertoglio/Documents/sourcecode/opensource/react-native/packages/rn-tester/android/app/build/react-ndk/exported/arm64-v8a/libreact_render_graphics.so  /Users/fabriziobertoglio/Documents/sourcecode/opensource/react-native/packages/rn-tester/android/app/build/react-ndk/exported/arm64-v8a/librrc_view.so  /Users/fabriziobertoglio/Documents/sourcecode/opensource/react-native/packages/rn-tester/android/app/build/react-ndk/exported/arm64-v8a/libturbomodulejsijni.so  /Users/fabriziobertoglio/Documents/sourcecode/opensource/react-native/packages/rn-tester/android/app/build/react-ndk/exported/arm64-v8a/libyoga.so  /Users/fabriziobertoglio/Documents/sourcecode/opensource/react-native/packages/rn-tester/android/app/build/react-ndk/exported/arm64-v8a/libfolly_runtime.so  -llog  -landroid  -latomic -lm && :
  codegen_build/CMakeFiles/react_codegen_AppSpecs.dir/AppSpecs-generated.cpp.o: In function `facebook::react::AppSpecs_ModuleProvider(std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> > const&, facebook::react::JavaTurboModule::InitParams const&)':
  /Users/fabriziobertoglio/Library/Android/sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/include/c++/v1/utility:1200: multiple definition of `facebook::react::AppSpecs_ModuleProvider(std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> > const&, facebook::react::JavaTurboModule::InitParams const&)'
  codegen_build/CMakeFiles/react_codegen_AppSpecs.dir/AppSpecs-generated_2.cpp.o:/Users/fabriziobertoglio/Documents/sourcecode/opensource/react-native/packages/rn-tester/android/app/build/generated/source/codegen/jni/AppSpecs-generated 2.cpp:28: first defined here
  codegen_build/CMakeFiles/react_codegen_AppSpecs.dir/AppSpecs-generated.cpp.o: In function `_ZNSt6__ndk14swapIPN8facebook3jsi10PropNameIDEEENS_9enable_ifIXaasr21is_move_constructibleIT_EE5valuesr18is_move_assignableIS6_EE5valueEvE4typeERS6_S9_':
  /Users/fabriziobertoglio/Library/Android/sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/include/c++/v1/utility:1163: multiple definition of `facebook::react::NativeScreenshotManagerSpecJSI::NativeScreenshotManagerSpecJSI(facebook::react::JavaTurboModule::InitParams const&)'
  codegen_build/CMakeFiles/react_codegen_AppSpecs.dir/AppSpecs-generated_2.cpp.o:/Users/fabriziobertoglio/Documents/sourcecode/opensource/react-native/packages/rn-tester/android/app/build/generated/source/codegen/jni/AppSpecs-generated 2.cpp:24: first defined here
  codegen_build/CMakeFiles/react_codegen_AppSpecs.dir/AppSpecs-generated.cpp.o: In function `_ZNSt6__ndk14swapIPN8facebook3jsi10PropNameIDEEENS_9enable_ifIXaasr21is_move_constructibleIT_EE5valuesr18is_move_assignableIS6_EE5valueEvE4typeERS6_S9_':
  /Users/fabriziobertoglio/Library/Android/sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/include/c++/v1/utility:1163: multiple definition of `facebook::react::NativeScreenshotManagerSpecJSI::NativeScreenshotManagerSpecJSI(facebook::react::JavaTurboModule::InitParams const&)'
  codegen_build/CMakeFiles/react_codegen_AppSpecs.dir/AppSpecs-generated_2.cpp.o:/Users/fabriziobertoglio/Documents/sourcecode/opensource/react-native/packages/rn-tester/android/app/build/generated/source/codegen/jni/AppSpecs-generated 2.cpp:24: first defined here
  clang++: error: linker command failed with exit code 1 (use -v to see invocation)
  [11/13] Building CXX object CMakeFiles/rntester_appmodules.dir/OnLoad.cpp.o
  [12/13] Building CXX object CMakeFiles/rntester_appmodules.dir/RNTesterComponentsRegistry.cpp.o
  ninja: build stopped: subcommand failed.



@fabOnReact fabOnReact changed the title Android NDK and Gradle cache causes issues on Ubuntu and MacOS Android NDK, Hermes and Gradle cache issues on Ubuntu and MacOS Aug 4, 2022
@fabOnReact fabOnReact changed the title Android NDK, Hermes and Gradle cache issues on Ubuntu and MacOS Android NDK, Hermes and Gradle cache issues on Ubuntu, MacOS when building for android Aug 4, 2022
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
@cortinico @fabOnReact and others