Qt 5.11 cross build for armhf on Debian9 (trial)


I realized that QJsonDocument performance is quite good compared to boost::property_tree::ptree and it was even better than nlohmann c++ parser for paring QtPlatz's delay/pulse generator time event data (HV values, timing list etc. that is about 3k characters length).  A key issue is whether it can be compiled for armhf based Debian in order to cross-compile for de0-nano-soc.  Just a quick trial for cross-compiling Qt core library;


mkdir build
cd build
../qt-everywhere-src-5.11.1/configure -v -prefix /usr/local/arm-linux-gnueabihf/opt/Qt/5.11.1 -xplatform linux-arm-gnueabihf-g++
make -j8

Before run above command, prepare linux-arm-gnueabihf-g++ directory should be prepared under qtbase/mkspecs directory as the copy of linux-arm-gnueabi-g++, and edit qmake.conf file for compiler command name as appropriate. 



I could not figured out an exception issue while Qt 5.2.1 linux 64 installer, this is walkthough to install Qt 5.2 from source.

Detail description is http://qt-project.org/wiki/Building_Qt_5_from_Git Following command will get an initial part of qt5 source.


  • Perl 5.14.2 was installed already on my target Debian 7.5
  • Python 2.7.3 was installed by "apt-get install python"
  • gcc 4.7.2 (Debian 4.8.2-5) and toolchains was installed

apt-get required tools

sudo apt-get install "^libxcb.*" libx11-xcb-dev libglu1-mesa-dev libxrender-dev

Get a source

$ git clone git://gitorious.org/qt/qt5.git qt5
$ cd qt5
$ perl init-repository

Config and build

$ ./configure -opensource -nomake examples -nomake tests

User login