Skip to content

Conversation

hebasto
Copy link
Member

@hebasto hebasto commented May 6, 2024

Previously, our Android builds were geared towards generating APKs, which relied on Qt. However, after migrating to C++20, compiling for Android became unfeasible due to Qt 5.15's compatibility limitations with NDK only up to r25, which includes an outdated embedded libc++ (see #29360).

All removed stuff will be reinstated after migrating the build system to CMake and upgrading Qt to version 6.x.

This PR makes possible a clean migration to the CMake-based build system as it removes code, which is not used at this moment.

@DrahtBot
Copy link
Contributor

DrahtBot commented May 6, 2024

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

Code Coverage

For detailed information about the code coverage, see the test coverage report.

Reviews

See the guideline for information on the review process.

Type Reviewers
ACK vasild, fanquake
Concept ACK maflcko

If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.

Conflicts

Reviewers, this pull request conflicts with the following ones:

  • #29923 (depends: Remove Qt build-time dependencies by laanwj)
  • #29868 (Reintroduce external signer support for Windows by hebasto)
  • #29790 ([DO NOT MERGE] cmake: Migrate CI scripts to CMake-based build system -- WIP by hebasto)

If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

@hebasto hebasto marked this pull request as draft May 6, 2024 10:08
@hebasto hebasto marked this pull request as ready for review May 6, 2024 10:10
Previously, our Android builds were geared towards generating APKs,
which relied on Qt. However, after migrating to C++20, compiling for
Android became unfeasible due to Qt 5.15's compatibility limitations
with NDK only up to r25, which includes an outdated embedded libc++.

All removed stuff will be reinstated after migrating the build system to
CMake and upgrading Qt to version 6.x."
@theuni
Copy link
Member

theuni commented May 6, 2024

I guess the idea is that there's basically nothing worth salvaging from our current Android build procedure?

Copy link
Member

Choose a reason for hiding this comment

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

if the images are re-added later, it should be done with a clean revert to avoid bloating the repo with identical-looking but binary-differing png blobs.

@hebasto
Copy link
Member Author

hebasto commented May 7, 2024

I guess the idea is that there's basically nothing worth salvaging from our current Android build procedure?

The commit history keeps everything we might need when restoring Android builds.

@laanwj
Copy link
Member

laanwj commented May 9, 2024

I guess the idea is that there's basically nothing worth salvaging from our current Android build procedure?

Not sure about that. i think the idea is that the current stuff is untestable in practice, which meant the CMake transition is blocked on it. E.g. porting it as-is wouldn't result in anything usable nor testable.

i've already cautioned not to go to wild with this and throw away android compatibility in the code, but removing the user facing build system support for now, seems fine with me.

@hebasto
Copy link
Member Author

hebasto commented May 9, 2024

I guess the idea is that there's basically nothing worth salvaging from our current Android build procedure?

Not sure about that. i think the idea is that the current stuff is untestable in practice, which meant the CMake transition is blocked on it. E.g. porting it as-is wouldn't result in anything usable nor testable.

Exactly.

i've already cautioned not to go to wild with this and throw away android compatibility in the code, but removing the user facing build system support for now, seems fine with me.

I agree. No C++ source file is touched in this PR.

@maflcko
Copy link
Member

maflcko commented May 26, 2024

concept ACK

Copy link
Contributor

@vasild vasild left a comment

Choose a reason for hiding this comment

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

ACK 5deb0b0

Here are the remaining mentions of "android" in non-source code files:

.github/workflows/ci.yml:138:      CI_QT_CONF: '-release -silent -opensource -confirm-license -opengl desktop -static -static-runtime -mp -qt-zlib -qt-pcre -qt-libpng -nomake examples -nomake tests -nomake tools -no-angle -no-dbus -no-gif -no-gtk -no-ico -no-icu -no-libjpeg -no-libudev -no-sql-sqlite -no-sql-odbc -no-sqlite -no-vulkan -skip qt3d -skip qtactiveqt -skip qtandroidextras -skip qtcharts -skip qtconnectivity -skip qtdatavis3d -skip qtdeclarative -skip doc -skip qtdoc -skip qtgamepad -skip qtgraphicaleffects -skip qtimageformats -skip qtlocation -skip qtlottie -skip qtmacextras -skip qtmultimedia -skip qtnetworkauth -skip qtpurchasing -skip qtquick3d -skip qtquickcontrols -skip qtquickcontrols2 -skip qtquicktimeline -skip qtremoteobjects -skip qtscript -skip qtscxml -skip qtsensors -skip qtserialbus -skip qtserialport -skip qtspeech -skip qtsvg -skip qtvirtualkeyboard -skip qtwayland -skip qtwebchannel -skip qtwebengine -skip qtwebglplugin -skip qtwebsockets -skip qtwebview -skip qtx11extras -skip qtxmlpatterns -no-openssl -no-feature-bearermanagement -no-feature-printdialog -no-feature-printer -no-feature-printpreviewdialog -no-feature-printpreviewwidget -no-feature-sql -no-feature-sqlmodel -no-feature-textbrowser -no-feature-textmarkdownwriter -no-feature-textodfwriter -no-feature-xml'
build_msvc/README.md:44:..\configure -release -silent -opensource -confirm-license -opengl desktop -static -static-runtime -mp -qt-zlib -qt-pcre -qt-libpng -nomake examples -nomake tests -nomake tools -no-angle -no-dbus -no-gif -no-gtk -no-ico -no-icu -no-libjpeg -no-libudev -no-sql-sqlite -no-sql-odbc -no-sqlite -no-vulkan -skip qt3d -skip qtactiveqt -skip qtandroidextras -skip qtcharts -skip qtconnectivity -skip qtdatavis3d -skip qtdeclarative -skip doc -skip qtdoc -skip qtgamepad -skip qtgraphicaleffects -skip qtimageformats -skip qtlocation -skip qtlottie -skip qtmacextras -skip qtmultimedia -skip qtnetworkauth -skip qtpurchasing -skip qtquick3d -skip qtquickcontrols -skip qtquickcontrols2 -skip qtquicktimeline -skip qtremoteobjects -skip qtscript -skip qtscxml -skip qtsensors -skip qtserialbus -skip qtserialport -skip qtspeech -skip qtsvg -skip qtvirtualkeyboard -skip qtwayland -skip qtwebchannel -skip qtwebengine -skip qtwebglplugin -skip qtwebsockets -skip qtwebview -skip qtx11extras -skip qtxmlpatterns -no-openssl -no-feature-bearermanagement -no-feature-printdialog -no-feature-printer -no-feature-printpreviewdialog -no-feature-printpreviewwidget -no-feature-sql -no-feature-sqlmodel -no-feature-textbrowser -no-feature-textmarkdownwriter -no-feature-textodfwriter -no-feature-xml -prefix C:\Qt_static
contrib/macdeploy/README.md:70:do so. The work here was used as a starting point: [mingwandroid/toolchain4](https://github.com/mingwandroid/toolchain4).
depends/config.guess:158:       #if defined(__ANDROID__)
depends/config.guess:159:       LIBC=android
depends/config.sub:153:                 android-linux)
depends/config.sub:155:                         basic_os=linux-android
depends/config.sub:1738:        gnu* | android* | bsd* | mach* | minix* | genix* | ultrix* | irix* \
depends/config.sub:1821:        linux-gnu*- | linux-dietlibc*- | linux-android*- | linux-newlib*- \
src/crc32c/README.md:96:### Android testing
src/crc32c/README.md:98:The following command builds the project against the Android NDK, which is
src/crc32c/README.md:102:cmake .. -DCMAKE_SYSTEM_NAME=Android -DCMAKE_ANDROID_ARCH_ABI=arm64-v8a \
src/crc32c/README.md:103:    -DCMAKE_ANDROID_NDK=$HOME/Library/Android/sdk/ndk-bundle \
src/crc32c/README.md:104:    -DCMAKE_ANDROID_NDK_TOOLCHAIN_VERSION=clang \
src/crc32c/README.md:105:    -DCMAKE_ANDROID_STL_TYPE=c++_static -DCRC32C_USE_GLOG=0 \
src/secp256k1/README.md:95:To cross compile for Android with [NDK](https://developer.android.com/ndk/guides/cmake) (using NDK's toolchain file, and assuming the `ANDROID_NDK_ROOT` environment variable has been set):
src/secp256k1/README.md:97:    $ cmake .. -DCMAKE_TOOLCHAIN_FILE="${ANDROID_NDK_ROOT}/build/cmake/android.toolchain.cmake" -DANDROID_ABI=arm64-v8a -DANDROID_PLATFORM=28

If this does not gain traction (here in the main repo) I am also fine with another approach: proceed with cmake as if this is merged - assume no android support. This will be an exception to the 1:1 feature parity between autotools and cmake. Autotools will have a broken android support, while cmake will have none.

@DrahtBot
Copy link
Contributor

Guix builds (on x86_64) [untrusted test-only build, possibly unsafe, not for production use]

File commit 327f08b
(master)
commit 0fd5a7b
(master and this pull)
SHA256SUMS.part 2f7fbee107d854b9... b44721ee3eb681d8...
*-aarch64-linux-gnu-debug.tar.gz 131ec1047dafc740... dcdba37ea97c493b...
*-aarch64-linux-gnu.tar.gz 45fb78c1e31b46db... 2e1718db8023ba38...
*-arm-linux-gnueabihf-debug.tar.gz b6a522d6bc56f6a5... 1052cee67dd995b9...
*-arm-linux-gnueabihf.tar.gz decf947b99562eb5... 41f0f52855a68944...
*-arm64-apple-darwin-unsigned.tar.gz 0fff0b5c9d6d1652... 8fa4b08f8b9f3142...
*-arm64-apple-darwin-unsigned.zip 6db0130c624a7ddf... 17ed75120210b60c...
*-arm64-apple-darwin.tar.gz 84414b88744adffb... 75506ba604b663df...
*-powerpc64-linux-gnu-debug.tar.gz cb76d396c6e08279... d118d8c4a2631a2a...
*-powerpc64-linux-gnu.tar.gz aec752522feaaf87... 702725a7eee5ef22...
*-riscv64-linux-gnu-debug.tar.gz b2ea26b0b0db7815... 2d207b1a0b5eec07...
*-riscv64-linux-gnu.tar.gz 08bc325b2e2c3aeb... 0a82b92d1c351bbf...
*-x86_64-apple-darwin-unsigned.tar.gz 1d437b14b7dd1096... 4eae40e1762dee20...
*-x86_64-apple-darwin-unsigned.zip f18c51926fc0efee... 221bc1f9cf337f89...
*-x86_64-apple-darwin.tar.gz 0833d69d18e97013... 52325b0df4587d5b...
*-x86_64-linux-gnu-debug.tar.gz 2d70f334c41d4e60... 16d0f5253fa2c4ad...
*-x86_64-linux-gnu.tar.gz e76f8be29de9634c... c42c729f8b74c24f...
*.tar.gz 5467b517b7ad2c46... 93507e5f53d19ed6...
guix_build.log 8c398f7c577a9d9e... a663505a6e6d61d0...
guix_build.log.diff 7a8771eca5a2a48c...

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 5deb0b0 - given none of this is currently tested/wont compile. Can be revisted in future.

@fanquake
Copy link
Member

Guix build (aarch64):

a51639ed29704d71baa0296b6e4c834a97c256a986cb4fd761d27096280a224a  guix-build-5deb0b024e14/output/aarch64-linux-gnu/SHA256SUMS.part
084f3ea9efb5d7ceea727ac3a04b10a1229afab30798360fab053e0250793217  guix-build-5deb0b024e14/output/aarch64-linux-gnu/bitcoin-5deb0b024e14-aarch64-linux-gnu-debug.tar.gz
3aa9b03d51de7f054d61a41f5ee7afd2303fff2d5f08e1afe749f4d9330fd5ad  guix-build-5deb0b024e14/output/aarch64-linux-gnu/bitcoin-5deb0b024e14-aarch64-linux-gnu.tar.gz
c6f549b6860ff11b8272853c46d6e7929306740236c144274f79d7eecdaf93d3  guix-build-5deb0b024e14/output/arm-linux-gnueabihf/SHA256SUMS.part
913707c627a04b9d42f9f0f2970bd364d7809e073914b7535ff12a7f63592f1b  guix-build-5deb0b024e14/output/arm-linux-gnueabihf/bitcoin-5deb0b024e14-arm-linux-gnueabihf-debug.tar.gz
7ff49861a8cbc93677f18926c499fb376b93909f63f641742167a4e2adced183  guix-build-5deb0b024e14/output/arm-linux-gnueabihf/bitcoin-5deb0b024e14-arm-linux-gnueabihf.tar.gz
22cc872179c10f4079f0fe437c539602a70754e80d0602fb12a2f57b97f55edc  guix-build-5deb0b024e14/output/arm64-apple-darwin/SHA256SUMS.part
471b43f6f9a172fbe0271d41f4ab0d5967f612063f78e493b0a10360a20ff3e8  guix-build-5deb0b024e14/output/arm64-apple-darwin/bitcoin-5deb0b024e14-arm64-apple-darwin-unsigned.tar.gz
e586724c72daf8af0da75d10cffa78f7c139f8a738c0c090bf2e1b78d14065d1  guix-build-5deb0b024e14/output/arm64-apple-darwin/bitcoin-5deb0b024e14-arm64-apple-darwin-unsigned.zip
5d5761c88a157dcd78e6a57a051605b2c13e8ed65d3f7bf4abca3aa91ce00bf3  guix-build-5deb0b024e14/output/arm64-apple-darwin/bitcoin-5deb0b024e14-arm64-apple-darwin.tar.gz
1918f9348de38c6050f79b5aae99b6e627e3b580edcc13686932666dd0812a59  guix-build-5deb0b024e14/output/dist-archive/bitcoin-5deb0b024e14.tar.gz
9e07a49e39bc41f13cbf6f5105bc31c09e77dbdf52f80f09692b8bef8dff2b83  guix-build-5deb0b024e14/output/powerpc64-linux-gnu/SHA256SUMS.part
a3fd42bd351fee05a046410fa168cf6a239751fad80b51e5f6b9ba2b95364c41  guix-build-5deb0b024e14/output/powerpc64-linux-gnu/bitcoin-5deb0b024e14-powerpc64-linux-gnu-debug.tar.gz
e7ead352ef6aacff8e1d67401a451ea1e76880b528913406e9a08bb49a9f6695  guix-build-5deb0b024e14/output/powerpc64-linux-gnu/bitcoin-5deb0b024e14-powerpc64-linux-gnu.tar.gz
2ec6789c2a54e258d6672f4a82b3c2f8a9a6ec6aa2064c15a188d9a7b8312118  guix-build-5deb0b024e14/output/riscv64-linux-gnu/SHA256SUMS.part
365b878a2c2f924c07999e3f18b494219aca62404b471c9c623ed50c5417aac8  guix-build-5deb0b024e14/output/riscv64-linux-gnu/bitcoin-5deb0b024e14-riscv64-linux-gnu-debug.tar.gz
db7c2fe29309af9f5d09f574efbc00183ab9b4766fe076a69a36990b7207d58e  guix-build-5deb0b024e14/output/riscv64-linux-gnu/bitcoin-5deb0b024e14-riscv64-linux-gnu.tar.gz
0a89fcffa97f8bca6a638ebedb0145b52bfa827079c02c1096f8bd16034665d5  guix-build-5deb0b024e14/output/x86_64-apple-darwin/SHA256SUMS.part
394ef45db68553f071984b31743993c34a33c3f57386878a43a9a15268d7550a  guix-build-5deb0b024e14/output/x86_64-apple-darwin/bitcoin-5deb0b024e14-x86_64-apple-darwin-unsigned.tar.gz
1577ffdf484a4fa3ca8f768630a899248d4eb0c5b533f80f08dca31efa8302b5  guix-build-5deb0b024e14/output/x86_64-apple-darwin/bitcoin-5deb0b024e14-x86_64-apple-darwin-unsigned.zip
f34a175a56579136a66f6b77246b0e50a838323720c10907efb91c4dd7cd3c67  guix-build-5deb0b024e14/output/x86_64-apple-darwin/bitcoin-5deb0b024e14-x86_64-apple-darwin.tar.gz
64b128c4fe283c18dc028388c80df6412e345e992213f6a83b307bade299c7b9  guix-build-5deb0b024e14/output/x86_64-linux-gnu/SHA256SUMS.part
8157fedd2ebf589d348f9d62397798d6ea7f17e15af18aa477dd3539205cc150  guix-build-5deb0b024e14/output/x86_64-linux-gnu/bitcoin-5deb0b024e14-x86_64-linux-gnu-debug.tar.gz
c6a472724eb341bcc8b0ca6135eed1f1d8b65be2740b47090053dc9981f71b36  guix-build-5deb0b024e14/output/x86_64-linux-gnu/bitcoin-5deb0b024e14-x86_64-linux-gnu.tar.gz
9861374b51c251350efcd10248db0eeca80e105bf416e110fdec28797ca59a6a  guix-build-5deb0b024e14/output/x86_64-w64-mingw32/SHA256SUMS.part
6ae5f8f2cd79e5f98abfa58e107993d8dc5bd3d76f24ef2746a20fee187ea339  guix-build-5deb0b024e14/output/x86_64-w64-mingw32/bitcoin-5deb0b024e14-win64-debug.zip
80d7b058ed5697c81f571641110f40abfdc7977e66fea810bbc7cd5e6b3bd118  guix-build-5deb0b024e14/output/x86_64-w64-mingw32/bitcoin-5deb0b024e14-win64-setup-unsigned.exe
0db8f0bdaba1e2e5a484b852091ee684d8738802753760dce0c165db7d58ad1e  guix-build-5deb0b024e14/output/x86_64-w64-mingw32/bitcoin-5deb0b024e14-win64-unsigned.tar.gz
05ffc6fa42b67830d4279592d84c8e4fa7cce48c728ac1fd1dc95954754e9ccf  guix-build-5deb0b024e14/output/x86_64-w64-mingw32/bitcoin-5deb0b024e14-win64.zip

@fanquake fanquake merged commit f61ede5 into bitcoin:master May 30, 2024
@naftalimurgor
Copy link

When will Android builds be re-introduced?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants