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

[all OSs] Android NDK 22 will be replaced in favor of 24, version 23 will be set as the default one on June, 6 #5595

Closed
7 of 8 tasks
miketimofeev opened this issue May 23, 2022 · 9 comments
Assignees
Labels
Announcement Area: Android awaiting-deployment Code complete; awaiting deployment and/or deployment in progress OS: macOS OS: Ubuntu OS: Windows

Comments

@miketimofeev
Copy link
Contributor

Breaking changes

There are two changes:

  • Ndk 22 will be replaced by Ndk 24
  • Ndk 23 will be the new default (ndk-bundle) instead of Ndk 21

Target date

The propagation is starting on June, 6 and will take 3-4 days

The motivation for the changes

According to our Software and image guidelines we support 1 latest non-LTS and 2 latest LTS versions of NDK. Currently, our image contains NDK r22 whereas the latest non-LTS is 24. LTS version of NDK 21 is not supported so we would like to set version 23 as the new default.

Possible impact

  • If your project depends on NDK r22 it can be broken
  • If your project relies on ndk-bundle based on r21 it can be broken

Virtual environments affected

  • Ubuntu 18.04
  • Ubuntu 20.04
  • Ubuntu 22.04
  • macOS 10.15
  • macOS 11
  • macOS 12
  • Windows Server 2019
  • Windows Server 2022

Mitigation ways

  • To install NDK r22 in runtime use the following snippets;
    • Windows
    $sdkRoot = "C:\Android\android-sdk"
    $sdkManager = "$sdkRoot\cmdline-tools\latest\bin\sdkmanager.bat"
    Install-AndroidSDKPackages -AndroidSDKManagerPath $sdkManager `
                               -AndroidSDKRootPath $sdkRoot `
                               -AndroidPackages "ndk;21.4.7075529"
    • macOS
     ANDROID_HOME=$HOME/Library/Android/sdk
     SDKMANAGER=$ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager
     echo y | $SDKMANAGER "ndk;21.4.7075529"
    • Ubuntu
    ANDROID_ROOT=/usr/local/lib/android
    ANDROID_SDK_ROOT=${ANDROID_ROOT}/sdk
    SDKMANAGER=${ANDROID_SDK_ROOT}/cmdline-tools/latest/bin/sdkmanager
    echo "y" | $SDKMANAGER "ndk;21.4.7075529"
  • To change default NDK version (ndk-bundle) use the following snippets:
    • Windows
      $sdkRoot = "C:\Android\android-sdk"
      $sdkManager = "$sdkRoot\cmdline-tools\latest\bin\sdkmanager.bat"
      $ndkRoot = "$sdkRoot\ndk-bundle"
      New-Item -Path $ndkRoot -ItemType SymbolicLink -Value "$sdkRoot\ndk\21.4.7075529" -Force
    • macOS
      ANDROID_HOME=$HOME/Library/Android/sdk
       ln -sfn $ANDROID_HOME/ndk/21.4.7075529 $ANDROID_HOME/ndk-bundle
    • Ubuntu
     ANDROID_ROOT=/usr/local/lib/android
     ANDROID_SDK_ROOT=${ANDROID_ROOT}/sdk
     ANDROID_NDK_ROOT=${ANDROID_SDK_ROOT}/ndk-bundle
     ln -sfn $ANDROID_SDK_ROOT/ndk/21.4.7075529 $ANDROID_NDK_ROOT
@miketimofeev miketimofeev changed the title [all OSs] Android NDK 22 will be replaced in favor of 24, version 23 will be set as the default one [all OSs] Android NDK 22 will be replaced in favor of 24, version 23 will be set as the default one on June, 6 May 31, 2022
@mikhailkoliada mikhailkoliada self-assigned this Jun 1, 2022
@mikhailkoliada mikhailkoliada added the awaiting-deployment Code complete; awaiting deployment and/or deployment in progress label Jun 2, 2022
@mikhailkoliada
Copy link
Contributor

Will be deployed next week.

ccjernigan added a commit to Electric-Coin-Company/zcash-android-wallet-sdk that referenced this issue Jun 3, 2022
@Bercon
Copy link

Bercon commented Jun 3, 2022

At least my builds are failing since the NDK 23 being default was deployed already?

@miketimofeev
Copy link
Contributor Author

@Bercon no, it was not. The new image rollout will start today

@Bercon
Copy link

Bercon commented Jun 6, 2022

After further debugging, it appears my issue is most likely ndk 23 updating from 23.1 to 23.2 which didn't work out of the box with https://github.com/moritz-wundke/Boost-for-Android we are using.

@miketimofeev miketimofeev pinned this issue Jun 7, 2022
pytorchmergebot pushed a commit to pytorch/pytorch that referenced this issue Jun 7, 2022
facebook-github-bot pushed a commit to pytorch/pytorch that referenced this issue Jun 8, 2022
Summary:
See actions/runner-images#5595

Pull Request resolved: #79024
Approved by: https://github.com/janeyx99

Test Plan: contbuild & OSS CI, see https://hud.pytorch.org/commit/pytorch/pytorch/0be9df4e852c0216a1de749551f16affddb63335

Reviewed By: osalpekar

Differential Revision: D36993242

Pulled By: kit1980

fbshipit-source-id: c2e76fee4eaf0b1474cb7221721cbb798c319001
jpsim added a commit to envoyproxy/envoy-mobile that referenced this issue Jun 9, 2022
To account for recent changes to defaults:
actions/runner-images#5595

Signed-off-by: JP Simard <[email protected]>
jpsim added a commit to envoyproxy/envoy-mobile that referenced this issue Jun 9, 2022
To account for recent changes to defaults:
actions/runner-images#5595

Signed-off-by: JP Simard <[email protected]>
edo9300 added a commit to edo9300/edopro-android that referenced this issue Jun 9, 2022
MarijnS95 added a commit to rust-mobile/ndk that referenced this issue Jun 10, 2022
…o reuse in `--` subcommand

Winit is currently being hit by `-lgcc not found` linker errors because
GH Actions' [virtual-environments recently migrated to Android NDK r23],
and it turns out it's using the niche `--` subcommand to invoke regular
`cargo` commands under an NDK environment.

The workaround using `RUSTFLAGS` is only patched into the `build()`
command; by moving it into our `cargo_ndk()` environment preparation
function this workaround is universally available and usable.

Note that this is a breaking change, we're changing the API signature of
`ndk-build`.

[virtual-environments recently migrated to Android NDK r23]: actions/runner-images#5595
MarijnS95 added a commit to rust-mobile/ndk that referenced this issue Jun 10, 2022
…o reuse in `--` subcommand

Winit is currently being hit by `-lgcc not found` linker errors because
GH Actions' [virtual-environments recently migrated to Android NDK r23],
and it turns out it's using the niche `--` subcommand to invoke regular
`cargo` commands under an NDK environment.

The workaround using `RUSTFLAGS` is only patched into the `build()`
command; by moving it into our `cargo_ndk()` environment preparation
function this workaround is universally available and usable.

Note that this is a breaking change, we're changing the API signature of
`ndk-build`.

[virtual-environments recently migrated to Android NDK r23]: actions/runner-images#5595
MarijnS95 added a commit to rust-mobile/ndk that referenced this issue Jun 10, 2022
…o reuse in `--` subcommand (#286)

Winit is currently being hit by `-lgcc not found` linker errors because
GH Actions' [virtual-environments recently migrated to Android NDK r23],
and it turns out it's using the niche `--` subcommand to invoke regular
`cargo` commands under an NDK environment.

The workaround using `RUSTFLAGS` is only patched into the `build()`
command; by moving it into our `cargo_ndk()` environment preparation
function this workaround is universally available and usable.

Note that this is a breaking change, we're changing the API signature of
`ndk-build`.

[virtual-environments recently migrated to Android NDK r23]: actions/runner-images#5595
edo9300 added a commit to edo9300/ygopro-core that referenced this issue Jun 11, 2022
atalman pushed a commit to atalman/pytorch that referenced this issue Jun 13, 2022
Summary:
See actions/runner-images#5595

Pull Request resolved: pytorch#79024
Approved by: https://github.com/janeyx99

Test Plan: contbuild & OSS CI, see https://hud.pytorch.org/commit/pytorch/pytorch/0be9df4e852c0216a1de749551f16affddb63335

Reviewed By: osalpekar

Differential Revision: D36993242

Pulled By: kit1980

fbshipit-source-id: c2e76fee4eaf0b1474cb7221721cbb798c319001
atalman added a commit to pytorch/pytorch that referenced this issue Jun 13, 2022
Summary:
See actions/runner-images#5595

Pull Request resolved: #79024
Approved by: https://github.com/janeyx99

Test Plan: contbuild & OSS CI, see https://hud.pytorch.org/commit/pytorch/pytorch/0be9df4e852c0216a1de749551f16affddb63335

Reviewed By: osalpekar

Differential Revision: D36993242

Pulled By: kit1980

fbshipit-source-id: c2e76fee4eaf0b1474cb7221721cbb798c319001

Co-authored-by: Sergii Dymchenko (Meta Employee) <[email protected]>
vondele pushed a commit to vondele/Stockfish that referenced this issue Jun 16, 2022
GitHub updated the versions of NDK installed on the Actions runners
breaking the ARM tests.
Restore the NDKv21 using the GitHub suggested mitigation, see:
actions/runner-images#5595

closes official-stockfish#4077

No functional change
hiroyuki-komatsu added a commit to google/mozc that referenced this issue Jun 17, 2022
* This will fix the CI errors on GitHub.
* actions/runner-images#5595

PiperOrigin-RevId: 455520163
@MBilderbeek
Copy link

Thanks for this work! But how exactly can I make sure my build uses ndk r24 instead of the default 23 on the Ubuntu 22.04 image? See https://github.com/openMSX/openMSX/actions/workflows/build_snapshots.yml
Our code needs clang-13, so ndk r24 is the only way...

@ddobranic ddobranic unpinned this issue Jun 20, 2022
@miketimofeev
Copy link
Contributor Author

@MBilderbeek you can try the following snippet to replace ndk-bundle with NDK r24

 ANDROID_ROOT=/usr/local/lib/android
 ANDROID_SDK_ROOT=${ANDROID_ROOT}/sdk
 ANDROID_NDK_ROOT=${ANDROID_SDK_ROOT}/ndk-bundle
 ln -sfn $ANDROID_SDK_ROOT/ndk/24.0.8215888 $ANDROID_NDK_ROOT

@MBilderbeek
Copy link

@miketimofeev Thanks, got it working by just adding this step:
echo "$ANDROID_NDK_LATEST_HOME/toolchains/llvm/prebuilt/linux-x86_64/bin" >> $GITHUB_PATH
However, for some reason, the clang-14 in NDK r24 can't compile what normal clang can, and thus we have failing builds. This is probably an NDK question, but if someone has any idea, please contact me.
In detail: it doesn't recognize std::identity and several other C++-20 features. Standard is probably specified, though.

Augustyniak pushed a commit to envoyproxy/envoy-mobile that referenced this issue Jun 28, 2022
To account for recent changes to defaults:
actions/runner-images#5595

Signed-off-by: JP Simard <[email protected]>
Signed-off-by: Rafal Augustyniak <[email protected]>
@actions actions deleted a comment Jul 18, 2022
@soroshsabz
Copy link

related to dotnet/android#6808 (comment)

jpsim added a commit to envoyproxy/envoy that referenced this issue Nov 29, 2022
To account for recent changes to defaults:
actions/runner-images#5595

Signed-off-by: JP Simard <[email protected]>
cagnulein added a commit to cagnulein/qdomyos-zwift that referenced this issue Dec 23, 2022
mirabilos added a commit to qvest-digital/ECN-Bits that referenced this issue Jan 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Announcement Area: Android awaiting-deployment Code complete; awaiting deployment and/or deployment in progress OS: macOS OS: Ubuntu OS: Windows
Projects
None yet
Development

No branches or pull requests

6 participants
@Bercon @MBilderbeek @soroshsabz @miketimofeev @mikhailkoliada and others