Cross Compile QT5.8.0 for i.MX6 using Yocto

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Cross Compile QT5.8.0 for i.MX6 using Yocto

11,732 Views
hannesbachmayr
Contributor I

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

Labels (4)
0 Kudos
Reply
4 Replies

4,125 Views
diegoadrian
NXP Employee
NXP Employee

Hello Hannes,

You can follow this Yocto training. In this Yocto training, you can see the steps of how to add a new recipe to your QT image, with this you can add the meta-toolchain-qt5.bb recipe.

Yocto Training - HOME 

Also, here you can find all the information about QT5.8.0.

Qt 5.8 Release - Qt Wiki 

Unfortunately, this is the only help I can provide you. I apologize if this can be a problem for you.

Best Regards,

Diego.

0 Kudos
Reply

4,125 Views
hannesbachmayr
Contributor I

I successfully checked out, compiled and bitbaked a fully working qt 5.7.1 yocto linux: https://boundarydevices.com/morty-yocto-release/ and SDK. When I try to upgrade the qt installation to 5.8.0 I am getting build errors. The build system fails in applying the patches starting with linux-oe-g++.

 

According to this conversation: https://lists.yoctoproject.org/pipermail/yocto/2016-February/028248.html I upgraded my meta-qt5 repository with git checkout –b master. I also tried to modify the repo manifest.xml and repo sync. Is there are smarter way to upgrade to the latest qt5.8.0 version or am I missing some point? Is the qt5.8.0 version stable enough to use (build) will the version be labeled with phryo in the next yocto version (28.04.2017)? Thanks in advance.

0 Kudos
Reply

4,125 Views
diegoadrian
NXP Employee
NXP Employee

Hello Hannes,

Thank you for writing.

I have successfully built a QT5 image for the sabresd6q using Ubuntu 14.04. To build the QT5 image, I only followed the attached document.

Unfortunately, the only support that we can provide is for our demo-boards. That is the reason I used the sabresd6q. Support is only limited to the boards specified on our BSP release.

Best Regards,

Diego.

0 Kudos
Reply

4,125 Views
hannesbachmayr
Contributor I

Hello Diego,

thanks for your anwser. I was able to build a Yocto image including QT without a problem, since it is well documented within your PDF. But what I really wanted to know is how to compile QT 5.8.0 from source using the meta-toolchain-qt5 within the Yocto build system.

Yocto Morty only offers QT5.7.1 which works fine on my target. But every once in a while I want to upgrade my QT version and do not want to wait for the next Yocto version to come out. Have you ever been successfull in compiling QT from source by using the Yocto meta-toolchain-qt5?

BR Hannes 

0 Kudos
Reply