AnsweredAssumed Answered

Cross Compile QT5.8.0 for i.MX6 using Yocto

Question asked by Hannes Bachmayr on Mar 24, 2017
Latest reply on Apr 19, 2017 by Hannes Bachmayr

For weeks now, I am trying to figure out the right way how to build QT5.8.0 for i.MX6 (sabrelite) from source. I am using a boundary devices sabrelite board (quad core) and a Ubuntu 16.02 x64 build machine. I running out of ideas and would appreciate any help.

I am using exactly the same build flags as the Yocto system does in it's build process. And the configuration goes pretty well.

You have already accepted the terms of the Open Source license.

Creating qmake...
Done.

Running configuration tests...
Done running configuration tests.

Configure summary:

Building on:  x86_64
Building for: x86_64
Configuration: use_gold_linker cross_compile sse2 sse3 ssse3 sse4_1 sse4_2 avx avx2 avx512f avx512bw avx512cd avx512dq avx512er avx512ifma avx512pf avx512vbmi avx512vl compile_examples enable_new_dtags largefile silent shared release c++11 c++14 c++1z concurrent dbus mremap reduce_exports reduce_relocations stl
Build options:
  Mode ................................... release
  Building shared libraries .............. yes
  Using C++ standard ..................... C++1z
  Using gold linker ...................... yes
  Using new DTAGS ........................ yes
  Using precompiled headers .............. no
  Using LTCG ............................. no
  Target compiler supports:
    SSE .................................. SSE2 SSE3 SSSE3 SSE4.1 SSE4.2
    AVX .................................. AVX AVX2
    AVX512 ............................... F ER CD PF DQ BW VL IFMA VBMI
  Build parts ............................ libs tools
Qt modules and options:
  Qt Concurrent .......................... yes
  Qt D-Bus ............................... yes
  Qt D-Bus directly linked to libdbus .... yes
  Qt Gui ................................. yes
  Qt Widgets ............................. yes
Support enabled for:
  Accessibility .......................... no
  Using pkg-config ....................... yes
  QML debugging .......................... yes
  udev ................................... yes
  Using system zlib ...................... yes
Qt Core:
  DoubleConversion ....................... yes
    Using system DoubleConversion ........ no
  GLib ................................... yes
  iconv .................................. no
  ICU .................................... no
  Logging backends:
    journald ............................. no
    syslog ............................... no
  Using system PCRE ...................... no
Qt Network:
  getaddrinfo() .......................... yes
  getifaddrs() ........................... yes
  IPv6 ifname ............................ yes
  libproxy ............................... no
  OpenSSL ................................ yes
    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 ................................. no
    Using system provided SQLite ......... no
  TDS (Sybase) ........................... no
Qt Gui:
  FreeType ............................... yes
    Using system FreeType ................ yes
  HarfBuzz ............................... no
    Using system HarfBuzz ................ no
  Fontconfig ............................. no
  Image formats:
    GIF .................................. yes
    ICO .................................. yes
    JPEG ................................. yes
      Using system libjpeg ............... yes
    PNG .................................. yes
      Using system libpng ................ yes
  OpenGL:
    EGL .................................. yes
    Desktop OpenGL ....................... no
    OpenGL ES 2.0 ........................ yes
    OpenGL ES 3.0 ........................ yes
    OpenGL ES 3.1 ........................ yes
  Session Management ..................... no
Features used by QPA backends:
  evdev .................................. yes
  libinput ............................... no
  mtdev .................................. no
  tslib .................................. no
  xkbcommon-evdev ........................ no
QPA backends:
  DirectFB ............................... no
  EGLFS .................................. no
  LinuxFB ................................ no
  Mir client ............................. no
  X11:
    Using system provided XCB libraries .. yes
    EGL on X11 ........................... yes
    Xinput2 .............................. yes
    XCB XKB .............................. yes
    XLib ................................. yes
    Xrender .............................. yes
    XCB render ........................... yes
    XCB GLX .............................. yes
    XCB Xlib ............................. yes
    Using system-provided xkbcommon ...... yes
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:
  System Assimp .......................... no
Qt Wayland Drivers:
  EGL .................................... yes
  Rasberry Pi ............................ no
  XComposite EGL ......................... yes
  XComposite GLX ......................... no
  DRM EGL ................................ yes
  libhybris EGL .......................... no
Qt Wayland Client ........................ yes
Qt Wayland Compositor .................... yes
Qt Bluetooth:
  BlueZ .................................. no
  BlueZ Low Energy ....................... no
  Linux Crypto API ....................... no
Qt Multimedia:
  ALSA ................................... no
  GStreamer 1.0 .......................... yes
  GStreamer 0.10 ......................... no
  Video for Linux ........................ yes
  OpenAL ................................. no
  PulseAudio ............................. yes
  Resource Policy (libresourceqt5) ....... no
  DirectShow ............................. no
  Windows Media Foundation ............... no
Qt Location:
  Gypsy GPS Daemon ....................... no
  WinRT Geolocation API .................. no
Qt Sensors:
  sensorfw ............................... no
Qt WebEngine:
  Proprietary Codecs ..................... no
  Spellchecker ........................... yes
  ALSA ................................... no
  PulseAudio ............................. yes

Note: Dropped compiler flags '-pthread' when detecting library 'glib'.

Note: Dropped compiler flags '-pthread' when detecting library 'gstreamer'.

Note: Dropped compiler flags '-pthread' when detecting library 'gstreamer_app'.

WARNING: Accessibility disabled. This configuration of Qt is unsupported.


Platform notes:

            - Also available for Linux: linux-clang linux-kcc linux-icc linux-cxx
       

Qt is now configured for building. Just run 'make'.
Once everything is built, you must run 'make install'.
Qt will be installed into /opt/qt5.8.0

Prior to reconfiguration, make sure you remove any leftovers from
the previous build.

 

I am using a Ubuntu 16.02 x64 machine, Yocto Morty (Boundary Devices), QT Meta SDK and the latest QT source code that is available. Here are the steps how I configure QT: 

source /opt/fslc-x11/2.2.1/environment-setup-armv7at2hf-neon-fslc-linux-gnueabi
export PKG_CONFIG_SYSROOT_DIR=$SDKTARGETSYSROOT
export PKG_CONFIG_LIBDIR=$SDKTARGETSYSROOT/usr/lib/pkgconfig
./configure -v -opensource -confirm-license -sysroot SDKTARGETSYSROOT -no-gcc-sysroot -prefix /opt/qt5.8.0 -device linux-imx6-g++ -device-option CROSS_COMPILE=$CROSS_COMPILE -shared -silent -no-pch -no-rpath -pkg-config -no-accessibility -no-alsa -no-cups -dbus -no-directfb -no-eglfs -evdev -nomake examples -no-fontconfig -opengl es2 -glib -no-gtk -no-harfbuzz -no-iconv -no-icu -no-journald -system-libjpeg -no-kms -no-libinput -system-libpng -no-libproxy -make libs -no-linuxfb -no-mtdev -openssl -qt-pcre -pulseaudio -release -no-sm -no-sql-db2 -no-sql-ibase -no-sql-mysql -no-sql-oci -no-sql-odbc -no-sql-psql -no-sql-sqlite -no-sql-sqlite2 -no-sql-tds -nomake tests -make tools -no-tslib -libudev -widgets -xcb -xcb-xlib -system-xcb -xinput2 -xkb -no-xkbcommon-evdev -xrender -system-zlib -no-eglfs "$@"

 

I tried Yocto Krogoth, Krogoth-Next and Morty with the original Freescale bsp and with the Boundary BSP. Always with the same result. I also tried with the i.MX6 Ubuntu, but failed too. Please help.

 

BR

 

Hannes

Outcomes