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

Add aarch64 qt depends support for cross compiling bitcoin-qt #13696

Merged
merged 1 commit into from
Aug 5, 2018

Conversation

TheCharlatan
Copy link
Contributor

This also adds a generic qt linux target in packages.mk . I am a bit confused by the existing docs for the RISC addition. Are there boards that would support running bitcoin-qt, or at the very least forwarding X over ssh? Is everybody building depends with NO_QT=1 when targeting RISC? If not, I will revert the change for a generic qt linux package definition back to the piecemeal solution.

This pull request should close #13495

@laanwj
Copy link
Member

laanwj commented Jul 18, 2018

Are there boards that would support running bitcoin-qt, or at the very least forwarding X over ssh? Is everybody building depends with NO_QT=1 when targeting RISC?

There apparently are boards that support that according to this comment: #13543 (comment)
That said, the RISC-V depends build for qt currently doesn't work. NO_QT=1 is required.
PR #13660 aims to solve that.

@Sjors
Copy link
Member

Sjors commented Jul 18, 2018

Being able to incrementally add QT binaries for new architecture is probably useful.

Make sure to try a Gitian build, see #13700.

@Sjors
Copy link
Member

Sjors commented Jul 18, 2018

I was able to cross compile this on a Bionic host.

I don't have a desktop environment at the moment, but bitcoin-qt --help my device complains:

./bitcoin-qt: error while loading shared libraries: libfontconfig.so.1: cannot open shared object file: No such file or directory

@theuni
Copy link
Member

theuni commented Jul 18, 2018

I'd rather not have to add this for every arch we encounter. It's annoying that qt doesn't have a generic target allowing you to specify individual toolchain components, so I made my own:

See here: theuni@b720478

@TheCharlatan how about pulling that in rather than the second chunk here?

Edit: Also, note that there's no longer anything arch-specific in the qt recipe. So it's possible that arches like risc-v "just work" now. I think that's a good enough justification for getting rid of the conditional qt build.

@TheCharlatan
Copy link
Contributor Author

@theuni added your commit on top of mine. Great Work, this should make everything build.

@TheCharlatan TheCharlatan force-pushed the aarch64Depends branch 2 times, most recently from 0ec0710 to a424baa Compare July 20, 2018 12:16
@Sjors
Copy link
Member

Sjors commented Jul 20, 2018

this should make everything build

Except Travis :trollface:

My MacOS isn't happy either, at the end:

ERROR: Feature 'openssl-linked' was enabled, but the pre-condition '!features.securetransport && libs.openssl' failed.

ERROR: Feature 'openssl' was enabled, but the pre-condition '!features.securetransport && (features.openssl-linked || libs.openssl_headers)' failed.
make: *** [/Volumes/SSD/src/bitcoin/depends/work/build/x86_64-apple-darwin17.6.0/qt/5.9.6-cb944b1f839/qtbase/.stamp_configured] Error 3

I'll try the cross-compiled QT binaries again on a 64 bit device shortly.

@theuni
Copy link
Member

theuni commented Jul 20, 2018

Huh, I guess clang ends up using the gcc flags. qt's buildsystem is so wonky!

Testing a fix.

@theuni
Copy link
Member

theuni commented Jul 20, 2018

@TheCharlatan See here: https://github.com/theuni/bitcoin/commits/13696 That's 3 more commits on top of the one here.

That adds a generic config for macOS like the linux one, and fixes up a few things with the linux/mingw build.

Ideally we'd create a bitcoin-specific device for mingw as well so that everything builds the same, but I won't be able to get to that today. Any volunteers? :)

Ordinarily I'd suggest that we just merge the previous version of your PR as-is, then merge my changes as a follow-up, but That would mean travis would be rebuilding depends a whole bunch of times, so I'd prefer to knock this out in one go.

@Sjors
Copy link
Member

Sjors commented Jul 21, 2018

I'm still getting the same OpenSSL error when building depends on macOS with 900c53a. Here's my log.

Cross-compile (on Bionic) also still gets me the same error on the device (while the bitcoind binary doesn't have that problem):

./bitcoin-qt: error while loading shared libraries: libfontconfig.so.1: cannot open shared object file: No such file or directory

@DrahtBot
Copy link
Contributor

DrahtBot commented Jul 22, 2018

Note to reviewers: This pull request conflicts with the following ones:

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.

@TheCharlatan
Copy link
Contributor Author

Drahtbot also does not seem to build bitcoin-qt (or at least it is not present in the aarch64 archive).

@TheCharlatan
Copy link
Contributor Author

Sorry, looked at the wrong archive. It does indeed build bitcoin-qt. @Sjors maybe your problem with openssl is unrelated after all.

@Sjors
Copy link
Member

Sjors commented Jul 23, 2018

If @DrahtBot can build it using Gitian, then that's good enough for me now. Will figure out what's wrong with my Gitian machine.

Running that binary on my device, it now throwsqt.qpa.screen: QXcbConnection: Could not connect to display, which is what I would except given the lack of display.

@Sjors
Copy link
Member

Sjors commented Jul 24, 2018

Tried again on Bionic:

sha256sum src/qt/bitcoin-qt 
2a692455e5f943761f4c164036bb4932eb8fe56f9ca99f847c636b38af29398d  src/qt/bitcoin-qt

Now it correctly throws Could not connect to display. So sounds like I was doing something wrong before, probably silent failure due to a missing dependency.

I installed a desktop for the occasion:

khadas

I also tried building the depends again on macOS. For that I rebased on master just in case, because master works (except for #13750, but this PR removes that problematic line). Still the same OpenSSL error. I'll dig a bit more.

@Sjors
Copy link
Member

Sjors commented Jul 24, 2018

@theuni
Copy link
Member

theuni commented Jul 24, 2018

@Sjors yes, my changes will cause problems for native macOS builds. I'll work on fixing that up.

@maflcko
Copy link
Member

maflcko commented Jul 29, 2018

What is the status of native macOS build on this pull request? If we can't get these to work, we should probably remove the 0.17 milestone?

@ken2812221
Copy link
Contributor

I think we can rollback to the previous way and use generic config after 0.17 branch split off.

@TheCharlatan
Copy link
Contributor Author

@theuni , are you fine with rolling back to my initial commit, or do you have a fix available already?

@theuni
Copy link
Member

theuni commented Aug 1, 2018

@TheCharlatan Yes, I guess rolling back would be best. Sorry for the back and forth :(

Qmake doesn't seem to support what I'm trying to do at all, so I'll put the more invasive changes on hold until the next qt bump. Maybe we'll end up with a nice clean qt build just in time for some wacky new Qt6 buildsystem :)

@TheCharlatan
Copy link
Contributor Author

Force pushed to remove the generic qt builds. @theuni I created a seperate branch on my repo that still contains your changes as they were before.

@TheCharlatan
Copy link
Contributor Author

I'll be offline the next two weeks, but would still very much like this to go into 0.17. If anything needs to be added/changed, feel free to close this and reopen as another pr.

@Sjors
Copy link
Member

Sjors commented Aug 2, 2018

Thanks! I already tested 0bbe899 above, and 00db418 is the same but rebased, so tACK.

@MarcoFalke can you do one of those fancy gitian builds to make sure 64-bit QT for ARM is now in it?

@DrahtBot
Copy link
Contributor

DrahtBot commented Aug 3, 2018

Gitian builds for commit aa30e4b (master):

Gitian builds for commit 4f5ff4cfec6d5fc61d2ab4c0e509a5dab9889661 (master and this pull):

@ken2812221
Copy link
Contributor

utACK 00db418

@Sjors
Copy link
Member

Sjors commented Aug 3, 2018

Tested the new Gitian binaries again on a desktop. For some reason I can't interact with a keyboard at all, e.g. I can't type commands in the console screen. I tried both a physical and onscreen keyboard. This might be some quirk with my device, but would be good if someone else tried it too.

@maflcko maflcko merged commit 00db418 into bitcoin:master Aug 5, 2018
maflcko pushed a commit that referenced this pull request Aug 5, 2018
…oin-qt

00db418 Add aarch64 qt depends support for cross compiling bitcoin-qt (TheCharlatan)

Pull request description:

  This also adds a generic qt linux target in packages.mk . I am a bit confused by the existing docs for the RISC addition. Are there boards that would support running bitcoin-qt, or at the very least forwarding X over ssh? Is everybody building depends with `NO_QT=1` when targeting RISC? If not, I will revert the change for a generic qt linux package definition back to the piecemeal solution.

  This pull request should close #13495

Tree-SHA512: 519b951bf50f214ad725e5330094582a212333cd85b0ae442c67f9afec5629995dfad130258c7706a61f7b7cccbfa49bce69b9931f7e30cf12b382cd9a0a4749
@TheCharlatan TheCharlatan deleted the aarch64Depends branch August 15, 2019 16:26
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Jul 29, 2020
…ng bitcoin-qt

00db418 Add aarch64 qt depends support for cross compiling bitcoin-qt (TheCharlatan)

Pull request description:

  This also adds a generic qt linux target in packages.mk . I am a bit confused by the existing docs for the RISC addition. Are there boards that would support running bitcoin-qt, or at the very least forwarding X over ssh? Is everybody building depends with `NO_QT=1` when targeting RISC? If not, I will revert the change for a generic qt linux package definition back to the piecemeal solution.

  This pull request should close bitcoin#13495

Tree-SHA512: 519b951bf50f214ad725e5330094582a212333cd85b0ae442c67f9afec5629995dfad130258c7706a61f7b7cccbfa49bce69b9931f7e30cf12b382cd9a0a4749
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Jul 29, 2020
…ng bitcoin-qt

00db418 Add aarch64 qt depends support for cross compiling bitcoin-qt (TheCharlatan)

Pull request description:

  This also adds a generic qt linux target in packages.mk . I am a bit confused by the existing docs for the RISC addition. Are there boards that would support running bitcoin-qt, or at the very least forwarding X over ssh? Is everybody building depends with `NO_QT=1` when targeting RISC? If not, I will revert the change for a generic qt linux package definition back to the piecemeal solution.

  This pull request should close bitcoin#13495

Tree-SHA512: 519b951bf50f214ad725e5330094582a212333cd85b0ae442c67f9afec5629995dfad130258c7706a61f7b7cccbfa49bce69b9931f7e30cf12b382cd9a0a4749
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Jul 29, 2020
…ng bitcoin-qt

00db418 Add aarch64 qt depends support for cross compiling bitcoin-qt (TheCharlatan)

Pull request description:

  This also adds a generic qt linux target in packages.mk . I am a bit confused by the existing docs for the RISC addition. Are there boards that would support running bitcoin-qt, or at the very least forwarding X over ssh? Is everybody building depends with `NO_QT=1` when targeting RISC? If not, I will revert the change for a generic qt linux package definition back to the piecemeal solution.

  This pull request should close bitcoin#13495

Tree-SHA512: 519b951bf50f214ad725e5330094582a212333cd85b0ae442c67f9afec5629995dfad130258c7706a61f7b7cccbfa49bce69b9931f7e30cf12b382cd9a0a4749
CryptoCentric pushed a commit to absolute-community/absolute that referenced this pull request Jul 2, 2021
…ng bitcoin-qt

00db418 Add aarch64 qt depends support for cross compiling bitcoin-qt (TheCharlatan)

Pull request description:

  This also adds a generic qt linux target in packages.mk . I am a bit confused by the existing docs for the RISC addition. Are there boards that would support running bitcoin-qt, or at the very least forwarding X over ssh? Is everybody building depends with `NO_QT=1` when targeting RISC? If not, I will revert the change for a generic qt linux package definition back to the piecemeal solution.

  This pull request should close bitcoin#13495

Tree-SHA512: 519b951bf50f214ad725e5330094582a212333cd85b0ae442c67f9afec5629995dfad130258c7706a61f7b7cccbfa49bce69b9931f7e30cf12b382cd9a0a4749
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Dec 16, 2021
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.

QT cross compile to ARM
8 participants