-
Notifications
You must be signed in to change notification settings - Fork 38.7k
Add depends 32-bit arm support for bitcoin-qt #13604
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Concept ACK. Not just Raspberry Pi, also various clones via Armbian.
Fixes the 32-bit part of #13495.
depends/packages/packages.mk
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the role of $(qt_packages), especially given that qt_i686_linux_packages doesn't have it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good findings. I could remove all these changes (I had them in while I was debugging things) and it still seems to run fine. Can you re-run a gitian with b86d49f ?
depends/packages/qt.mk
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For future reference: what's wrong with system-zlib?
depends/packages/qt.mk
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this go away?
|
The Travis job times out with this change. Not sure how to get it to run through. |
|
I restarted the Travis job, but that doesn't seem to help much. |
|
I'm able to build a binary using Armbian: Sjors/armbian-bitcoin-core#1 However, when I launch QT on an Orange Pi I get: This might be because I compiled on Bionic and the target machine uses Xenial*, with libc6 version 2.23 I'll try again with an Armbian on a Ubuntu 16.04 VM.
|
|
Alternatively you could also apply #13177 and test if it also works for arm. |
|
Cherry-picking that branch did the trick, nice! |
|
I'm also trying a gitian build, but that gets stuck at something that seems pretty unrelated (not even the same architecture): |
|
@ken2812221 thanks. I just deleted those architectures from the gitian descriptor and tried again. Binary works on device as well. tACK 8ef00e8, assuming Travis gives its blessing |
|
my first question when seeing this is: why only 32-bit?—is this already supported for 64-bit, or does 64-bit ARM provide additional challenges? |
|
A particularly stubborn Travis timeout. Maybe the ccache needs to be bigger? Or perhaps cache |
|
I'm not sure if your suggestion @Sjors may have unwanted side effects to the Travis jobs. It seems like the linux qt builds are disabled for this reason in the Travis build matrix. Otherwise I'll remove the Travis change from the pr and hope that enough people run it through gitian to verify? |
|
Removed the Travis patch. To test this pull request, build it locally. |
|
I restarted the Apple Darwin instance |
theuni
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Concept ACK.
depends/packages/qt.mk
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's make this $(host)-g++. Then below, we can copy to qtbase/mkspecs/$(host)-g++, and use sed to replace arm-linux-gnueabi- with $(host)-.
That way subarches (armv6, for example) just work as intended.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The sed patch is only intended for adding hard float support. I don't think this should be done for aarch64 as well (which seems to be the only other mkspec that matches the $(host) triplet).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, but then we can reuse it for aarch64. All that would be necessary to add it (assuming everything else is working) would be:
$(package)_config_opts_aarch64_linux = -platform linux-g++ -xplatform $(host)-g++
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I get Invalid target platform 'arm-linux-gnueabihf-g++' when I replace it with $(host)-g++.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This works for me:
diff --git a/depends/packages/qt.mk b/depends/packages/qt.mk
index b4d7756..c09c02d 100644
--- a/depends/packages/qt.mk
+++ b/depends/packages/qt.mk
@@ -89,7 +89,7 @@ $(package)_config_opts_linux += -system-freetype
$(package)_config_opts_linux += -no-feature-sessionmanager
$(package)_config_opts_linux += -fontconfig
$(package)_config_opts_linux += -no-opengl
-$(package)_config_opts_arm_linux = -platform linux-g++ -xplatform $(host)
+$(package)_config_opts_arm_linux += -platform linux-g++ -xplatform $(host)-g++
$(package)_config_opts_i686_linux = -xplatform linux-g++-32
$(package)_config_opts_x86_64_linux = -xplatform linux-g++-64
$(package)_config_opts_mingw32 = -no-opengl -xplatform win32-g++ -device-option CROSS_COMPILE="$(host)-"
@@ -128,6 +128,8 @@ define $(package)_preprocess_cmds
cp -f qtbase/mkspecs/macx-clang/Info.plist.app qtbase/mkspecs/macx-clang-linux/ &&\
cp -f qtbase/mkspecs/macx-clang/qplatformdefs.h qtbase/mkspecs/macx-clang-linux/ &&\
cp -f $($(package)_patch_dir)/mac-qmake.conf qtbase/mkspecs/macx-clang-linux/qmake.conf && \
+ cp -r qtbase/mkspecs/linux-arm-gnueabi-g++ qtbase/mkspecs/$(host)-g++ && \
+ sed -i s/arm-linux-gnueabi-/$(host)-/g qtbase/mkspecs/$(host)-g++/qmake.conf && \
patch -p1 -i $($(package)_patch_dir)/fix_qt_pkgconfig.patch &&\
patch -p1 -i $($(package)_patch_dir)/fix_configure_mac.patch &&\
patch -p1 -i $($(package)_patch_dir)/fix_no_printer.patch &&\There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The second chunk could result in undesired behaviour, because you end up copying the arm mkspecs over whatever the $(host)'s mkspecs are supposed to be.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point. Using bitcoin-$(host)-g++ would guarantee that can't happen.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do not understand how that would work. Can you post another patch for it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess the spec name doesn't need to change, all that matters is the sed. Simplified:
diff --git a/depends/packages/qt.mk b/depends/packages/qt.mk
index b4d7756..22cf4f5 100644
--- a/depends/packages/qt.mk
+++ b/depends/packages/qt.mk
@@ -89,7 +89,7 @@ $(package)_config_opts_linux += -system-freetype
$(package)_config_opts_linux += -no-feature-sessionmanager
$(package)_config_opts_linux += -fontconfig
$(package)_config_opts_linux += -no-opengl
-$(package)_config_opts_arm_linux = -platform linux-g++ -xplatform $(host)
+$(package)_config_opts_arm_linux += -platform linux-g++ -xplatform bitcoin-linux-g++
$(package)_config_opts_i686_linux = -xplatform linux-g++-32
$(package)_config_opts_x86_64_linux = -xplatform linux-g++-64
$(package)_config_opts_mingw32 = -no-opengl -xplatform win32-g++ -device-option CROSS_COMPILE="$(host)-"
@@ -128,6 +128,8 @@ define $(package)_preprocess_cmds
cp -f qtbase/mkspecs/macx-clang/Info.plist.app qtbase/mkspecs/macx-clang-linux/ &&\
cp -f qtbase/mkspecs/macx-clang/qplatformdefs.h qtbase/mkspecs/macx-clang-linux/ &&\
cp -f $($(package)_patch_dir)/mac-qmake.conf qtbase/mkspecs/macx-clang-linux/qmake.conf && \
+ cp -r qtbase/mkspecs/linux-arm-gnueabi-g++ qtbase/mkspecs/bitcoin-linux-g++ && \
+ sed -i s/arm-linux-gnueabi-/$(host)-/g qtbase/mkspecs/bitcoin-linux-g++/qmake.conf && \
patch -p1 -i $($(package)_patch_dir)/fix_qt_pkgconfig.patch &&\
patch -p1 -i $($(package)_patch_dir)/fix_configure_mac.patch &&\
patch -p1 -i $($(package)_patch_dir)/fix_no_printer.patch &&\The effect is that we essentially have a universal linux mkspec now, it just changes the compiler names to match the HOST passed in.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK.
depends/packages/packages.mk
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since there's no point in making the distinction here, let's just get rid of it.
qt_x86_64_linux_packages can just become qt_linux_packages, then qt_i686_linux_packages and qt_arm_linux_package are no longer needed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The patch does not work yet for aarch64, so I think we should keep it like this until that it is fixed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Making the suggested change above will make it so that no change is needed here for aarch64.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Substituting qt_x86_64_linux_packages with qt_linux_packages means that qt will be built for all Linux architectures. When I do that and remove the two lines below, a aarch64-linux-gnu depends build will also try to build qt, but will fail as I mentioned in #13495 .
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, ok, I forgot we purposefully limited that way.
Some hobbyists are used to using the desktop for interfacing with their raspberry pi. This commits adds qt to the arm-linux-gnueabihf target.
|
Force-pushed to respond to @theuni's review. |
|
Concept ACK aarch64 support can be added later, after the issue with xextproto are dealt with and migration to Bionic for gitian builds is complete. |
|
re-tACK 4b69984 (I retested cross-compile and running on a device, not Gitian) |
|
For some reason Adding If it's complicated, I'm fine with trying this fix this some other time, I'd rather get this in 0.17 |
|
I get the same xml error when I try to apply @Fuzzbawls patch for aarch64 support. |
|
@theuni Does your "changes requested" still apply? |
theuni
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
utACK 4b69984
|
Maybe add "for cross-compilation" to the commit message? |
|
utACK 4b69984 |
4b69984 Add depends 32-bit arm support for bitcoin-qt (Sebastian Kung) Pull request description: Some hobbyists are used to using the desktop for interfacing with their raspberry pi. This commits adds qt to the arm-linux-gnueabihf target. Tree-SHA512: cb03387267eb8f68dfd79735c2c01c5a119c406e5578805e60b377934da42d46cb34d35e45c8843979dfb4070859c553d09ae348b468d9731523f33307132fa8
|
Gitian builds for master are now broken: #13700 |
| cp -f qtbase/mkspecs/macx-clang/qplatformdefs.h qtbase/mkspecs/macx-clang-linux/ &&\ | ||
| cp -f $($(package)_patch_dir)/mac-qmake.conf qtbase/mkspecs/macx-clang-linux/qmake.conf && \ | ||
| cp -r qtbase/mkspecs/linux-arm-gnueabi-g++ qtbase/mkspecs/bitcoin-linux-g++ && \ | ||
| sed -i s/arm-linux-gnueabi-/$(host)-/g qtbase/mkspecs/bitcoin-linux-g++/qmake.conf && \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
macOS doesn't like this, see #13750
4b69984 Add depends 32-bit arm support for bitcoin-qt (Sebastian Kung) Pull request description: Some hobbyists are used to using the desktop for interfacing with their raspberry pi. This commits adds qt to the arm-linux-gnueabihf target. Tree-SHA512: cb03387267eb8f68dfd79735c2c01c5a119c406e5578805e60b377934da42d46cb34d35e45c8843979dfb4070859c553d09ae348b468d9731523f33307132fa8
|
Please see #18536. |
Some hobbyists are used to using the desktop for interfacing with their raspberry pi. This commits adds qt to the arm-linux-gnueabihf target.