Skip to content

build: Add support for Android NDK r23 LTS #23478

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

Merged
merged 3 commits into from
Nov 16, 2021

Conversation

hebasto
Copy link
Member

@hebasto hebasto commented Nov 9, 2021

The new Long Term Support release of the Android NDK is available since 2021-08-11:

As r23 is the new LTS, the support windows for r21 and r22 have now ended.

On master (8ae4ba4), dependency build fails because it expects GNU Binutils are present in the Android NDK. In fact:

GNU Binutils remains available up to and including r22. All binutils tools with the exception of the assembler (GAS) were removed in r23. GAS was removed in r24.

This PR switches our depends build system to llvm binutils. The usage of llvm-ar and llvm-ranlib tools effectively makes r21 the minimum supported version of NDK.

With this PR:

  • building depends against NDK r23 LTS now is possible with NO_QT=1
  • building the qt package in depends against NDK r23 LTS still fails:
Creating qmake...
...

ERROR: Cannot detect Android NDK toolchain.
Please use -android-toolchain-version to specify it.

The issue with the qt package is going to be addressed in another PR.

@DrahtBot
Copy link
Contributor

DrahtBot commented Nov 10, 2021

The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

Conflicts

No conflicts as of last run.

@hebasto
Copy link
Member Author

hebasto commented Nov 10, 2021

Updated 3873023 -> 4ba4920 (pr23478.01 -> pr23478.02):

@hebasto
Copy link
Member Author

hebasto commented Nov 10, 2021

Friendly ping @icota

🐅

@promag
Copy link
Contributor

promag commented Nov 11, 2021

The issue with the qt package is going to be addressed in another PR.

Do you know if the issue exists with 5.15.2?

@hebasto
Copy link
Member Author

hebasto commented Nov 11, 2021

Do you know if the issue exists with 5.15.2?

I'm not sure, but Android stuff has been re-worked much in 5.14.

Copy link
Member

@fanquake fanquake left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK 4ba4920

@fanquake fanquake merged commit 6780759 into bitcoin:master Nov 16, 2021
@hebasto hebasto deleted the 211109-binutils branch November 16, 2021 10:35
sidhujag pushed a commit to syscoin/syscoin that referenced this pull request Nov 16, 2021
4ba4920 doc: Add minimum supported Android NDK version (Hennadii Stepanov)
6393bdc doc: Move Android dependencies guide into `build-android.md` (Hennadii Stepanov)
ac323a7 build: Switch to llvm buinutils for Android builds (Hennadii Stepanov)

Pull request description:

  The new Long Term Support release of the Android NDK is [available](https://groups.google.com/g/android-ndk-announce/c/MS6Qoub0DKE/m/Zfp5Ys8eAAAJ) since 2021-08-11:

  > As r23 is the new LTS, the support windows for r21 and r22 have now ended.

  On master (8ae4ba4), dependency build fails because it expects GNU Binutils are present in the Android NDK. In [fact](https://android.googlesource.com/platform/ndk/+/master/docs/BuildSystemMaintainers.md#binutils):
  > GNU Binutils remains available up to and including r22. All binutils tools with the exception of the assembler (GAS) were removed in r23. GAS was removed in r24.

  This PR switches our depends build system to llvm binutils. The usage of `llvm-ar` and `llvm-ranlib` tools effectively makes r21 the minimum supported version of NDK.

  With this PR:
  - building depends against NDK r23 LTS now is possible with `NO_QT=1`
  - building the `qt` package in depends against NDK r23 LTS still fails:
  ```
  Creating qmake...
  ...

  ERROR: Cannot detect Android NDK toolchain.
  Please use -android-toolchain-version to specify it.
  ```

  The issue with the `qt` package is going to be addressed in another PR.

ACKs for top commit:
  fanquake:
    ACK 4ba4920

Tree-SHA512: cdc8f95ff9a3ad7f12eb55b9ea18b6b6b800d4cceff7e0321985be6e39d15a2b2ea5b1592972307d76d111292a0ed58fd287e5ca285e2f6868b42a286536d310
@hebasto
Copy link
Member Author

hebasto commented Dec 5, 2021

@promag

The issue with the qt package is going to be addressed in another PR.

Do you know if the issue exists with 5.15.2?

See #23677.

@bitcoin bitcoin deleted a comment from jhay666 Dec 5, 2021
fanquake added a commit that referenced this pull request Dec 7, 2021
78a6bc6 build, qt: Use Android NDK r23 LTS (Hennadii Stepanov)

Pull request description:

  This is a continuation of #23478, and, thanks to #23489, a oneline patch is only required to be able build the `qt` package in depends with Android NDK r23 LTS.

ACKs for top commit:
  fanquake:
    ACK 78a6bc6

Tree-SHA512: 09c6e8739ecbcbf5fdd6c2103577be2676eb448941f97c781f476918056c8405d2531d5cef8f240e4d1205c2d49f879edbba74dd5e77799a887b76a5c76ebe5b
RandyMcMillan pushed a commit to RandyMcMillan/mempool-tab that referenced this pull request Dec 23, 2021
8f2bbb0 build, qt: Use Android NDK r23 LTS (Hennadii Stepanov)

Pull request description:

  This is a continuation of bitcoin/bitcoin#23478, and, thanks to bitcoin/bitcoin#23489, a oneline patch is only required to be able build the `qt` package in depends with Android NDK r23 LTS.

ACKs for top commit:
  fanquake:
    ACK 8f2bbb0

Tree-SHA512: 09c6e8739ecbcbf5fdd6c2103577be2676eb448941f97c781f476918056c8405d2531d5cef8f240e4d1205c2d49f879edbba74dd5e77799a887b76a5c76ebe5b
@bitcoin bitcoin locked and limited conversation to collaborators Dec 5, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants