Skip to content

Commit f61ede5

Browse files
committed
Merge bitcoin/bitcoin#30049: build, test, doc: Temporarily remove Android-related stuff
5deb0b0 build, test, doc: Temporarily remove Android-related stuff (Hennadii Stepanov) Pull request description: 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 bitcoin/bitcoin#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. ACKs for top commit: vasild: ACK 5deb0b0 fanquake: ACK 5deb0b0 - given none of this is currently tested/wont compile. Can be revisted in future. Tree-SHA512: 3bc2ccfe881e11cc1d78c27acd6f1d86cfba86821ef3bb5eca2e80d978fdfa13659ec82284dcaadc507e2394524dea91d4b8f81d0030c1cef9708df8be76bf07
2 parents 1016491 + 5deb0b0 commit f61ede5

File tree

27 files changed

+4
-329
lines changed

27 files changed

+4
-329
lines changed

build-aux/m4/bitcoin_qt.m4

Lines changed: 3 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,6 @@ AC_DEFUN([BITCOIN_QT_INIT],[
7070
[qt_lib_suffix= ]); bitcoin_qt_want_version=qt5],
7171
[qt_lib_suffix= ])
7272
73-
AS_CASE([$host], [*android*], [qt_lib_suffix=_$ANDROID_ARCH])
74-
7573
AC_ARG_WITH([qt-incdir],[AS_HELP_STRING([--with-qt-incdir=INC_DIR],[specify qt include path (overridden by pkgconfig)])], [qt_include_path=$withval], [])
7674
AC_ARG_WITH([qt-libdir],[AS_HELP_STRING([--with-qt-libdir=LIB_DIR],[specify qt lib path (overridden by pkgconfig)])], [qt_lib_path=$withval], [])
7775
AC_ARG_WITH([qt-plugindir],[AS_HELP_STRING([--with-qt-plugindir=PLUGIN_DIR],[specify qt plugin path (overridden by pkgconfig)])], [qt_plugin_path=$withval], [])
@@ -80,19 +78,10 @@ AC_DEFUN([BITCOIN_QT_INIT],[
8078
8179
AC_ARG_WITH([qtdbus],
8280
[AS_HELP_STRING([--with-qtdbus],
83-
[enable DBus support (default is yes if qt is enabled and QtDBus is found, except on Android)])],
81+
[enable DBus support (default is yes if qt is enabled and QtDBus is found)])],
8482
[use_dbus=$withval],
8583
[use_dbus=auto])
8684
87-
dnl Android doesn't support D-Bus and certainly doesn't use it for notifications
88-
case $host in
89-
*android*)
90-
if test "$use_dbus" != "yes"; then
91-
use_dbus=no
92-
fi
93-
;;
94-
esac
95-
9685
AC_SUBST(QT_TRANSLATION_DIR,$qt_translation_path)
9786
])
9887

@@ -132,16 +121,11 @@ AC_DEFUN([BITCOIN_QT_CONFIGURE],[
132121
if test -d "$qt_plugin_path/accessible"; then
133122
QT_LIBS="$QT_LIBS -L$qt_plugin_path/accessible"
134123
fi
135-
if test -d "$qt_plugin_path/platforms/android"; then
136-
QT_LIBS="$QT_LIBS -L$qt_plugin_path/platforms/android -lqtfreetype -lEGL"
137-
fi
138124
fi
139125
140126
AC_DEFINE([QT_STATICPLUGIN], [1], [Define this symbol if qt plugins are static])
141-
if test "$TARGET_OS" != "android"; then
142-
_BITCOIN_QT_CHECK_STATIC_PLUGIN([QMinimalIntegrationPlugin], [-lqminimal])
143-
AC_DEFINE([QT_QPA_PLATFORM_MINIMAL], [1], [Define this symbol if the minimal qt platform exists])
144-
fi
127+
_BITCOIN_QT_CHECK_STATIC_PLUGIN([QMinimalIntegrationPlugin], [-lqminimal])
128+
AC_DEFINE([QT_QPA_PLATFORM_MINIMAL], [1], [Define this symbol if the minimal qt platform exists])
145129
if test "$TARGET_OS" = "windows"; then
146130
dnl Linking against wtsapi32 is required. See #17749 and
147131
dnl https://bugreports.qt.io/browse/QTBUG-27097.
@@ -160,9 +144,6 @@ AC_DEFUN([BITCOIN_QT_CONFIGURE],[
160144
_BITCOIN_QT_CHECK_STATIC_PLUGIN([QCocoaIntegrationPlugin], [-lqcocoa])
161145
_BITCOIN_QT_CHECK_STATIC_PLUGIN([QMacStylePlugin], [-lqmacstyle])
162146
AC_DEFINE([QT_QPA_PLATFORM_COCOA], [1], [Define this symbol if the qt platform is cocoa])
163-
elif test "$TARGET_OS" = "android"; then
164-
QT_LIBS="-Wl,--export-dynamic,--undefined=JNI_OnLoad -lplugins_platforms_qtforandroid${qt_lib_suffix} -ljnigraphics -landroid -lqtfreetype${qt_lib_suffix} $QT_LIBS"
165-
AC_DEFINE([QT_QPA_PLATFORM_ANDROID], [1], [Define this symbol if the qt platform is android])
166147
fi
167148
fi
168149
CPPFLAGS=$TEMP_CPPFLAGS
@@ -357,9 +338,6 @@ AC_DEFUN([_BITCOIN_QT_CHECK_STATIC_LIBS], [
357338
PKG_CHECK_MODULES([QT_SERVICE], [${qt_lib_prefix}ServiceSupport${qt_lib_suffix}], [QT_LIBS="$QT_SERVICE_LIBS $QT_LIBS"])
358339
elif test "$TARGET_OS" = "windows"; then
359340
PKG_CHECK_MODULES([QT_WINDOWSUIAUTOMATION], [${qt_lib_prefix}WindowsUIAutomationSupport${qt_lib_suffix}], [QT_LIBS="$QT_WINDOWSUIAUTOMATION_LIBS $QT_LIBS"])
360-
elif test "$TARGET_OS" = "android"; then
361-
PKG_CHECK_MODULES([QT_EGL], [${qt_lib_prefix}EglSupport${qt_lib_suffix}], [QT_LIBS="$QT_EGL_LIBS $QT_LIBS"])
362-
PKG_CHECK_MODULES([QT_SERVICE], [${qt_lib_prefix}ServiceSupport${qt_lib_suffix}], [QT_LIBS="$QT_SERVICE_LIBS $QT_LIBS"])
363341
fi
364342
])
365343

ci/test/00_setup_env_android.sh

Lines changed: 0 additions & 25 deletions
This file was deleted.

ci/test/01_base_install.sh

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -86,14 +86,4 @@ if [ -n "$XCODE_VERSION" ] && [ ! -d "${DEPENDS_DIR}/SDKs/${OSX_SDK_BASENAME}" ]
8686
tar -C "${DEPENDS_DIR}/SDKs" -xf "$OSX_SDK_PATH"
8787
fi
8888

89-
if [ -n "$ANDROID_HOME" ] && [ ! -d "$ANDROID_HOME" ]; then
90-
ANDROID_TOOLS_PATH=${DEPENDS_DIR}/sdk-sources/android-tools.zip
91-
if [ ! -f "$ANDROID_TOOLS_PATH" ]; then
92-
${CI_RETRY_EXE} curl --location --fail "${ANDROID_TOOLS_URL}" -o "$ANDROID_TOOLS_PATH"
93-
fi
94-
mkdir -p "$ANDROID_HOME"
95-
unzip -o "$ANDROID_TOOLS_PATH" -d "$ANDROID_HOME"
96-
yes | "${ANDROID_HOME}"/cmdline-tools/bin/sdkmanager --sdk_root="${ANDROID_HOME}" --install "build-tools;${ANDROID_BUILD_TOOLS_VERSION}" "platform-tools" "platforms;android-31" "platforms;android-${ANDROID_API_LEVEL}" "ndk;${ANDROID_NDK_VERSION}"
97-
fi
98-
9989
git config --global ${CFG_DONE} "true"

ci/test/02_run_container.sh

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ if [ -z "$DANGER_RUN_CI_ON_HOST" ]; then
2626
docker volume create "${CONTAINER_NAME}_ccache" || true
2727
docker volume create "${CONTAINER_NAME}_depends" || true
2828
docker volume create "${CONTAINER_NAME}_depends_sources" || true
29-
docker volume create "${CONTAINER_NAME}_depends_SDKs_android" || true
3029
docker volume create "${CONTAINER_NAME}_previous_releases" || true
3130

3231
if [ -n "${RESTART_CI_DOCKER_BEFORE_RUN}" ] ; then
@@ -52,7 +51,6 @@ if [ -z "$DANGER_RUN_CI_ON_HOST" ]; then
5251
--mount "type=volume,src=${CONTAINER_NAME}_ccache,dst=$CCACHE_DIR" \
5352
--mount "type=volume,src=${CONTAINER_NAME}_depends,dst=$DEPENDS_DIR/built" \
5453
--mount "type=volume,src=${CONTAINER_NAME}_depends_sources,dst=$DEPENDS_DIR/sources" \
55-
--mount "type=volume,src=${CONTAINER_NAME}_depends_SDKs_android,dst=$DEPENDS_DIR/SDKs/android" \
5654
--mount "type=volume,src=${CONTAINER_NAME}_previous_releases,dst=$PREVIOUS_RELEASES_DIR" \
5755
--env-file /tmp/env-$USER-$CONTAINER_NAME \
5856
--name "$CONTAINER_NAME" \

ci/test/03_test_script.sh

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -110,15 +110,6 @@ fi
110110
ccache --zero-stats
111111
PRINT_CCACHE_STATISTICS="ccache --version | head -n 1 && ccache --show-stats"
112112

113-
if [ -n "$ANDROID_TOOLS_URL" ]; then
114-
make distclean || true
115-
./autogen.sh
116-
bash -c "./configure $BITCOIN_CONFIG_ALL $BITCOIN_CONFIG" || ( (cat config.log) && false)
117-
make "${MAKEJOBS}" && cd src/qt && ANDROID_HOME=${ANDROID_HOME} ANDROID_NDK_HOME=${ANDROID_NDK_HOME} make apk
118-
bash -c "${PRINT_CCACHE_STATISTICS}"
119-
exit 0
120-
fi
121-
122113
BITCOIN_CONFIG_ALL="${BITCOIN_CONFIG_ALL} --enable-external-signer --prefix=$BASE_OUTDIR"
123114

124115
if [ -n "$CONFIG_SHELL" ]; then

configure.ac

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -772,22 +772,6 @@ case $host in
772772
dnl "'NSUserNotificationCenter' is deprecated: first deprecated in macOS 11.0".
773773
OBJCXXFLAGS="$CXXFLAGS -Wno-deprecated-declarations"
774774
;;
775-
*android*)
776-
dnl make sure android stays above linux for hosts like *linux-android*
777-
TARGET_OS=android
778-
case $host in
779-
*x86_64*)
780-
ANDROID_ARCH=x86_64
781-
;;
782-
*aarch64*)
783-
ANDROID_ARCH=arm64-v8a
784-
;;
785-
*armv7a*)
786-
ANDROID_ARCH=armeabi-v7a
787-
;;
788-
*) AC_MSG_ERROR([Could not determine Android arch, or it is unsupported]) ;;
789-
esac
790-
;;
791775
*linux*)
792776
TARGET_OS=linux
793777
;;
@@ -1744,7 +1728,6 @@ AC_SUBST(HAVE_O_CLOEXEC)
17441728
AC_SUBST(HAVE_BUILTIN_PREFETCH)
17451729
AC_SUBST(HAVE_MM_PREFETCH)
17461730
AC_SUBST(HAVE_STRONG_GETAUXVAL)
1747-
AC_SUBST(ANDROID_ARCH)
17481731
AC_SUBST(HAVE_EVHTTP_CONNECTION_GET_PEER_CONST_CHAR)
17491732
AC_CONFIG_FILES([Makefile src/Makefile doc/man/Makefile share/setup.nsi share/qt/Info.plist test/config.ini])
17501733
AC_CONFIG_FILES([contrib/devtools/split-debug.sh],[chmod +x contrib/devtools/split-debug.sh])

depends/Makefile

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -101,10 +101,6 @@ host_os+=$(findstring netbsd,$(full_host_os))
101101
host_os+=$(findstring openbsd,$(full_host_os))
102102
host_os+=$(findstring mingw32,$(full_host_os))
103103

104-
ifeq (android,$(findstring android,$(full_host_os)))
105-
host_os:=android
106-
endif
107-
108104
host_os:=$(strip $(host_os))
109105
ifeq ($(host_os),)
110106
host_os=$(full_host_os)

depends/README.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,8 @@ Common `host-platform-triplet`s for cross compilation are:
3838
- `riscv32-linux-gnu` for Linux RISC-V 32 bit
3939
- `riscv64-linux-gnu` for Linux RISC-V 64 bit
4040
- `s390x-linux-gnu` for Linux S390X
41-
- `armv7a-linux-android` for Android ARM 32 bit
42-
- `aarch64-linux-android` for Android ARM 64 bit
43-
- `x86_64-linux-android` for Android x86 64 bit
4441

45-
The paths are automatically configured and no other options are needed unless targeting [Android](../doc/build-android.md).
42+
The paths are automatically configured and no other options are needed.
4643

4744
### Install the required dependencies: Ubuntu & Debian
4845

depends/hosts/android.mk

Lines changed: 0 additions & 15 deletions
This file was deleted.

depends/packages/packages.mk

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,10 @@ boost_packages = boost
55
libevent_packages = libevent
66

77
qrencode_linux_packages = qrencode
8-
qrencode_android_packages = qrencode
98
qrencode_darwin_packages = qrencode
109
qrencode_mingw32_packages = qrencode
1110

1211
qt_linux_packages:=qt expat libxcb xcb_proto libXau xproto freetype fontconfig libxkbcommon libxcb_util libxcb_util_render libxcb_util_keysyms libxcb_util_image libxcb_util_wm
13-
qt_android_packages=qt
1412
qt_darwin_packages=qt
1513
qt_mingw32_packages=qt
1614

0 commit comments

Comments
 (0)