Hi I am building a Linux image with some customized layers. Since I would like to run a Qt-based graphic UI on the Linux operating system, I also added the qt5 layer.
The image building method is mainly based on Toradex’s instruction. However, when I built and installed the image on my Apalis imx6, I got following error message when running my application:
This application failed to start because it could not find or load the Qt platform plugin “eglfs”
Is there any hints?
My configuration file is here: bblayer.conf and local.conf
Thank you!
=================================================
Following are some basic information:
I used LinuxImageV2.8
repo init -u http://git.toradex.com/toradex-bsp-platform.git -b LinuxImageV2.8
and the bitbake command is:
bitbake -k console-tdx-image
The bblayers.conf file:
# LAYER_CONF_VERSION is increased each time build/conf/bblayers.conf
# changes incompatibly
LCONF_VERSION = "7"
BBPATH = "${TOPDIR}"
BBFILES ?= ""
BBLAYERS ?= " \
/home/mzkmzk89/oe-core/layers/meta-printing \
${TOPDIR}/../layers/meta-angstrom \
${TOPDIR}/../layers/meta-toradex-nxp \
${TOPDIR}/../layers/meta-freescale \
${TOPDIR}/../layers/meta-freescale-3rdparty \
${TOPDIR}/../layers/meta-toradex-tegra \
${TOPDIR}/../layers/meta-jetson-tk1 \
${TOPDIR}/../layers/meta-toradex-bsp-common \
${TOPDIR}/../layers/meta-openembedded/meta-oe \
${TOPDIR}/../layers/meta-openembedded/meta-filesystems \
${TOPDIR}/../layers/meta-openembedded/meta-gnome \
${TOPDIR}/../layers/meta-openembedded/meta-xfce \
${TOPDIR}/../layers/meta-openembedded/meta-initramfs \
${TOPDIR}/../layers/meta-openembedded/meta-networking \
${TOPDIR}/../layers/meta-openembedded/meta-multimedia \
${TOPDIR}/../layers/meta-openembedded/meta-python \
${TOPDIR}/../layers/meta-lxde \
${TOPDIR}/../layers/meta-browser \
${TOPDIR}/../layers/meta-qt4 \
${TOPDIR}/../layers/meta-qt5 \
${TOPDIR}/../layers/meta-qt5-extra \
${TOPDIR}/../layers/meta-freescale-distro \
${TOPDIR}/../layers/meta-toradex-demos \
${TOPDIR}/../layers/openembedded-core/meta \
"
And I have added following lines in the local.conf file since I would like to run Qt applications, printer services and native compilation on my Linux image:
IMAGE_INSTALL_append = " packagegroup-sdk-target"
IMAGE_INSTALL_append = " cups-dev"
IMAGE_INSTALL_append = " cups-filters"
IMAGE_INSTALL_append = " ghostscript"
IMAGE_INSTALL_append = " ttf-liberation-mono"
IMAGE_INSTALL_append = " ttf-liberation-sans"
IMAGE_INSTALL_append = " ttf-liberation-serif"
PREFERRED_PROVIDER_psplash-support = "psplash-angstrom"
IMAGE_INSTALL_append = " qt3d qt5-plugin-generic-vboxtouch qtbase qtbase-plugins qtbase-tools qtcanvas3d qtcharts qtconnectivity qtdatavis3d qtdeclarative qtenginio qtgraphicaleffects qtimageformats qtlocation qtmultimedia qtquick1 qtquickcontrols2 qtquickcontrols qtscript qtsensors qtserialport qtsvg qtsystems qttools qttranslations qtvirtualkeyboard qtwebchannel qtwebkit-examples qtwebkit qtwebsockets qtxmlpatterns openssh-sftp-server gdb gdbserver sqlite "
DISTRO_FEATURES_remove = "X11 wayland"
IMAGE_INSTALL_remove = "eglinfo-x11"
PACKAGECONFIG_append_pn-qtbase = " sql-sqlite tslib eglfs"
Thank you!
-Zhaokai
Hi @mzkmzk89
Thanks for writing to the Toradex Community!
Concerning your issue, you need to include some packages in your image as described here .
Best regards,
Jaski
Hi Jaski,
Thank you for your reply! Actually I did not see file “qtbase_%.bbappend” in my qt folder.
I was searching this folder: “oe-core/layers/meta-qt5/recipes-qt/qt5”
I have also searched the entire folder “oe-core/layers/”, but I did not find any file ends with “.bbappend”
Should I create a new one file?
Thank you!
Zhaokai
Hi Zhaokai
Yeah, you need to create the .bbappend file.
Best regards,
Jaski
Hi Jaski,
Thank you for your help. Nevertheless, after creating a new .bbappend file, I still met following problem. Seems like the problem is related with the gbm library.
The error message looks like this:
ERROR: Feature 'gbm' was enabled, but the pre-condition 'libs.gbm' failed.
In the qtbase_%.bbappend file, I entered:
PACKAGECONFIG_append = " linuxfb eglfs gbm gles2 kms"
PACKAGECONFIG_remove = "gl xcb xcb-xinput"
I got following output from the console:
ERROR: qtbase-5.9.7+gitAUTOINC+81b29a44d2-r0 do_configure: Function failed: do_configure (log file is located at /home/mzkmzk89/oe-core/build/tmp-glibc/work/armv7at2hf-neon-mx6qdl-angstrom-linux-gnueabi/qtbase/5.9.7+gitAUTOINC+81b29a44d2-r0/temp/log.do_configure.37070)
ERROR: Logfile of failure stored in: /home/mzkmzk89/oe-core/build/tmp-glibc/work/armv7at2hf-neon-mx6qdl-angstrom-linux-gnueabi/qtbase/5.9.7+gitAUTOINC+81b29a44d2-r0/temp/log.do_configure.37070
Log data follows:
| DEBUG: Executing shell function qmake5_base_preconfigure
| DEBUG: Shell function qmake5_base_preconfigure finished
| DEBUG: Executing shell function do_configure
| Performing shadow build...
| Preparing build tree...
| <srcbase> = /home/mzkmzk89/oe-core/build/tmp-glibc/work/armv7at2hf-neon-mx6qdl-angstrom-linux-gnueabi/qtbase/5.9.7+gitAUTOINC+81b29a44d2-r0/git
| <outbase> = /home/mzkmzk89/oe-core/build/tmp-glibc/work/armv7at2hf-neon-mx6qdl-angstrom-linux-gnueabi/qtbase/5.9.7+gitAUTOINC+81b29a44d2-r0/build
| Creating qmake...
| make: Nothing to be done for `first'.
| Command line: -v -opensource -confirm-license -sysroot /home/mzkmzk89/oe-core/build/tmp-glibc/work/armv7at2hf-neon-mx6qdl-angstrom-linux-gnueabi/qtbase/5.9.7+gitAUTOINC+81b29a44d2-r0/recipe-sysroot -prefix /usr -bindir /usr/bin/qt5 -libdir /usr/lib -datadir /usr/share/qt5 -sysconfdir /etc/qt5 -docdir /usr/share/doc/qt5 -headerdir /usr/include/qt5 -archdatadir /usr/lib/qt5 -libexecdir /usr/lib/qt5/libexec -plugindir /usr/lib/qt5/plugins -importdir /usr/lib/qt5/imports -qmldir /usr/lib/qt5/qml -translationdir /usr/share/qt5/translations -testsdir /usr/share/qt5/tests -examplesdir /usr/share/qt5/examples -hostprefix /home/mzkmzk89/oe-core/build/tmp-glibc/work/armv7at2hf-neon-mx6qdl-angstrom-linux-gnueabi/qtbase/5.9.7+gitAUTOINC+81b29a44d2-r0/recipe-sysroot-native -hostlibdir /home/mzkmzk89/oe-core/build/tmp-glibc/work/armv7at2hf-neon-mx6qdl-angstrom-linux-gnueabi/qtbase/5.9.7+gitAUTOINC+81b29a44d2-r0/recipe-sysroot/usr/lib -hostbindir /usr/bin/qt5 -external-hostbindir /home/mzkmzk89/oe-core/build/tmp-glibc/work/armv7at2hf-neon-mx6qdl-angstrom-linux-gnueabi/qtbase/5.9.7+gitAUTOINC+81b29a44d2-r0/recipe-sysroot-native/usr/bin/qt5 -hostdatadir /home/mzkmzk89/oe-core/build/tmp-glibc/work/armv7at2hf-neon-mx6qdl-angstrom-linux-gnueabi/qtbase/5.9.7+gitAUTOINC+81b29a44d2-r0/recipe-sysroot/usr/lib/qt5 -platform linux-oe-g++ -xplatform linux-oe-g++ -use-gold-linker -shared -silent -no-pch -no-rpath -pkg-config -accessibility -no-cups -dbus -no-directfb -eglfs -evdev -make examples -compile-examples -fontconfig -system-freetype -gbm -no-gif -opengl es2 -no-glib -no-gtk -qt-harfbuzz -no-ico -no-iconv -icu -no-journald -system-libjpeg -kms -no-libinput -system-libpng -no-libproxy -make libs -linuxfb -no-mtdev -openssl -qt-pcre -qml-debug -release -no-sm -no-sql-db2 -no-sql-ibase -no-sql-mysql -no-sql-oci -no-sql-odbc -no-sql-psql -sql-sqlite -system-sqlite -no-sql-sqlite2 -no-sql-tds -make tests -make tools -no-tslib -libudev -widgets -no-xcb -no-xinput2 -no-xkb -no-xkbcommon -no-xkbcommon-evdev -system-zlib -eglfs
|
| This is the Qt Open Source Edition.
|
| You have already accepted the terms of the Open Source license.
|
| Running configuration tests...
| Done running configuration tests.
|
| Configure summary:
|
| Building on: linux-oe-g++ (arm, CPU features: neon)
| Building for: linux-oe-g++ (arm, CPU features: neon)
| Configuration: cross_compile use_gold_linker compile_examples enable_new_dtags largefile neon silent shared 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 ...................... yes
| Using new DTAGS ........................ yes
| Using precompiled headers .............. no
| Using LTCG ............................. no
| Target compiler supports:
| NEON ................................. yes
| Build parts ............................ examples libs tests tools
| 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 ................................... no
| iconv .................................. no
| ICU .................................... yes
| Logging backends:
| journald ............................. no
| syslog ............................... no
| slog2 ................................ no
| Using system PCRE2 ..................... 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 Gui:
| Accessibility .......................... yes
| FreeType ............................... yes
| Using system FreeType ................ yes
| HarfBuzz ............................... yes
| Using system HarfBuzz ................ no
| Fontconfig ............................. yes
| Image formats:
| GIF .................................. no
| ICO .................................. no
| JPEG ................................. yes
| Using system libjpeg ............... yes
| PNG .................................. yes
| Using system libpng ................ yes
| EGL .................................... yes
| OpenVG ................................. yes
| OpenGL:
| Desktop OpenGL ....................... no
| OpenGL ES 2.0 ........................ yes
| OpenGL ES 3.0 ........................ yes
| OpenGL ES 3.1 ........................ no
| Session Management ..................... no
| Features used by QPA backends:
| evdev .................................. yes
| libinput ............................... no
| INTEGRITY HID .......................... no
| mtdev .................................. no
| tslib .................................. no
| xkbcommon-evdev ........................ no
| QPA backends:
| DirectFB ............................... no
| EGLFS .................................. yes
| EGLFS details:
| EGLFS OpenWFD ........................ no
| EGLFS i.Mx6 .......................... yes
| EGLFS i.Mx6 Wayland .................. no
| EGLFS RCAR ........................... no
| EGLFS EGLDevice ...................... yes
| EGLFS GBM ............................ no
| EGLFS Mali ........................... no
| EGLFS Raspberry Pi ................... no
| EGL on X11 ........................... no
| LinuxFB ................................ yes
| VNC .................................... yes
| Mir client ............................. no
| Qt Widgets:
| GTK+ ................................... no
| 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 ......... yes
| TDS (Sybase) ........................... no
|
| Note: -hostbindir is not a subdirectory of -hostprefix.
| Note: -hostlibdir is not a subdirectory of -hostprefix.
| Note: -hostdatadir is not a subdirectory of -hostprefix.
|
| WARNING: Feature xinput2 is insignificant in this configuration, ignoring related command line option(s).
|
| WARNING: Feature xkb is insignificant in this configuration, ignoring related command line option(s).
|
| WARNING: Feature xkbcommon-system is insignificant in this configuration, ignoring related command line option(s).
|
| ERROR: Feature 'gbm' was enabled, but the pre-condition 'libs.gbm' failed.
| WARNING: exit code 3 from a shell command.
| ERROR: Function failed: do_configure (log file is located at /home/mzkmzk89/oe-core/build/tmp-glibc/work/armv7at2hf-neon-mx6qdl-angstrom-linux-gnueabi/qtbase/5.9.7+gitAUTOINC+81b29a44d2-r0/temp/log.do_configure.37070)
ERROR: Task (/home/mzkmzk89/oe-core/build/../layers/meta-qt5/recipes-qt/qt5/qtbase_git.bb:do_configure) failed with exit code '1'
NOTE: Tasks Summary: Attempted 5573 tasks of which 5572 didn't need to be rerun and 1 failed.
NOTE: Writing buildhistory
Hi Jaski,
I met some issues while compiling the OS, and seems like the problem is related with the GBM library. I have attached description as a reply of the original message (see below). Do you have any hints?
Thank you!
Zhaokai
max.tx
November 13, 2019, 6:33pm
7
Hi Zhaokai
@mzkmzk89
It looks like we sent you down the wrong path.
This link explains how to build with EGLFS if you use a mainline kernel and the etnaviv graphics stack. However you do not seem to want to build against mainline/etnaviv.
Using the downstream kernel / proprietary Vivante graphics stack doesn’t pull in gbm resulting in your build-errors.
So I would first revert the changes you did because of said link. Sorry about that.
For me, the 2.8 BSP configured with the hints from here results in an Image where I can start the Qt5_CinematicExperience with:
Qt5_CinematicExperience -platform eglfs
One thing to note is that you must delete all your build output and sstate when changing DISTRO_FEATURES. If you ever built an image with X11 in your setup you should delete first:
rm -rf deploy/ build/tmp-glibc/ build/sstate-cache/
Unfortunately after this bitbake will have to rebuild everything.
I hope that this rebuild fixes your issue This application failed to start because it could not find or load the Qt platform plugin “eglfs” .
If that error is still shown could you add the following build logs:
tmp/log/cooker/apalis-imx6/ console-latest.log
tmp-glibc/work/armv7at2hf-neon-mx6qdl-angstrom-linux-gnueabi/qtbase/5.9.7+gitAUTOINC+81b29a44d2-r0/temp/ log.do_configure log.do_compile
and the qtbase.txt file created by:
bitbake qtbase -e > qtbase.txt
Max