facebook / react-native

A framework for building native applications using React
https://reactnative.dev
MIT License
119.59k stars 24.37k forks source link

Build fails after enabling new architecture #34938

Closed ADRE9 closed 2 years ago

ADRE9 commented 2 years ago

Description

PS D:\exp\AwesomeTSProject> yarn android
yarn run v1.22.17
$ react-native run-android
info Starting JS server...
info Launching emulator...
info Successfully launched emulator.
info Installing the app...

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

> Task :ReactAndroid:downloadGlog
Download https://github.com/google/glog/archive/v0.3.5.tar.gz

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

> Task :ReactAndroid:prepareGlog
Encountered duplicate path "config.h" during copy operation configured with DuplicatesStrategy.WARN

> Task :ReactAndroid:downloadFmt
Download https://github.com/fmtlib/fmt/archive/6.2.1.tar.gz

> Task :ReactAndroid:downloadFolly
Download https://github.com/facebook/folly/archive/v2021.07.22.00.tar.gz

> Task :ReactAndroid:hermes-engine:downloadHermes UP-TO-DATE
Download https://github.com/facebook/hermes/tarball/hermes-2022-09-14-RNv0.70.1-2a6b111ab289b55d7b78b5fdf105f466ba270fd7

> Task :ReactAndroid:downloadLibevent
Download https://github.com/libevent/libevent/releases/download/release-2.1.12-stable/libevent-2.1.12-stable.tar.gz

> Task :ReactAndroid:hermes-engine:configureBuildForHermes
-- Building for: NMake Makefiles
-- The C compiler identification is MSVC 19.33.31630.0
-- The CXX compiler identification is MSVC 19.33.31630.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.33.31629/bin/Hostx86/x86/cl.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.33.31629/bin/Hostx86/x86/cl.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found Python: C:/Python310/python.exe (found version "3.10.5") found components: Interpreter
-- Performing Test HAVE_COMPUTED_GOTO
-- Performing Test HAVE_COMPUTED_GOTO - Failed
-- Performing Test HAVE_GC_SECTIONS
-- Performing Test HAVE_GC_SECTIONS - Failed
-- Performing Test HAVE_ICF
-- Performing Test HAVE_ICF - Failed
-- Found the following ICU libraries:
--   uc (required)
--   i18n (required)
--   uc (required)
-- The following ICU libraries were not found:
--   data (required)
-- Failed to find all ICU components (missing: ICU_INCLUDE_DIR _ICU_REQUIRED_LIBS_FOUND) (Required is at least version "52")
-- Looking for dlfcn.h
-- Looking for dlfcn.h - not found
-- Looking for errno.h
-- Looking for errno.h - found
-- Looking for fcntl.h
-- Looking for fcntl.h - found
-- Looking for link.h
-- Looking for link.h - not found
-- Looking for malloc.h
-- Looking for malloc.h - found
-- Looking for malloc/malloc.h
-- Looking for malloc/malloc.h - not found
-- Looking for signal.h
-- Looking for signal.h - found
-- Looking for sys/ioctl.h
-- Looking for sys/ioctl.h - not found
-- Looking for sys/mman.h
-- Looking for sys/mman.h - not found
-- Looking for sys/param.h
-- Looking for sys/param.h - not found
-- Looking for sys/resource.h
-- Looking for sys/resource.h - not found
-- Looking for sys/stat.h
-- Looking for sys/stat.h - found
-- Looking for sys/time.h
-- Looking for sys/time.h - not found
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for termios.h
-- Looking for termios.h - not found
-- Looking for unistd.h
-- Looking for unistd.h - not found
-- Looking for valgrind/valgrind.h
-- Looking for valgrind/valgrind.h - not found
-- Looking for zlib.h
-- Looking for zlib.h - not found
-- Looking for fenv.h
-- Looking for fenv.h - found
-- Looking for FE_ALL_EXCEPT
-- Looking for FE_ALL_EXCEPT - found
-- Looking for FE_INEXACT
-- Looking for FE_INEXACT - found
-- Looking for mach/mach.h
-- Looking for mach/mach.h - not found
-- Looking for histedit.h
-- Looking for histedit.h - not found
-- Looking for CrashReporterClient.h
-- Looking for CrashReporterClient.h - not found
-- Looking for xar_open in xar
-- Looking for xar_open in xar - not found
-- Looking for arc4random
-- Looking for arc4random - not found
-- Looking for backtrace
-- Looking for backtrace - not found
-- Could NOT find Backtrace (missing: Backtrace_LIBRARY Backtrace_INCLUDE_DIR)
-- Performing Test C_SUPPORTS_WERROR_UNGUARDED_AVAILABILITY_NEW
-- Performing Test C_SUPPORTS_WERROR_UNGUARDED_AVAILABILITY_NEW - Failed
-- Looking for _Unwind_Backtrace
-- Looking for _Unwind_Backtrace - not found
-- Looking for getpagesize
-- Looking for getpagesize - not found
-- Looking for sysconf
-- Looking for sysconf - not found
-- Looking for getrusage
-- Looking for getrusage - not found
-- Looking for setrlimit
-- Looking for setrlimit - not found
-- Looking for isatty
-- Looking for isatty - not found
-- Looking for futimens
-- Looking for futimens - not found
-- Looking for futimes
-- Looking for futimes - not found
-- Looking for posix_fallocate
-- Looking for posix_fallocate - not found
-- Looking for sigaltstack
-- Looking for sigaltstack - not found
-- Looking for lseek64
-- Looking for lseek64 - not found
-- Looking for mallctl
-- Looking for mallctl - not found
-- Looking for mallinfo
-- Looking for mallinfo - not found
-- Looking for malloc_zone_statistics
-- Looking for malloc_zone_statistics - not found
-- Looking for getrlimit
-- Looking for getrlimit - not found
-- Looking for posix_spawn
-- Looking for posix_spawn - not found
-- Looking for pread
-- Looking for pread - not found
-- Looking for realpath
-- Looking for realpath - not found
-- Looking for sbrk
-- Looking for sbrk - not found
-- Looking for strerror
-- Looking for strerror - found
-- Looking for strerror_r
-- Looking for strerror_r - not found
-- Looking for strerror_s
-- Looking for strerror_s - found
-- Looking for setenv
-- Looking for setenv - not found
-- Looking for _chsize_s
-- Looking for _chsize_s - found
-- Looking for _alloca
-- Looking for _alloca - not found
-- Looking for __alloca
-- Looking for __alloca - not found
-- Looking for __chkstk
-- Looking for __chkstk - not found
-- Looking for __chkstk_ms
-- Looking for __chkstk_ms - not found
-- Looking for ___chkstk
-- Looking for ___chkstk - not found
-- Looking for ___chkstk_ms
-- Looking for ___chkstk_ms - not found
-- Looking for __ashldi3
-- Looking for __ashldi3 - not found
-- Looking for __ashrdi3
-- Looking for __ashrdi3 - not found
-- Looking for __divdi3
-- Looking for __divdi3 - not found
-- Looking for __fixdfdi
-- Looking for __fixdfdi - not found
-- Looking for __fixsfdi
-- Looking for __fixsfdi - not found
-- Looking for __floatdidf
-- Looking for __floatdidf - not found
-- Looking for __lshrdi3
-- Looking for __lshrdi3 - not found
-- Looking for __moddi3
-- Looking for __moddi3 - not found
-- Looking for __udivdi3
-- Looking for __udivdi3 - not found
-- Looking for __umoddi3
-- Looking for __umoddi3 - not found
-- Looking for __main
-- Looking for __main - not found
-- Looking for __cmpdi2
-- Looking for __cmpdi2 - not found
-- Looking for __GLIBC__
-- Looking for __GLIBC__ - not found
-- Looking for sched_getaffinity
-- Looking for sched_getaffinity - not found
-- Looking for CPU_COUNT
-- Looking for CPU_COUNT - not found
-- Performing Test LLVM_HAS_ATOMICS
-- Performing Test LLVM_HAS_ATOMICS - Success
-- Performing Test SUPPORTS_NO_PIE_FLAG
-- Performing Test SUPPORTS_NO_PIE_FLAG - Failed
-- Performing Test SUPPORTS_VARIADIC_MACROS_FLAG
-- Performing Test SUPPORTS_VARIADIC_MACROS_FLAG - Failed
-- Performing Test SUPPORTS_GNU_ZERO_VARIADIC_MACRO_ARGUMENTS_FLAG
-- Performing Test SUPPORTS_GNU_ZERO_VARIADIC_MACRO_ARGUMENTS_FLAG - Failed
-- Threads enabled.
-- Doxygen disabled.
-- Go bindings disabled.
-- 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 = Windows
-- CMAKE_SYSTEM_NAME = Windows
-- HERMES_APPLE_TARGET_PLATFORM =
-- CMAKE_CROSSCOMPILING = FALSE
-- Looking for readline
-- Looking for readline - not found
-- Configuring done
-- Generating done
-- Build files have been written to: D:/exp/AwesomeTSProject/node_modules/react-native/ReactAndroid/hermes-engine/build/hermes

> Task :ReactAndroid:hermes-engine:buildHermes
Scanning dependencies of target LLVHDemangle
[  0%] Building CXX object external/llvh/lib/Demangle/CMakeFiles/LLVHDemangle.dir/ItaniumDemangle.cpp.obj
ItaniumDemangle.cpp
[  0%] Building CXX object external/llvh/lib/Demangle/CMakeFiles/LLVHDemangle.dir/MicrosoftDemangle.cpp.obj
MicrosoftDemangle.cpp
[  0%] Building CXX object external/llvh/lib/Demangle/CMakeFiles/LLVHDemangle.dir/MicrosoftDemangleNodes.cpp.obj
MicrosoftDemangleNodes.cpp
[  3%] Linking CXX static library LLVHDemangle.lib
[  3%] Built target LLVHDemangle
Scanning dependencies of target LLVHSupport
[  3%] Building CXX object external/llvh/lib/Support/CMakeFiles/LLVHSupport.dir/APFloat.cpp.obj
APFloat.cpp
[  3%] Building CXX object external/llvh/lib/Support/CMakeFiles/LLVHSupport.dir/APInt.cpp.obj
APInt.cpp
[  3%] Building CXX object external/llvh/lib/Support/CMakeFiles/LLVHSupport.dir/circular_raw_ostream.cpp.obj
circular_raw_ostream.cpp
[  3%] Building CXX object external/llvh/lib/Support/CMakeFiles/LLVHSupport.dir/CommandLine.cpp.obj
CommandLine.cpp
[  3%] Building CXX object external/llvh/lib/Support/CMakeFiles/LLVHSupport.dir/ConvertUTF.cpp.obj
ConvertUTF.cpp
...........
[ 90%] Building CXX object lib/BCGen/HBC/CMakeFiles/hermesHBCBackend.dir/StringKind.cpp.obj
StringKind.cpp
[ 90%] Building CXX object lib/BCGen/HBC/CMakeFiles/hermesHBCBackend.dir/TraverseLiteralStrings.cpp.obj
TraverseLiteralStrings.cpp
[ 90%] Building CXX object lib/BCGen/HBC/CMakeFiles/hermesHBCBackend.dir/UniquingFilenameTable.cpp.obj
UniquingFilenameTable.cpp
[ 90%] Building CXX object lib/BCGen/HBC/CMakeFiles/hermesHBCBackend.dir/UniquingStringLiteralTable.cpp.obj
UniquingStringLiteralTable.cpp
[ 90%] Building CXX object lib/BCGen/HBC/CMakeFiles/hermesHBCBackend.dir/Passes/FuncCallNOpts.cpp.obj
FuncCallNOpts.cpp
[ 93%] Building CXX object lib/BCGen/HBC/CMakeFiles/hermesHBCBackend.dir/Passes/InsertProfilePoint.cpp.obj
InsertProfilePoint.cpp
[ 93%] Building CXX object lib/BCGen/HBC/CMakeFiles/hermesHBCBackend.dir/Passes/LowerBuiltinCalls.cpp.obj
LowerBuiltinCalls.cpp
[ 93%] Building CXX object lib/BCGen/HBC/CMakeFiles/hermesHBCBackend.dir/Passes/OptEnvironmentInit.cpp.obj
OptEnvironmentInit.cpp
[ 93%] Linking CXX static library hermesHBCBackend.lib
[ 93%] Built target hermesHBCBackend
Scanning dependencies of target zip
[ 93%] Building C object external/zip/CMakeFiles/zip.dir/src/zip.c.obj
zip.c
[ 96%] Linking C static library zip.lib
[ 96%] Built target zip
Scanning dependencies of target hermesCompilerDriver
[100%] Building CXX object lib/CompilerDriver/CMakeFiles/hermesCompilerDriver.dir/CompilerDriver.cpp.obj
CompilerDriver.cpp
[100%] Linking CXX static library hermesCompilerDriver.lib
[100%] Built target hermesCompilerDriver
Scanning dependencies of target hermesc
[100%] Building CXX object tools/hermesc/CMakeFiles/hermesc.dir/hermesc.cpp.obj
hermesc.cpp
[100%] Linking CXX executable ..\..\bin\hermesc.exe
[100%] Built target hermesc

> Task :ReactAndroid:configureCMakeDebug[arm64-v8a]
C/C++: debug|arm64-v8a :CMake Warning in D:/exp/AwesomeTSProject/node_modules/react-native/ReactCommon/react/renderer/components/progressbar/CMakeLists.txt:
C/C++: debug|arm64-v8a :  The object file directory
C/C++: debug|arm64-v8a :    D:/exp/AwesomeTSProject/node_modules/react-native/ReactAndroid/.cxx/Debug/o4v1s5x3/arm64-v8a/ReactCommon/react/renderer/components/progressbar/CMakeFiles/rrc_progressbar.dir/./
C/C++: debug|arm64-v8a :  has 176 characters.  The maximum full path to an object file is 250
C/C++: debug|arm64-v8a :  characters (see CMAKE_OBJECT_PATH_MAX).  Object file
C/C++: debug|arm64-v8a :    android/react/renderer/components/progressbar/AndroidProgressBarMeasurementsManager.cpp.o
C/C++: debug|arm64-v8a :  cannot be safely placed under this directory.  The build may not work
C/C++: debug|arm64-v8a :  correctly.

> Task :ReactAndroid:hermes-engine:buildCMakeRelease[arm64-v8a][libhermes]
....

> Task :ReactAndroid:downloadLibevent UP-TO-DATE
Download https://github.com/libevent/libevent/releases/download/release-2.1.12-stable/libevent-2.1.12-stable.tar.gz

> Task :ReactAndroid:hermes-engine:downloadHermes UP-TO-DATE
Download https://github.com/facebook/hermes/tarball/hermes-2022-09-14-RNv0.70.1-2a6b111ab289b55d7b78b5fdf105f466ba270fd7

> Task :ReactAndroid:hermes-engine:configureBuildForHermes
-- Found the following ICU libraries:
--   uc (required)
--   i18n (required)
--   uc (required)
-- The following ICU libraries were not found:
--   data (required)
-- Failed to find all ICU components (missing: ICU_INCLUDE_DIR _ICU_REQUIRED_LIBS_FOUND) (Required is at least version "52")
-- Could NOT find Backtrace (missing: Backtrace_LIBRARY Backtrace_INCLUDE_DIR)
-- Threads enabled.
-- Doxygen disabled.
-- Go bindings disabled.
-- 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 = Windows
-- CMAKE_SYSTEM_NAME = Windows
-- HERMES_APPLE_TARGET_PLATFORM =
-- CMAKE_CROSSCOMPILING = FALSE
-- Configuring done
-- Generating done
-- Build files have been written to: D:/exp/AwesomeTSProject/node_modules/react-native/ReactAndroid/hermes-engine/build/hermes

> Task :ReactAndroid:hermes-engine:buildHermes
[  3%] Built target LLVHDemangle
.....
[100%] Built target hermesc

> Task :ReactAndroid:hermes-engine:buildCMakeRelease[x86][libhermes]
C/C++: ninja: Entering directory `D:\exp\AwesomeTSProject\node_modules\react-native\ReactAndroid\hermes-engine\.cxx\Release\614a206x\x86'
C/C++: D:/exp/AwesomeTSProject/node_modules/react-native/sdks/hermes/lib/VM/JSLib/TypedArray.cpp:412:22: warning: unused variable 'noAllocs' [-Wunused-variable]
C/C++: Hard link from 'C:\Users\mak13\.gradle\caches\transforms-3\e258d4e9214f081c386cfad7c7fc7cc4\transformed\jetified-fbjni-0.2.2\prefab\modules\fbjni\libs\android.x86\libfbjni.so' to 'D:\exp\AwesomeTSProject\node_modules\react-native\ReactAndroid\hermes-engine\build\intermediates\cxx\Release\614a206x\obj\x86\libfbjni.so' failed. Doing a slower copy instead.
C/C++: Hard link from 'C:\Users\mak13\.gradle\caches\transforms-3\e258d4e9214f081c386cfad7c7fc7cc4\transformed\jetified-fbjni-0.2.2\prefab\modules\fbjni\libs\android.x86\libfbjni.so' to 'D:\exp\AwesomeTSProject\node_modules\react-native\ReactAndroid\hermes-engine\build\intermediates\cxx\Release\614a206x\obj\x86\libfbjni.so' failed. Doing a slower copy instead.
C/C++: Hard link from 'C:\Users\mak13\AppData\Local\Android\Sdk\ndk\21.4.7075529\toolchains\llvm\prebuilt\windows-x86_64\sysroot\usr\lib\i686-linux-android\libc++_shared.so' to 'D:\exp\AwesomeTSProject\node_modules\react-native\ReactAndroid\hermes-engine\build\intermediates\cxx\Release\614a206x\obj\x86\libc++_shared.so' failed. Doing a slower copy instead.
C/C++: Hard link from 'C:\Users\mak13\AppData\Local\Android\Sdk\ndk\21.4.7075529\toolchains\llvm\prebuilt\windows-x86_64\sysroot\usr\lib\i686-linux-android\libc++_shared.so' to 'D:\exp\AwesomeTSProject\node_modules\react-native\ReactAndroid\hermes-engine\build\intermediates\cxx\Release\614a206x\obj\x86\libc++_shared.so' failed. Doing a slower copy instead.

> Task :ReactAndroid:hermes-engine:buildCMakeRelease[x86_64][libhermes]
C/C++: CMake Deprecation Warning at CMakeLists.txt:42 (cmake_policy):
C/C++:   The OLD behavior for policy CMP0026 will be removed from a future version
C/C++:   of CMake.
C/C++:   The cmake-policies(7) manual explains that the OLD behaviors of all
C/C++:   policies are deprecated and that a policy should be set to OLD only under
C/C++:   specific short-term circumstances.  Projects should be ported to the NEW
C/C++:   behavior and not rely on setting a policy to OLD.
C/C++: CMake Warning at external/llvh/cmake/modules/GetHostTriple.cmake:18 (message):
C/C++:   LLVM_HOST_TRIPLE can't be computed on Windows with this toolchain
C/C++: Call Stack (most recent call first):
C/C++:   external/llvh/cmake/config-ix.cmake:360 (get_host_triple)
C/C++:   external/llvh/CMakeLists.txt:21 (include)
C/C++: ninja: Entering directory `D:\exp\AwesomeTSProject\node_modules\react-native\ReactAndroid\hermes-engine\.cxx\Release\614a206x\x86_64'
C/C++: D:/exp/AwesomeTSProject/node_modules/react-native/sdks/hermes/lib/VM/JSLib/TypedArray.cpp:412:22: warning: unused variable 'noAllocs' [-Wunused-variable]
C/C++: Hard link from 'C:\Users\mak13\.gradle\caches\transforms-3\e258d4e9214f081c386cfad7c7fc7cc4\transformed\jetified-fbjni-0.2.2\prefab\modules\fbjni\libs\android.x86_64\libfbjni.so' to 'D:\exp\AwesomeTSProject\node_modules\react-native\ReactAndroid\hermes-engine\build\intermediates\cxx\Release\614a206x\obj\x86_64\libfbjni.so' failed. Doing a slower copy instead.
C/C++: Hard link from 'C:\Users\mak13\.gradle\caches\transforms-3\e258d4e9214f081c386cfad7c7fc7cc4\transformed\jetified-fbjni-0.2.2\prefab\modules\fbjni\libs\android.x86_64\libfbjni.so' to 'D:\exp\AwesomeTSProject\node_modules\react-native\ReactAndroid\hermes-engine\build\intermediates\cxx\Release\614a206x\obj\x86_64\libfbjni.so' failed. Doing a slower copy instead.
C/C++: Hard link from 'C:\Users\mak13\AppData\Local\Android\Sdk\ndk\21.4.7075529\toolchains\llvm\prebuilt\windows-x86_64\sysroot\usr\lib\x86_64-linux-android\libc++_shared.so' to 'D:\exp\AwesomeTSProject\node_modules\react-native\ReactAndroid\hermes-engine\build\intermediates\cxx\Release\614a206x\obj\x86_64\libc++_shared.so' failed. Doing a slower copy instead.
C/C++: Hard link from 'C:\Users\mak13\AppData\Local\Android\Sdk\ndk\21.4.7075529\toolchains\llvm\prebuilt\windows-x86_64\sysroot\usr\lib\x86_64-linux-android\libc++_shared.so' to 'D:\exp\AwesomeTSProject\node_modules\react-native\ReactAndroid\hermes-engine\build\intermediates\cxx\Release\614a206x\obj\x86_64\libc++_shared.so' failed. Doing a slower copy instead.

> Task :ReactAndroid:hermes-engine:externalNativeBuildDebug
C/C++: Hard link from 'C:\Users\mak13\.gradle\caches\transforms-3\e258d4e9214f081c386cfad7c7fc7cc4\transformed\jetified-fbjni-0.2.2\prefab\modules\fbjni\libs\android.armeabi-v7a\libfbjni.so' to 'D:\exp\AwesomeTSProject\node_modules\react-native\ReactAndroid\hermes-engine\build\intermediates\cmake\debug\obj\armeabi-v7a\libfbjni.so' failed. Doing a slower copy instead.
C/C++: Hard link from 'C:\Users\mak13\.gradle\caches\transforms-3\e258d4e9214f081c386cfad7c7fc7cc4\transformed\jetified-fbjni-0.2.2\prefab\modules\fbjni\libs\android.armeabi-v7a\libfbjni.so' to 'D:\exp\AwesomeTSProject\node_modules\react-native\ReactAndroid\hermes-engine\build\intermediates\cmake\debug\obj\armeabi-v7a\libfbjni.so' failed. Doing a slower copy instead.
C/C++: Hard link from 'C:\Users\mak13\.gradle\caches\transforms-3\e258d4e9214f081c386cfad7c7fc7cc4\transformed\jetified-fbjni-0.2.2\prefab\modules\fbjni\libs\android.arm64-v8a\libfbjni.so' to 'D:\exp\AwesomeTSProject\node_modules\react-native\ReactAndroid\hermes-engine\build\intermediates\cmake\debug\obj\arm64-v8a\libfbjni.so' failed. Doing a slower copy instead.
C/C++: Hard link from 'C:\Users\mak13\.gradle\caches\transforms-3\e258d4e9214f081c386cfad7c7fc7cc4\transformed\jetified-fbjni-0.2.2\prefab\modules\fbjni\libs\android.arm64-v8a\libfbjni.so' to 'D:\exp\AwesomeTSProject\node_modules\react-native\ReactAndroid\hermes-engine\build\intermediates\cmake\debug\obj\arm64-v8a\libfbjni.so' failed. Doing a slower copy instead.
C/C++: Hard link from 'C:\Users\mak13\.gradle\caches\transforms-3\e258d4e9214f081c386cfad7c7fc7cc4\transformed\jetified-fbjni-0.2.2\prefab\modules\fbjni\libs\android.x86\libfbjni.so' to 'D:\exp\AwesomeTSProject\node_modules\react-native\ReactAndroid\hermes-engine\build\intermediates\cmake\debug\obj\x86\libfbjni.so' failed. Doing a slower copy instead.
C/C++: Hard link from 'C:\Users\mak13\.gradle\caches\transforms-3\e258d4e9214f081c386cfad7c7fc7cc4\transformed\jetified-fbjni-0.2.2\prefab\modules\fbjni\libs\android.x86\libfbjni.so' to 'D:\exp\AwesomeTSProject\node_modules\react-native\ReactAndroid\hermes-engine\build\intermediates\cmake\debug\obj\x86\libfbjni.so' failed. Doing a slower copy instead.
C/C++: Hard link from 'C:\Users\mak13\.gradle\caches\transforms-3\e258d4e9214f081c386cfad7c7fc7cc4\transformed\jetified-fbjni-0.2.2\prefab\modules\fbjni\libs\android.x86_64\libfbjni.so' to 'D:\exp\AwesomeTSProject\node_modules\react-native\ReactAndroid\hermes-engine\build\intermediates\cmake\debug\obj\x86_64\libfbjni.so' failed. Doing a slower copy instead.
C/C++: Hard link from 'C:\Users\mak13\.gradle\caches\transforms-3\e258d4e9214f081c386cfad7c7fc7cc4\transformed\jetified-fbjni-0.2.2\prefab\modules\fbjni\libs\android.x86_64\libfbjni.so' to 'D:\exp\AwesomeTSProject\node_modules\react-native\ReactAndroid\hermes-engine\build\intermediates\cmake\debug\obj\x86_64\libfbjni.so' failed. Doing a slower copy instead.
C/C++: Hard link from 'C:\Users\mak13\AppData\Local\Android\Sdk\ndk\21.4.7075529\toolchains\llvm\prebuilt\windows-x86_64\sysroot\usr\lib\arm-linux-androideabi\libc++_shared.so' to 'D:\exp\AwesomeTSProject\node_modules\react-native\ReactAndroid\hermes-engine\build\intermediates\cmake\debug\obj\armeabi-v7a\libc++_shared.so' failed. Doing a slower copy instead.
C/C++: Hard link from 'C:\Users\mak13\AppData\Local\Android\Sdk\ndk\21.4.7075529\toolchains\llvm\prebuilt\windows-x86_64\sysroot\usr\lib\arm-linux-androideabi\libc++_shared.so' to 'D:\exp\AwesomeTSProject\node_modules\react-native\ReactAndroid\hermes-engine\build\intermediates\cmake\debug\obj\armeabi-v7a\libc++_shared.so' failed. Doing a slower copy instead.
C/C++: Hard link from 'C:\Users\mak13\AppData\Local\Android\Sdk\ndk\21.4.7075529\toolchains\llvm\prebuilt\windows-x86_64\sysroot\usr\lib\aarch64-linux-android\libc++_shared.so' to 'D:\exp\AwesomeTSProject\node_modules\react-native\ReactAndroid\hermes-engine\build\intermediates\cmake\debug\obj\arm64-v8a\libc++_shared.so' failed. Doing a slower copy instead.
C/C++: Hard link from 'C:\Users\mak13\AppData\Local\Android\Sdk\ndk\21.4.7075529\toolchains\llvm\prebuilt\windows-x86_64\sysroot\usr\lib\aarch64-linux-android\libc++_shared.so' to 'D:\exp\AwesomeTSProject\node_modules\react-native\ReactAndroid\hermes-engine\build\intermediates\cmake\debug\obj\arm64-v8a\libc++_shared.so' failed. Doing a slower copy instead.
C/C++: Hard link from 'C:\Users\mak13\AppData\Local\Android\Sdk\ndk\21.4.7075529\toolchains\llvm\prebuilt\windows-x86_64\sysroot\usr\lib\i686-linux-android\libc++_shared.so' to 'D:\exp\AwesomeTSProject\node_modules\react-native\ReactAndroid\hermes-engine\build\intermediates\cmake\debug\obj\x86\libc++_shared.so' failed. Doing a slower copy instead.
C/C++: Hard link from 'C:\Users\mak13\AppData\Local\Android\Sdk\ndk\21.4.7075529\toolchains\llvm\prebuilt\windows-x86_64\sysroot\usr\lib\i686-linux-android\libc++_shared.so' to 'D:\exp\AwesomeTSProject\node_modules\react-native\ReactAndroid\hermes-engine\build\intermediates\cmake\debug\obj\x86\libc++_shared.so' failed. Doing a slower copy instead.
C/C++: Hard link from 'C:\Users\mak13\AppData\Local\Android\Sdk\ndk\21.4.7075529\toolchains\llvm\prebuilt\windows-x86_64\sysroot\usr\lib\x86_64-linux-android\libc++_shared.so' to 'D:\exp\AwesomeTSProject\node_modules\react-native\ReactAndroid\hermes-engine\build\intermediates\cmake\debug\obj\x86_64\libc++_shared.so' failed. Doing a slower copy instead.
C/C++: Hard link from 'C:\Users\mak13\AppData\Local\Android\Sdk\ndk\21.4.7075529\toolchains\llvm\prebuilt\windows-x86_64\sysroot\usr\lib\x86_64-linux-android\libc++_shared.so' to 'D:\exp\AwesomeTSProject\node_modules\react-native\ReactAndroid\hermes-engine\build\intermediates\cmake\debug\obj\x86_64\libc++_shared.so' failed. Doing a slower copy instead.

> Task :ReactAndroid:buildCMakeDebug[arm64-v8a][fabricjni,hermes-executor-debug,etc] FAILED

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.1/userguide/command_line_interface.html#sec:command_line_warnings
39 actionable tasks: 14 executed, 25 up-to-date
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.

Using Windows 10 built-in ICU
Warning: NMake does not support parallel builds. Ignoring parallel build command line option.

FAILURE: Build completed with 2 failures.

1: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':ReactAndroid:buildCMakeDebug[arm64-v8a][fabricjni,hermes-executor-debug,etc]'.
> Build command failed.
  Error while executing process C:\Users\mak13\AppData\Local\Android\Sdk\cmake\3.18.1\bin\ninja.exe with arguments {-C D:\exp\AwesomeTSProject\node_modules\react-native\ReactAndroid\.cxx\Debug\o4v1s5x3\arm64-v8a fabricjni hermes-executor-debug jscexecutor jsijniprofiler reactnativeblob reactnativejni reactperfloggerjni turbomodulejsijni}
  ninja: Entering directory `D:\exp\AwesomeTSProject\node_modules\react-native\ReactAndroid\.cxx\Debug\o4v1s5x3\arm64-v8a'
  [0/2] Re-checking globbed directories...
  [1/422] Building ASM object build/third-party-ndk/boost/CMakeFiles/boost.dir/asm/arm64-v8a/ontop_arm64_aapcs_elf_gas.S.o
  .....
  C:\Users\mak13\AppData\Local\Android\Sdk\ndk\21.4.7075529\toolchains\llvm\prebuilt\windows-x86_64\bin\aarch64-linux-android-ar.exe: ReactCommon/react/renderer/components/progressbar/CMakeFiles/rrc_progressbar.dir/android/react/renderer/components/progressbar/AndroidProgressBarMeasurementsManager.cpp.o: No such file or directory
  [417/422] Linking CXX static library ReactCommon\react\renderer\components\switch\librrc_switch.a
  [418/422] Linking CXX static library ReactCommon\react\renderer\components\modal\librrc_modal.a
  [419/422] Linking CXX static library ReactCommon\react\renderer\components\slider\librrc_slider.a
  [420/422] Linking CXX shared library D:\exp\AwesomeTSProject\node_modules\react-native\ReactAndroid\build\intermediates\cxx\Debug\o4v1s5x3\obj\arm64-v8a\libhermes-executor-debug.so
  [421/422] Building CXX object ReactAndroid/src/main/java/com/facebook/react/fabric/jni/CMakeFiles/fabricjni.dir/CoreComponentsRegistry.cpp.o
  ninja: build stopped: subcommand failed.

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

2: Task failed with an exception.
-----------
* What went wrong:
java.lang.StackOverflowError (no error message)

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

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

BUILD FAILED in 23m 54s

error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup.
Error: Command failed: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081
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.

Using Windows 10 built-in ICU
Warning: NMake does not support parallel builds. Ignoring parallel build command line option.

FAILURE: Build completed with 2 failures.

1: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':ReactAndroid:buildCMakeDebug[arm64-v8a][fabricjni,hermes-executor-debug,etc]'.
> Build command failed.
  Error while executing process C:\Users\mak13\AppData\Local\Android\Sdk\cmake\3.18.1\bin\ninja.exe with arguments {-C D:\exp\AwesomeTSProject\node_modules\react-native\ReactAndroid\.cxx\Debug\o4v1s5x3\arm64-v8a fabricjni hermes-executor-debug jscexecutor jsijniprofiler reactnativeblob reactnativejni reactperfloggerjni turbomodulejsijni}
  ninja: Entering directory `D:\exp\AwesomeTSProject\node_modules\react-native\ReactAndroid\.cxx\Debug\o4v1s5x3\arm64-v8a'
  [0/2] Re-checking globbed directories...
 ....
ReactAndroid/src/main/java/com/facebook/react/fabric/jni/CMakeFiles/fabricjni.dir/CoreComponentsRegistry.cpp.o
  ninja: build stopped: subcommand failed.

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

2: Task failed with an exception.
-----------
* What went wrong:
java.lang.StackOverflowError (no error message)

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

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

BUILD FAILED in 23m 54s

    at makeError (D:\exp\AwesomeTSProject\node_modules\execa\index.js:174:9)
    at D:\exp\AwesomeTSProject\node_modules\execa\index.js:278:16
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async runOnAllDevices (D:\exp\AwesomeTSProject\node_modules\@react-native-community\cli-platform-android\build\commands\runAndroid\runOnAllDevices.js:109:5)
    at async Command.handleAction (D:\exp\AwesomeTSProject\node_modules\@react-native-community\cli\build\index.js:142:9)
info Run CLI with --verbose flag for more details.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Version

0.70.4

Output of npx react-native info

System: OS: Windows 10 10.0.22621 CPU: (8) x64 Intel(R) Core(TM) i5-8300H CPU @ 2.30GHz Memory: 9.36 GB / 23.85 GB Binaries: Node: 16.15.1 - C:\Program Files\nodejs\node.EXE Yarn: 1.22.17 - ~\AppData\Roaming\npm\yarn.CMD npm: 8.19.2 - C:\Program Files\nodejs\npm.CMD Watchman: 20210110.135312.0 - C:\ProgramData\chocolatey\bin\watchman.EXE SDKs: Android SDK: API Levels: 27, 28, 29, 30, 31, 32, 33 Build Tools: 27.0.1, 28.0.3, 29.0.2, 30.0.2, 30.0.3, 31.0.0, 32.0.0, 33.0.0 System Images: android-29 | Google APIs Intel x86 Atom, android-30 | Google APIs Intel x86 Atom, android-31 | Google APIs Intel x86 Atom_64 Android NDK: Not Found Windows SDK: AllowDevelopmentWithoutDevLicense: Enabled AllowAllTrustedApps: Enabled Versions: 10.0.19041.0, 10.0.22621.0 IDEs: Android Studio: Version 2020.3.0.0 AI-203.7717.56.2031.7678000 Visual Studio: 17.3.32922.545 (Visual Studio Community 2022) Languages: Java: 1.8.0_302 - C:\Program Files\OpenJDK\openjdk-8u302-b08\bin\javac.EXE npmPackages: @react-native-community/cli: Not Found react: 18.1.0 => 18.1.0 react-native: 0.70.2 => 0.70.2 react-native-windows: Not Found npmGlobalPackages: react-native: Not Found

Steps to reproduce

Install using npx react-native init AwesomeTSProject --template react-native-template-typescript Enable the new architecture by setting newArchEnabled=true in build.properties cd android ./gradlew clean cd .. yarn android (in visual studio powershell)

Snack, code example, screenshot, or link to a repository

I haven't changed any piece of code in js. Just a simple install and run.

cortinico commented 2 years ago

react-native: 0.70.2 => 0.70.2

You should update to 0.70.3 as we fixed this specific Windows issue in this version

ADRE9 commented 2 years ago

react-native: 0.70.2 => 0.70.2

You should update to 0.70.3 as we fixed this specific Windows issue in this version

I tried running it with 0.70.3, it runs successfully . Thank you.