Skip to content

QT cross compile to ARM #13495

@Sjors

Description

@Sjors

There are ARM devices out there with HDMI and full desktop linux support. I was able to compile and use QT on an Orange Pi Plus2E running Lubuntu 16.04. Compilation on the device itself takes several hours and QT spends a few minutes loading stuff, but otherwise the UI is pretty snappy.

Gitian builds currently don't include binaries for ARM. Cross compilation (for Gitian) was added in #8188, but QT was intentionally left out. Does anyone remember why?

I've been trying to get this to work on Ubuntu Bionic, but no success so far.

The first step to enabling this (for 32 bit) is to add qt_arm_linux_packages:=$(qt_x86_64_linux_packages) to depends/packages.mk. That prevents it from skipping QT. This however will result in an error:

make HOST=arm-linux-gnueabihf

Configuring qt...

[...]

   The specified system/compiler is not supported:

      [...]/bitcoin/depends/work/build/arm-linux-gnueabihf/qt/5.7.1-c292d7b0435/qtbase/mkspecs/arm-linux-gnueabihf

   Please see the README file for a complete list.

funcs.mk:242: recipe for target '[...]/bitcoin/depends/work/build/arm-linux-gnueabihf/qt/5.7.1-c292d7b0435/qtbase/.stamp_con

I tried replacing $(package)_config_opts_arm_linux = $(host) with = -platform linux-g++ -xplatform linux-arm-gnueabi-g++, which seems to result in something being built. But configure isn't happy:

./configure --prefix=$PWD/depends/arm-linux-gnueabihf --enable-glibc-back-compat --enable-reduce-exports LDFLAGS=-static-libstdc++ --disable-tests --disable-bench --with-qrencode --with-gui=qt5
[...]
checking for QT5... yes
checking for QT_TEST... yes
checking for QT_DBUS... yes
checking for static Qt... yes
checking for QTPLATFORM... yes
checking for X11XCB... yes
checking for QTXCBQPA... yes
checking for Qt < 5.4... no
checking for static Qt plugins: -lqminimal... no
configure: error: Could not resolve: -lqminimal

I tried building the depends with #12971 with QT_59=1, but this fails with:

Note: Disabling X11 Accessibility Bridge: D-Bus or AT-SPI is missing.

ERROR: Feature 'system-zlib' was enabled, but the pre-condition 'libs.zlib' failed.
funcs.mk:242: recipe for target '[...]/bitcoin/depends/work/build/arm-linux-gnueabihf/qt/5.9.5-28b90c3bee9/qtbase/.stamp_configured' failed
make: *** [[...]/bitcoin/depends/work/build/arm-linux-gnueabihf/qt/5.9.5-28b90c3bee9/qtbase/.stamp_configured] Error 3

Hopefully someone who actually understands the depends system and cross compilation has more luck...

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions