Skip to content

Conversation

hebasto
Copy link
Member

@hebasto hebasto commented Jul 26, 2021

On master (1488f55) if depends are built with the customized SOURCES_PATH variable, the following make apk fails for Android host (see #22522).

Fixes #22522.

@DrahtBot
Copy link
Contributor

DrahtBot commented Jul 26, 2021

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

Conflicts

Reviewers, this pull request conflicts with the following ones:

  • #23611 (build: add LTO option to depends (no Qt) by fanquake)
  • #22552 (build: Improve depends build system robustness 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.

@achow101
Copy link
Member

Seems to work.

@hebasto hebasto marked this pull request as ready for review July 26, 2021 19:54
@hebasto
Copy link
Member Author

hebasto commented Jul 26, 2021

This PR is based on #22552, and only the last two commits belong to this one.

The dependency on #22552 could be eliminated by replacing $(qt_file_name) with a hardcoded value, but it will definitely bad for maintainability.

@icota
Copy link
Contributor

icota commented Jul 31, 2021

I can confirm this fixes my Android build issues. I haven't yet looked at the code.

@hebasto
Copy link
Member Author

hebasto commented Sep 2, 2021

Rebased 886e804 -> 5005c8e (pr22555.02 -> pr22555.03) due to the conflict with #22840.

@hebasto
Copy link
Member Author

hebasto commented Apr 21, 2022

Rebased 580efc5 -> 5f09974 (pr22555.11 -> pr22555.12).

@hebasto hebasto force-pushed the 210726-apk branch 2 times, most recently from 67a8a47 to 7d31069 Compare April 21, 2022 14:31
@hebasto
Copy link
Member Author

hebasto commented Apr 21, 2022

Ok, I reworked this PR:

Should be a bit easier to review now :)

Friendly ping @achow101 @icota @fanquake

@achow101
Copy link
Member

ACK 7d31069

@fanquake
Copy link
Member

Concept ~0. Adding more code to our depends and build systems, just to accommodate building for android in a "non-default" way is a bit meh. The people using this target with a custom SOURCES_PATH, which I'd assume is not many at all, could also just set QT_BASE_PATH.

@hebasto
Copy link
Member Author

hebasto commented May 28, 2022

Rebased 7d31069 -> 5d166df (pr22555.13 -> pr22555.14) due to the conflict with #24866.

@hebasto
Copy link
Member Author

hebasto commented May 28, 2022

@fanquake

Adding more code to our depends and build systems...

Also some lines have been removed from src/Makefile.qt.include :)

... just to accommodate building for android in a "non-default" way is a bit meh. The people using this target with a custom SOURCES_PATH, which I'd assume is not many at all...

This PR is not about adding a new feature for a few developers, but about fixing a bug in the existing feature. If consider to accept the point mentioned above, probably #22522 should be closed and the SOURCES_PATH variable should be removed from our depends and build system, no?

... could also just set QT_BASE_PATH.

QT_BASE_PATH=<some-path> make apk won't fix #22522.

@ghost
Copy link

ghost commented May 30, 2022

I followed these steps from doc/build-android.md:

  1. Download Android Studio
  2. SDK Manager -> SDK Tools -> NDK
  3. Use ANDROID_SDK=/home/test/Android/Sdk ANDROID_NDK=/home/test/Android/Sdk/ndk-bundle make HOST=aarch64-linux-android ANDROID_API_LEVEL=28 ANDROID_TOOLCHAIN_BIN=/home/test/Android/Sdk/ndk-bundle/toolchains/llvm/prebuilt/linux-x86_64/bin
  4. Run make && make apk in src/qt which gives same error as shared in build, android: make apk fails if depends source cache is in a non-default location #22522

image

@hebasto
Copy link
Member Author

hebasto commented May 30, 2022

@1440000bytes

3. Use ANDROID_SDK=/home/test/Android/Sdk ANDROID_NDK=/home/test/Android/Sdk/ndk-bundle make HOST=aarch64-linux-android ANDROID_API_LEVEL=28 ANDROID_TOOLCHAIN_BIN=/home/test/Android/Sdk/ndk-bundle/toolchains/llvm/prebuilt/linux-x86_64/bin

I didn't check everything for now, but seeing "NDK (Side be side)" in your screenshot makes me believe that ANDROID_NDK=/home/test/Android/Sdk/ndk-bundle is wrong. It should be something like /home/test/Android/Sdk/ndk/23.1.7779620.

@ghost
Copy link

ghost commented May 30, 2022

I changed it to ANDROID_NDK=/home/test/Android/Sdk/ndk/24.0.8215888/ but still same error

@hebasto
Copy link
Member Author

hebasto commented May 30, 2022

@1440000bytes

4. Run make && make apk in src/qt which gives same error as shared in #22522

It seems really strange for me, as in @achow101's issue "SOURCES_PATH is set to a non-default location", but you do not use the SOURCES_PATH variable at all.

Could you provide your commands and error messages exactly from your terminal please?

@DrahtBot
Copy link
Contributor

Guix builds

File commit ba48fcf
(master)
commit 59f1f67
(master and this pull)
SHA256SUMS.part 527e646748fc1d90... 3633ba4c946a9af3...
*-aarch64-linux-gnu-debug.tar.gz 35e4316bf1d357c4... 39e7ab8271962681...
*-aarch64-linux-gnu.tar.gz 1f85c099b29ea0dd... 90dfc01c299ca33c...
*-arm-linux-gnueabihf-debug.tar.gz d6df7e181bf616c3... dd19e4f2955798ae...
*-arm-linux-gnueabihf.tar.gz c129828b3df2b777... 19c00fe0a24f95aa...
*-arm64-apple-darwin-unsigned.dmg d1838dd296848007... d43647aae7f20ddd...
*-arm64-apple-darwin-unsigned.tar.gz fa36fd3da0059b2b... 5ed49f7c6c6601b0...
*-arm64-apple-darwin.tar.gz 423fff82ffd7ca8e... 1920816903e0682f...
*-powerpc64-linux-gnu-debug.tar.gz f4c86c9c0ed36279... 31973e854c6f2309...
*-powerpc64-linux-gnu.tar.gz 9100b771827546d9... d4c9c26350de4be8...
*-powerpc64le-linux-gnu-debug.tar.gz 8c4d736f9a77bde6... 22ea80cb86c729e1...
*-powerpc64le-linux-gnu.tar.gz 3a9e976703722adf... bef726099a126b48...
*-riscv64-linux-gnu-debug.tar.gz 07a4d7b931883408... c5a8df2fc2cccf23...
*-riscv64-linux-gnu.tar.gz 61a58feb2c777b96... 22755b5baf81da50...
*-win64-debug.zip c860ce15b3921ee5... 3af64b885c236bd7...
*-win64-setup-unsigned.exe c6396cd43abd87bb... 2226578282ee1930...
*-win64-unsigned.tar.gz 500f4a6fac75a565... 20e91f114e1573ee...
*-win64.zip 9da0e9ab96fadc5e... 20b7fd8203e80712...
*-x86_64-apple-darwin-unsigned.dmg 426c9a1341c018bb... 9dde8fdb0c880d38...
*-x86_64-apple-darwin-unsigned.tar.gz 480f25b0387d1e8c... ac5b3295729ac454...
*-x86_64-apple-darwin.tar.gz 787812227ae3eb7d... 95b8c61721c06027...
*-x86_64-linux-gnu-debug.tar.gz f21aa98511e3600a... 00c745c80d2b5675...
*-x86_64-linux-gnu.tar.gz 47415f7a5a9eb4c3... 5e61c35f86a1badd...
*.tar.gz 5b979b5c6941fb92... 6380e0a106d85085...
guix_build.log 9cf24d56f1eef11b... 63239999125f9419...
guix_build.log.diff cb3fd38ea8efb5c6...

@ghost
Copy link

ghost commented May 31, 2022

Could you provide your commands and error messages exactly from your terminal please?

https://pastebin.com/raw/kkduRKvs

@hebasto
Copy link
Member Author

hebasto commented May 31, 2022

@1440000bytes

Could you provide your commands and error messages exactly from your terminal please?

https://pastebin.com/raw/kkduRKvs

Thank you!

I think you did not build depends, and missed configuration step. It should be like that:

$ make -C depends HOST=aarch64-linux-android ANDROID_SDK=/home/hebasto/Android/Sdk ANDROID_NDK=/home/hebasto/Android/Sdk/ndk/23.1.7779620 ANDROID_API_LEVEL=28 ANDROID_TOOLCHAIN_BIN=/home/hebasto/Android/Sdk/ndk/23.1.7779620/toolchains/llvm/prebuilt/linux-x86_64/bin
$ ./autogen.sh
$ ./configure --quiet CONFIG_SITE=$PWD/depends/aarch64-linux-android/share/config.site --enable-suppress-external-warnings
$ make clean
$ cd src/qt
$ make
$ make apk

@DrahtBot
Copy link
Contributor

🐙 This pull request conflicts with the target branch and needs rebase.

Want to unsubscribe from rebase notifications on this pull request? Just convert this pull request to a "draft".

@hebasto hebasto closed this Jul 21, 2022
@bitcoin bitcoin locked and limited conversation to collaborators Jul 21, 2023
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.

build, android: make apk fails if depends source cache is in a non-default location
6 participants