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

[CI] [Linux] RN 0.68.0-1 AGP 7.1.1 :ReactAndroid:configureNdkBuildDebug failing #33586

Closed
leotm opened this issue Apr 7, 2022 · 5 comments
Closed
Labels
Platform: Android Android applications. Platform: Linux Building on Linux. Type: New Architecture Issues and PRs related to new architecture (Fabric/Turbo Modules)

Comments

@leotm
Copy link
Contributor

leotm commented Apr 7, 2022

Description

RN New Arch on ubuntu-latest Ubuntu 20.04.4 LTS, AGP 7.1.1, Build Tools 31.0.0, NDK 21/24

> Task :ReactAndroid:configureNdkBuildDebug[<arch>] FAILED
C/C++: /home/runner/work/react-native-template-new-architecture/react-native-template-new-architecture/node_modules/react-native/ReactAndroid/../ReactCommon/butter/Android.mk:28: *** Android NDK: Aborting.    .  Stop.

FAILURE: Build failed with an exception.

Execution failed for task ':ReactAndroid:configureNdkBuildDebug[<arch>]'.
> [CXX1405] error when building with ndkBuild using /home/runner/work/react-native-template-new-architecture/react-native-template-new-architecture/node_modules/react-native/ReactAndroid/src/main/jni/react/jni/Android.mk: Build command failed.
  Error while executing process /usr/local/lib/android/sdk/ndk/[21](https://github.com/leotm/react-native-template-new-architecture/runs/5997822205?check_suite_focus=true#step:13:21).4.7075529/ndk-build with arguments {NDK_PROJECT_PATH=null APP_BUILD_SCRIPT=/home/runner/work/react-native-template-new-architecture/react-native-template-new-architecture/node_modules/react-native/ReactAndroid/src/main/jni/react/jni/Android.mk APP_ABI=arm64-v8a NDK_ALL_ABIS=arm64-v8a NDK_DEBUG=1 APP_PLATFORM=android-21 NDK_OUT=/home/runner/work/react-native-template-new-architecture/react-native-template-new-architecture/node_modules/react-native/ReactAndroid/build/intermediates/cxx/Debug/563[25](https://github.com/leotm/react-native-template-new-architecture/runs/5997822205?check_suite_focus=true#step:13:25)o5v/obj NDK_LIBS_OUT=/home/runner/work/react-native-template-new-architecture/react-native-template-new-architecture/node_modules/react-native/ReactAndroid/build/intermediates/cxx/Debug/56325o5v/lib NDK_APPLICATION_MK=/home/runner/work/react-native-template-new-architecture/react-native-template-new-architecture/node_modules/react-native/ReactAndroid/src/main/jni/Application.mk THIRD_PARTY_NDK_DIR=/home/runner/work/react-native-template-new-architecture/react-native-template-new-architecture/node_modules/react-native/ReactAndroid/build/third-party-ndk REACT_COMMON_DIR=/home/runner/work/react-native-template-new-architecture/react-native-template-new-architecture/node_modules/react-native/ReactAndroid/../ReactCommon REACT_GENERATED_SRC_DIR=/home/runner/work/react-native-template-new-architecture/react-native-template-new-architecture/node_modules/react-native/ReactAndroid/build/generated/source REACT_SRC_DIR=/home/runner/work/react-native-template-new-architecture/react-native-template-new-architecture/node_modules/react-native/ReactAndroid/src/main/java/com/facebook/react -j2 APP_SHORT_COMMANDS=false LOCAL_SHORT_COMMANDS=false -B -n}

7 actionable tasks: 1 executed, 6 up-to-date
  Android NDK: WARNING: Ignoring unknown import directory: /home/runner/work/react-native-template-new-architecture/react-native-template-new-architecture/node_modules/react-native/ReactAndroid/build/generated/source    
  Android NDK: /home/runner/work/react-native-template-new-architecture/react-native-template-new-architecture/node_modules/react-native/ReactAndroid/../ReactCommon/butter/Android.mk: Cannot find module with tag 'glog' in import path    
  Android NDK: Are you sure your NDK_MODULE_PATH variable is properly defined ?    
  Android NDK: The following directories were searched:    
  Android NDK:         
  
  /home/runner/work/react-native-template-new-architecture/react-native-template-new-architecture/node_modules/react-native/ReactAndroid/../ReactCommon/butter/Android.mk:[28](https://github.com/leotm/react-native-template-new-architecture/runs/5997822205?check_suite_focus=true#step:13:28): *** Android NDK: Aborting.    .  Stop.

Full notes/logs

Tried

Edit: Ok AGP 7.0.4 works

(macos 12.3 - 12.4 Beta 2 fine locally)

Version

0.68.0-1

Output of npx react-native info

System:
OS: Linux 5.13 Ubuntu 20.04.4 LTS (Focal Fossa)
CPU: (2) x64 Intel(R) Xeon(R) Platinum 8171M CPU @ 2.60GHz
Memory: 5.80 GB / 6.78 GB
Shell: 5.0.17 - /bin/bash
Binaries:
Node: 16.14.2 - /usr/local/bin/node
Yarn: 3.2.0 - /usr/local/bin/yarn
npm: 8.5.0 - /usr/local/bin/npm
Watchman: Not Found
SDKs:
Android SDK:
API Levels: 27, 28, 29, 30, 31, 32
Build Tools: 27.0.0, 27.0.1, 27.0.2, 27.0.3, 28.0.0, 28.0.1, 28.0.2, 28.0.3, 29.0.0, 29.0.1, 29.0.2, 29.0.3, 30.0.0, 30.0.1, 30.0.2, 30.0.3, 31.0.0, 32.0.0
Android NDK: 21.4.7075529 (always shown, even when 24.0.8215888 forced and used to build)
IDEs:
Android Studio: Not Found
Languages:
Java: 11.0.14.1 - /opt/hostedtoolcache/Java_Temurin-Hotspot_jdk/11.0.14-1/x64/bin/javac
Java: [18]...
npmPackages:
@react-native-community/cli: next => 8.0.0-alpha.0
react: experimental => 0.0.0-experimental-4de99b3ca-20220221
react-native: 0.68.0 => 0.68.1
npmGlobalPackages:
react-native: Not Found

Steps to reproduce

https://github.com/leotm/react-native-template-new-architecture/pull/276/files#diff-0d634959c8276ae976e39ba475e63d0b9ec27824470c79f1971f58fe37c46325

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

leotm/react-native-template-new-architecture#276

@leotm leotm changed the title [CI] [Linux] 0.68.0 :ReactAndroid:configureNdkBuildDebug[arm64-v8a] failing [CI] [Linux] 0.68.0 :ReactAndroid:configureNdkBuildDebug failing Apr 7, 2022
@leotm leotm changed the title [CI] [Linux] 0.68.0 :ReactAndroid:configureNdkBuildDebug failing [CI] [Linux] 0.68.0 :ReactAndroid:configureNdkBuildDebug[<any-arch>] failing Apr 7, 2022
@leotm leotm changed the title [CI] [Linux] 0.68.0 :ReactAndroid:configureNdkBuildDebug[<any-arch>] failing [CI] [Linux] 0.68.0 :ReactAndroid:configureNdkBuildDebug[<arch>] failing Apr 7, 2022
@leotm leotm changed the title [CI] [Linux] 0.68.0 :ReactAndroid:configureNdkBuildDebug[<arch>] failing [CI] [Linux] 0.68.0 :ReactAndroid:configureNdkBuildDebug[<any-arch>] failing Apr 7, 2022
@react-native-bot react-native-bot added Platform: Android Android applications. Platform: Linux Building on Linux. labels Apr 7, 2022
@leotm leotm changed the title [CI] [Linux] 0.68.0 :ReactAndroid:configureNdkBuildDebug[<any-arch>] failing [CI] [Linux] 0.68.0 :ReactAndroid:configureNdkBuildDebug failing Apr 7, 2022
@leotm leotm changed the title [CI] [Linux] 0.68.0 :ReactAndroid:configureNdkBuildDebug failing [CI] [Linux] 0.68.0-1 :ReactAndroid:configureNdkBuildDebug failing Apr 13, 2022
@leotm leotm changed the title [CI] [Linux] 0.68.0-1 :ReactAndroid:configureNdkBuildDebug failing [CI] [Linux] RN 0.68.0-1 NDK 21-24 :ReactAndroid:configureNdkBuildDebug failing Apr 13, 2022
@leotm leotm changed the title [CI] [Linux] RN 0.68.0-1 NDK 21-24 :ReactAndroid:configureNdkBuildDebug failing [CI] [Linux] RN 0.68.0-1 AGP 7.1.1 :ReactAndroid:configureNdkBuildDebug failing Apr 13, 2022
@leotm
Copy link
Contributor Author

leotm commented Apr 19, 2022

might close since with RN 0.68.1 we're advising AGP 7.0.4

then later introducing AGP 7.1.1+ in RN 0.69 (#33057)

@leotm
Copy link
Contributor Author

leotm commented Apr 19, 2022

and since AGP 7.1.1 not depending on preBuild lies with Google atm
either way its been 5 months so i'm bisecting our AGP releases while making sense of our Android build system (source)

@leotm
Copy link
Contributor Author

leotm commented Apr 19, 2022

but been holding off closing since only noticed this (in CI) on Ubuntu 20.04, not locally on macOS 12.3-12.4 Beta 2

@cortinico d'u remember if the og 23nov21 issue was deffo macOS only? if so curious if it was/is pre-12.3

macOS images look like 10.15/11, but our Android template/rn-tester CI looks like ubuntu-2004:202201-02

thinking PRing smth like

  • if (Os.isFamily(Os.FAMILY_LINUX))
    • stick to classpath("com.android.tools.build:gradle:7.0.4")
  • otherwise
    • stick to classpath("com.android.tools.build:gradle:7.1.1")

for either 0.68.x or 0.69

@leotm
Copy link
Contributor Author

leotm commented Apr 25, 2022

i'll go ahead and close since AGP 7.3.0-alpha09 builds passing now and looking solid:

  • Tasks: clean and assembleDebug
  • ABIs: All 4 default and single ones like x86_64
  • OS: MacOS 12.3-12.4Beta2 (local dev) and Ubuntu 20.04.4 (CI Flow with GitHub Actions)
  • Version of Java: Temurin 11, Temurin 18, OpenJDK 18 locally, etc
  • Version of Gradle: 7.3.3, 7.5 nightly (20220331233901)
  • Version of SDK Build Tools: 31.0.0
  • Version of NDK: 24.0.8215888, 25.0.8221429 rc2

Details: https://issuetracker.google.com/issues/207403732#comment7

@leotm leotm closed this as completed Apr 25, 2022
@leotm
Copy link
Contributor Author

leotm commented Apr 25, 2022

closing thought, maybe still be worth PRing

  • if (Os.isFamily(Os.FAMILY_LINUX))
    • stick to classpath("com.android.tools.build:gradle:7.0.4")
  • otherwise
    • stick to classpath("com.android.tools.build:gradle:7.1.1")

or pos better than 7.0.4, the latest stable 7.x AGP that fixes our :ReactAndroid:configureNdkBuildDebug Gradle task dep download ordering on Linux

leotm added a commit to leotm/react-native-template-new-architecture that referenced this issue Apr 27, 2022
…r AGP 7.1.1+ resolving ReactAndroid:configureNdkBuildDebug (#276)

Full details/logs: #276

- Create bleeding edge Android debug workflow on Ubuntu
- Test older AGP 4.2.2 clean and build - passing (super slowly)
- Test supported AGP 7.0.4 clean and build - passing
- Test current unsupported AGP 7.1.1 depending on default build-variant and preBuild tasks - failing
  - facebook/react-native#33586
  - https://issuetracker.google.com/issues/207403732
- Test react-native#200488 - dependencies failing detecting React Native version
- Remove react-native-screens until Gradle clean task resolved with current AGP 7.3.x
  - fdf4e57
  - https://github.com/leotm/react-native-template-new-architecture/runs/6181690191?check_suite_focus=true#step:6:134
- Revert Gradle properties JVM memory
- Revert Android SDK Build Tools to 31.0.0 until SDK licenses accepted
  - @react-native-community/datetimepicker, task :react-native-community_datetimepicker:compileDebugAidl
  - https://github.com/leotm/react-native-template-new-architecture/runs/6156939397?check_suite_focus=true#step:6:128
- Revert AGP 7.0.4 to 7.3.0-alpha09
- Revert Gradle 7.3.3 to 7.5 nightly
- Revert NDK 24 stable to 25 rc2
- Remove debug info (npx react-native info)
- Revert to cleaning once, repetitive stable and cached
- Revert to building once, repetitive stable and cached
- Check macOS 12.4 / 12.4 Beta / 12.4 Beta 2
- Raise mergeDexRelease issue seperately, test RN nightly and fix ReactAndroid hermes-engine dependency
  - #553
  - #554
- Consider CI on
  - macos-latest / macos-11
  - windows-latest / windows-2022
  - self-hosted M1
- Add ANDROID_NDK_HOME and ANDROID_NDK_ROOT global and local env comments
- Add E2E release APK arch/ABI comments per VM image for AVD
- Add release build comments on parallelising via matrix, ccache and sccache
@cortinico cortinico added Type: New Architecture Issues and PRs related to new architecture (Fabric/Turbo Modules) and removed Needs: Triage 🔍 labels May 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Platform: Android Android applications. Platform: Linux Building on Linux. Type: New Architecture Issues and PRs related to new architecture (Fabric/Turbo Modules)
Projects
None yet
Development

No branches or pull requests

3 participants