UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Contributor
Contributor
1,944 Views
Registered: ‎10-19-2017

Qt 5.10.0 on ZCU102

Hi all,

 

Summary: I am trying to get Qt 5.10.0 up and running on the ZCU102. It looks like PetaLinux ships with a pre-built Qt 5.7.x that is built for the EGLFS backend with X11 integration. I am trying to mimic the configuration and am failing to run my application with the following error: 

root@zcu102:~# export QT_QPA_EGLFS_INTEGRATION=eglfs_x11; export QT_QPA_PLATFORM=eglfs; DISPLAY=:0.0
root@zcu102:~# X $DISPLAY &
root@zcu102:~# ./demo_gui -platform eglfs
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'
Could not initialize egl display
Aborted

So my question is: what is the full configuration build for the Qt build shipped with PetaLinux 2017.4?

 

Details: I've built Qt numerous times on other platforms (i.MX6, AM335x, etc.) so I'm familiar with the process... I've found that things work best when I build Qt directly from the source rather than relying on Yocto layers and recipes that others have put together. The Qt build itself, while lengthy, is pretty straight forward. There are just a lot of options. So before I started down the path I took a look at the TRD (2017.4) to get an understanding of the environment and what kind of a support I needed:

root@zcu102_base_trd:~# ps -ef
...
2548 root       0:00 {run_video.sh} /bin/bash /usr/bin/run_video.sh
2554 root       0:00 {startx} /bin/sh /usr/bin/startx /media/card/video_qt2 -d 0
2572 root       0:00 xinit /media/card/video_qt2 -d 0 -- /usr/bin/X :0 -auth //.serverauth.2554
2573 root       0:00 /usr/bin/X :0 -auth //.serverauth.2554
2575 root       0:02 /media/card/video_qt2 -d 0
...
root@zcu102_base_trd:~# env
QT_QPA_EGLFS_INTEGRATION=eglfs_x11
QT_QPA_GENERIC_PLUGINS=libinput
QT_QPA_PLATFORM=eglfs
...

Now, I've never built EGLFS with X11 integration, but it's my assumption that this is all handled at compile time like everything else is. As long as you run the right ./configure to the source and your rootfs (sysroot) contains the necessary libraries, you're good to go.

 

So my first step was building my rootfs. I won't go through the dirty details here, but suffice to say I can do an xxdiff of my rootfs vs the one I copied from the TRD disk and mine is more comprehensive, but has identical libraries for everything that should matter here (libGLESv1, libGLESv2, libMali, libEGL, etc.). I will not say I'm not missing something here, but Qt is not indicating that I am, so I'm reasonably confident my sysroot is good.

 

I then moved to my Qt build:

$ cd /opt/qt-everywhere-src-5.10.0
$ ./configure -opensource -confirm-license -xplatform linux-aarch64-gnu-g++ -sysroot /projects/xilinx/rootfs -prefix /opt/qt-5.10.0 -opengl es2 -eglfs -no-xcb
-skip qtwebchannel -skip qtwebengine -skip qtwebglplugin -skip qtwebsockets -skip qtwebview
$ make
$ make install

Everything went smooth. Output of the configure is was as follows:

Configure summary:

Building on: linux-g++ (x86_64, CPU features: mmx sse sse2)
Building for: linux-aarch64-gnu-g++ (arm64, CPU features: neon)
Configuration: cross_compile compile_examples enable_new_dtags largefile neon precompile_header shared rpath release c++11 c++14 c++1z concurrent dbus reduce_exports stl
Build options:
  Mode ................................... release
  Optimize release build for size ........ no
  Building shared libraries .............. yes
  Using C++ standard ..................... C++1z
  Using ccache ........................... no
  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 .... yes
  Qt Gui ................................. yes
  Qt Network ............................. yes
  Qt Sql ................................. yes
  Qt Testlib ............................. yes
  Qt Widgets ............................. yes
  Qt Xml ................................. yes
Support enabled for:
  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 .................................... yes
  Logging backends:
    journald ............................. no
    syslog ............................... no
    slog2 ................................ no
  Using system PCRE2 ..................... no
Qt Network:
  getifaddrs() ........................... yes
  IPv6 ifname ............................ yes
  libproxy ............................... no
  OpenSSL ................................ yes
    Qt directly linked to OpenSSL ........ no
  SCTP ................................... no
  Use system proxies ..................... yes
Qt Gui:
  Accessibility .......................... yes
  FreeType ............................... yes
    Using system FreeType ................ yes
  HarfBuzz ............................... yes
    Using system HarfBuzz ................ yes
  Fontconfig ............................. yes
  Image formats:
    GIF .................................. yes
    ICO .................................. yes
    JPEG ................................. yes
      Using system libjpeg ............... yes
    PNG .................................. yes
      Using system libpng ................ yes
  EGL .................................... yes
  OpenVG ................................. no
  OpenGL:
    Desktop OpenGL ....................... no
    OpenGL ES 2.0 ........................ yes
    OpenGL ES 3.0 ........................ no
    OpenGL ES 3.1 ........................ no
    OpenGL ES 3.2 ........................ no
  Vulkan ................................. no
  Session Management ..................... yes
Features used by QPA backends:
  evdev .................................. yes
  libinput ............................... no
  INTEGRITY HID .......................... no
  mtdev .................................. yes
  tslib .................................. no
  xkbcommon-evdev ........................ yes
QPA backends:
  DirectFB ............................... no
  EGLFS .................................. yes
  EGLFS details:
    EGLFS i.Mx6 .......................... no
    EGLFS i.Mx6 Wayland .................. no
    EGLFS EGLDevice ...................... no
    EGLFS GBM ............................ no
    EGLFS Mali ........................... yes
    EGLFS Raspberry Pi ................... no
    EGL on X11 ........................... yes
  LinuxFB ................................ yes
  VNC .................................... yes
  Mir client ............................. no
Qt Widgets:
  GTK+ ................................... yes
  Styles ................................. Fusion Windows
Qt PrintSupport:
  CUPS ................................... no
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 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 Qt 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
  Use SSE2 instructions .................. no
  Use AVX2 instructions .................. no
  Aspects:
    Render aspect ........................ yes
    Input aspect ......................... yes
    Logic aspect ......................... yes
    Animation aspect ..................... yes
    Extras aspect ........................ yes
Qt 3D GeometryLoaders:
  Autodesk FBX ........................... no
Qt Wayland Client ........................ no
Qt Wayland Compositor .................... no
Qt Bluetooth:
  BlueZ .................................. yes
  BlueZ Low Energy ....................... yes
  Linux Crypto API ....................... yes
  WinRT Bluetooth API (desktop & UWP) .... no
Qt Sensors:
  sensorfw ............................... no
Qt Quick Controls 2:
  Styles ................................. Default Fusion Imagine Material Universal
Qt Quick Templates 2:
  Hover support .......................... yes
  Multi-touch support .................... yes
Qt Positioning:
  Gypsy GPS Daemon ....................... no
  WinRT Geolocation API .................. no
Qt Location:
  Geoservice plugins:
    OpenStreetMap ........................ yes
    HERE ................................. yes
    Esri ................................. yes
    Mapbox ............................... yes
    MapboxGL ............................. yes
    Itemsoverlay ......................... yes
Qt Multimedia:
  ALSA ................................... yes
  GStreamer 1.0 .......................... yes
  GStreamer 0.10 ......................... no
  Video for Linux ........................ yes
  OpenAL ................................. no
  PulseAudio ............................. yes
  Resource Policy (libresourceqt5) ....... no
  Windows Audio Services ................. no
  DirectShow ............................. no
  Windows Media Foundation ............... no

Note: Also available for Linux: linux-clang linux-icc

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

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

Note: No wayland-egl support detected. Cross-toolkit compatibility disabled.

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

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

Qt is now configured for building. Just run 'make'.
Once everything is built, you must run 'make install'.
Qt will be installed into '/projects/xilinx/rootfs/opt/qt-5.10.0'.

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

Everything looks like its checked on the list. Make and install went fine, cross-built my application, and I see the "Could not initialize egl display" error. So I went to the plugin library to see if anything was missing:

root@zcu102:/opt/qt-5.10.0/plugins/platforms# ll
total 996
-rwxr-xr-x 1 root root   9920 May 15 15:15 libqeglfs.so
-rwxr-xr-x 1 root root 357328 May 15 15:15 libqlinuxfb.so
-rwxr-xr-x 1 root root 128584 May 15 15:15 libqminimal.so
-rwxr-xr-x 1 root root 160456 May 15 15:15 libqminimalegl.so
-rwxr-xr-x 1 root root 146896 May 15 15:15 libqoffscreen.so
-rwxr-xr-x 1 root root 204144 May 15 15:15 libqvnc.so
root@zcu102:/opt/qt-5.10.0/plugins/platforms# ldd libqeglfs.so 
        linux-vdso.so.1 (0x0000007f9709c000)
        libQt5EglFSDeviceIntegration.so.5 => /opt/qt-5.10.0/plugins/platforms/./../../lib/libQt5EglFS
DeviceIntegration.so.5 (0x0000007f96fe2000)
        libgthread-2.0.so.0 => /usr/lib/libgthread-2.0.so.0 (0x0000007f96fc8000)
        libglib-2.0.so.0 => /usr/lib/libglib-2.0.so.0 (0x0000007f96ec4000)
        libQt5DBus.so.5 => /opt/qt-5.10.0/plugins/platforms/./../../lib/libQt5DBus.so.5 (0x0000007f96
e37000)
        libfontconfig.so.1 => /usr/lib/libfontconfig.so.1 (0x0000007f96deb000)
        libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0x0000007f96d5f000)
        libXext.so.6 => /usr/lib/libXext.so.6 (0x0000007f96d3f000)
        libX11.so.6 => /usr/lib/libX11.so.6 (0x0000007f96c18000)
        libMali.so.7 => /usr/lib/libMali.so.7 (0x0000007f96a93000)
        libmtdev.so.1 => /usr/lib/libmtdev.so.1 (0x0000007f96a7f000)
        libQt5Gui.so.5 => /opt/qt-5.10.0/plugins/platforms/./../../lib/libQt5Gui.so.5 (0x0000007f965d
8000)
        libudev.so.1 => /lib/libudev.so.1 (0x0000007f965a8000)
        libQt5Core.so.5 => /opt/qt-5.10.0/plugins/platforms/./../../lib/libQt5Core.so.5 (0x0000007f96
037000)
        libpthread.so.0 => /lib/libpthread.so.0 (0x0000007f9600b000)
        libdl.so.2 => /lib/libdl.so.2 (0x0000007f95ff7000)
        libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x0000007f95e69000)
        libm.so.6 => /lib/libm.so.6 (0x0000007f95dbc000)
        libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x0000007f95d99000)
        libc.so.6 => /lib/libc.so.6 (0x0000007f95c55000)
        libpcre.so.1 => /usr/lib/libpcre.so.1 (0x0000007f95c0a000)
        libdbus-1.so.3 => /usr/lib/libdbus-1.so.3 (0x0000007f95bb6000)
        libz.so.1 => /lib/libz.so.1 (0x0000007f95b94000)
        libexpat.so.1 => /usr/lib/libexpat.so.1 (0x0000007f95b61000)
        libxcb.so.1 => /usr/lib/libxcb.so.1 (0x0000007f95b33000)
        libXau.so.6 => /usr/lib/libXau.so.6 (0x0000007f95b21000)
        libXdmcp.so.6 => /usr/lib/libXdmcp.so.6 (0x0000007f95b0c000)
        libdrm.so.2 => /usr/lib/libdrm.so.2 (0x0000007f95aed000)
        libXfixes.so.3 => /usr/lib/libXfixes.so.3 (0x0000007f95ad8000)
        libXdamage.so.1 => /usr/lib/libXdamage.so.1 (0x0000007f95ac6000)
        librt.so.1 => /lib/librt.so.1 (0x0000007f95aae000)
        libpng16.so.16 => /usr/lib/libpng16.so.16 (0x0000007f95a75000)
        libharfbuzz.so.0 => /usr/lib/libharfbuzz.so.0 (0x0000007f95a03000)
        libicui18n.so.57 => /usr/lib/libicui18n.so.57 (0x0000007f9578f000)
        libicuuc.so.57 => /usr/lib/libicuuc.so.57 (0x0000007f955e4000)
        libicudata.so.57 => /usr/lib/libicudata.so.57 (0x0000007f93d58000)
        /lib/ld-linux-aarch64.so.1 (0x0000005556789000)

And everything looks fine... no missing dependencies. Frame buffer device node is there:

root@zcu102:/dev# fb*
crw-rw---- 1 root video 29, 0 May 15 19:04 /dev/fb0
crw-rw---- 1 root video 29, 1 May 15 19:04 /dev/fb1

So I'm a little confused. Any ideas on what could be going wrong here?

 

Thanks

0 Kudos
6 Replies
Newbie damon2018
Newbie
1,802 Views
Registered: ‎05-30-2018

Re: Qt 5.10.0 on ZCU102

@njozwiak

 

Hi njozwiak

 

 

I meet this proble too.

 

Have you fix it?

0 Kudos
Contributor
Contributor
1,790 Views
Registered: ‎10-19-2017

Re: Qt 5.10.0 on ZCU102

I'm currently in contact with a Xilinx FAE. I'm still waiting on a response and resolution. I'll keep this thread updated with any info I have, but nothing as of yet.

0 Kudos
Moderator
Moderator
1,761 Views
Registered: ‎04-24-2017

Re: Qt 5.10.0 on ZCU102

AFAIK we have tested Qt 5.9.5 which is shipped as part of yocto rocko(meta-qt5 https://github.com/Xilinx/meta-qt5/tree/rel-v2018.1) release

Thanks,
Sandeep
PetaLinux Yocto | Embedded SW Support

---------------------------------------------------------------------------
Don’t forget to Reply, Kudo, and Accept as Solution.
---------------------------------------------------------------------------
0 Kudos
Contributor
Contributor
1,741 Views
Registered: ‎10-19-2017

Re: Qt 5.10.0 on ZCU102

Hi Sandeep,

 

So you built Qt using Yocto and the bitbake recipes, but what was the build configuration used for that? I assume the recipes had to be properly modified to get the desired platform support for the environment? In other words, the shipped Qt appears to be built to use EGLFS with X11 integration rather than say, a Wayland backend.

 

Thanks

 

0 Kudos
Moderator
Moderator
1,725 Views
Registered: ‎04-24-2017

Re: Qt 5.10.0 on ZCU102

Here is the packageconfig appends https://github.com/Xilinx/meta-petalinux/blob/rel-v2018.1/recipes-qt/qt5/qtbase_%25.bbappend#L1-L5 

 

Also you need MALI libraries for X11 and FBdev. Wayland support is not available yet.

Thanks,
Sandeep
PetaLinux Yocto | Embedded SW Support

---------------------------------------------------------------------------
Don’t forget to Reply, Kudo, and Accept as Solution.
---------------------------------------------------------------------------
0 Kudos
Contributor
Contributor
1,709 Views
Registered: ‎10-19-2017

Re: Qt 5.10.0 on ZCU102

Hi Sandeep,

 

Yes, if you look at the output of the Qt configure in the original post you will see the Qt properly located the libraries for X11, OpenGL, mali, fbdev, etc. And since there were no build errors it is curious that attempting to run produces the error "Could not initialize egl display", but thank you for responding and pointing to me to the recipes that were used. I will review and report back.

 

Thanks

0 Kudos