Cross Compile QT5 Sources
Cross Compile QT5 Sources
/home/first/buildroot/blrpi3_32/buildroot-2017.05/output/host/usr/bin
http://doc.qt.io/qt-5/configure-options.html
export PATH=/home/first/buildroot/blrpi3_32/buildroot-2017.05/output/host/usr/bin:$PATH
source ACTIVATE.sh
aarch64-linux-gnu-g++
Note that we dont have our compiler that we create using cross too ng
#
# qmake configuration for building with arm-linux-gnueabi-g++
#
MAKEFILE_GENERATOR = UNIX
CONFIG += incremental
QMAKE_INCREMENTAL_STYLE = sublib
include(../common/linux.conf)
include(../common/gcc-base-unix.conf)
include(../common/g++-unix.conf)
# modifications to g++.conf
QMAKE_CC = arm-linux-gnueabi-gcc
QMAKE_CXX = arm-linux-gnueabi-g++
QMAKE_LINK = arm-linux-gnueabi-g++
QMAKE_LINK_SHLIB = arm-linux-gnueabi-g++
# modifications to linux.conf
QMAKE_AR = arm-linux-gnueabi-ar cqs
QMAKE_OBJCOPY = arm-linux-gnueabi-objcopy
QMAKE_NM = arm-linux-gnueabi-nm -P
QMAKE_STRIP = arm-linux-gnueabi-strip
load(qt_config)
#
# qmake configuration for building with aarch64-linux-gnu-g++
#
MAKEFILE_GENERATOR = UNIX
CONFIG += incremental
QMAKE_INCREMENTAL_STYLE = sublib
include(../common/linux.conf)
include(../common/gcc-base-unix.conf)
include(../common/g++-unix.conf)
# modifications to g++.conf
QMAKE_CC = aarch64-linux-gnu-gcc
QMAKE_CXX = aarch64-linux-gnu-g++
QMAKE_LINK = aarch64-linux-gnu-g++
QMAKE_LINK_SHLIB = aarch64-linux-gnu-g++
# modifications to linux.conf
QMAKE_AR = aarch64-linux-gnu-ar cqs
QMAKE_OBJCOPY = aarch64-linux-gnu-objcopy
QMAKE_NM = aarch64-linux-gnu-nm -P
QMAKE_STRIP = aarch64-linux-gnu-strip
load(qt_config)
./configure -platform
-device - a specific device or chipsets. The list of devices that configure is compatible
with are found in qtbase/mkspecs/devices. For more information, visit
the Devices Wiki page.
We can create a new device and put all the options there
-sysroot specify the root file system ( can be take from buildroot)
-sysroot /home/first/buildroot/blrpi3_32/buildroot-2017.05/output/host/usr/aarch64-buildroot-
linux-gnu/sysroot
-opensource -confirm-license
the result of the configure is not satisfied, many libraries are not included.
Build options:
Mode ................................... release
Optimize release build for size ........ no
Building shared libraries .............. yes
Using C++ standard ..................... C++1z
Using gold linker ...................... no
Using new DTAGS ........................ yes
Using precompiled headers .............. yes
Using LTCG ............................. no
Target compiler supports:
NEON ................................. yes
Build parts ............................ libs examples
Qt modules and options:
Qt Concurrent .......................... yes
Qt D-Bus ............................... yes
Qt D-Bus directly linked to libdbus .... no
Qt Gui ................................. yes
Qt Network ............................. yes
Qt Sql ................................. yes
Qt Testlib ............................. yes
Qt Widgets ............................. yes
Qt Xml ................................. yes
Support enabled for:
Using pkg-config ....................... no
QML debugging .......................... yes
udev ................................... no
Using system zlib ...................... no
Qt Core:
DoubleConversion ....................... yes
Using system DoubleConversion ........ no
GLib ................................... no
iconv .................................. yes
ICU .................................... no
Logging backends:
journald ............................. no
syslog ............................... no
slog2 ................................ no
Using system PCRE2 ..................... no
Qt Network:
getaddrinfo() .......................... yes
getifaddrs() ........................... yes
IPv6 ifname ............................ yes
libproxy ............................... no
OpenSSL ................................ no
Qt directly linked to OpenSSL ........ no
SCTP ................................... no
Use system proxies ..................... yes
Qt Sql:
DB2 (IBM) .............................. no
InterBase .............................. no
MySql .................................. no
OCI (Oracle) ........................... no
ODBC ................................... no
PostgreSQL ............................. no
SQLite2 ................................ no
SQLite ................................. yes
Using system provided SQLite ......... no
TDS (Sybase) ........................... no
Qt Gui:
Accessibility .......................... yes
FreeType ............................... yes
Using system FreeType ................ no
HarfBuzz ............................... yes
Using system HarfBuzz ................ no
Fontconfig ............................. no
Image formats:
GIF .................................. yes
ICO .................................. yes
JPEG ................................. yes
Using system libjpeg ............... no
PNG .................................. yes
Using system libpng ................ no
EGL .................................... no
OpenVG ................................. no
OpenGL:
Desktop OpenGL ....................... no
OpenGL ES 2.0 ........................ no
OpenGL ES 3.0 ........................ no
OpenGL ES 3.1 ........................ no
Session Management ..................... yes
Features used by QPA backends:
evdev .................................. yes
libinput ............................... no
mtdev .................................. no
tslib .................................. no
xkbcommon-evdev ........................ no
QPA backends:
DirectFB ............................... no
EGLFS .................................. no
LinuxFB ................................ yes
VNC .................................... yes
Mir client ............................. no
Qt Widgets:
GTK+ ................................... no
Styles ................................. Fusion Windows
Qt PrintSupport:
CUPS ................................... no
Qt SerialBus:
Socket CAN ............................. yes
Socket CAN FD .......................... yes
QtXmlPatterns:
XML schema support ..................... yes
Qt QML:
QML interpreter ........................ yes
QML network support .................... yes
Qt Quick:
Direct3D 12 ............................ no
AnimatedImage item ..................... yes
Canvas item ............................ yes
Support for Quick Designer ............. yes
Flipable item .......................... yes
GridView item .......................... yes
ListView item .......................... yes
Path support ........................... yes
PathView item .......................... yes
Positioner items ....................... yes
ShaderEffect item ...................... yes
Sprite item ............................ yes
Qt Gamepad:
SDL2 ................................... no
Qt 3D:
Assimp ................................. yes
System Assimp .......................... no
Output Qt3D Job traces ................. no
Output Qt3D GL traces .................. no
Qt 3D GeometryLoaders:
Autodesk FBX ........................... no
Qt Wayland Client ........................ no
Qt Wayland Compositor .................... no
Qt Bluetooth:
BlueZ .................................. no
BlueZ Low Energy ....................... no
Linux Crypto API ....................... no
Qt Sensors:
sensorfw ............................... no
Qt Multimedia:
ALSA ................................... no
GStreamer 1.0 .......................... no
GStreamer 0.10 ......................... no
Video for Linux ........................ yes
OpenAL ................................. no
PulseAudio ............................. no
Resource Policy (libresourceqt5) ....... no
Windows Audio Services ................. no
DirectShow ............................. no
Windows Media Foundation ............... no
Qt Quick Controls 2:
Styles ................................. Default Material Universal
Qt Quick Templates 2:
Hover support .......................... yes
Qt Location:
Gypsy GPS Daemon ....................... no
WinRT Geolocation API .................. no
Qt WebEngine:
Embedded build ......................... yes
Pepper Plugins ......................... no
Printing and PDF ....................... no
Proprietary Codecs ..................... no
Spellchecker ........................... yes
WebRTC ................................. no
Using system ninja ..................... no
ALSA ................................... no
PulseAudio ............................. no
System libraries:
ICU .................................. no
libwebp and libwebpdemux ............. no
Opus ................................. no
ffmpeg ............................... no
Compile an example:
Go to the examples directory:
for example:
/home/first/Qt/Examples/Qt-5.9/embedded/flickable
/home/first/Qt/Examples/Qt-5.9/widgets/dialogs/tabdialog
note , if dont compile buildroot with QT we will not have qmake in the bin folder
( Or cross compile it from source)
/home/first/buildroot/blrpi3_32/buildroot-2017.05/output/host/usr/bin/qmake $1 -
spec ../../../../../5.9/Src/qtbase/mkspecs/aarch64-linux-gnu-g++
./compile tabdialog.pro
/home/first/buildroot/blrpi3_32/buildroot-2017.05/output/host/usr/bin/qmake $1 -spec
/home/first/Qt/5.9/Src/qtbase/mkspecs/aarch64-linux-gnu-g++ CONFIG+=debug
CONFIG+=qml_debug
export PATH=/home/first/buildroot/blrpi3_32/buildroot-2017.05/output/host/usr/bin:$PATH
first@eliaradfirst:~/buildroot/blrpi3_32/buildroot-2017.05$ ls output/host/usr/bin/qmake
output/host/usr/bin/qmake
* I needed to increase the block size because the file system exceed the default of 120000
Using the out cross tool ng for raspberry pi 3 cross compiler:
Btw , when I selected 4.10 I got kernel panic ( did not tried it two times to make sure it was the
problem)
but this kernel panel sync init is coming back from time to time.
This
is a
ct-ng aarch64-rpi3-linux-gnueabi
we can see the Emit assembly for CPU – is the raspberry pi A53