Cross compilation on ubuntu for target RPI3 / RPI5 bookworm error when launching the app
-
I’m cross-compiling the Qt libraries for Raspberry Pi devices on an Ubuntu 20.04 host using Docker.
The Docker images are based on Balena Bookworm — 64-bit for the Raspberry Pi 5 and 32-bit for the Raspberry Pi 3.I don’t want to use Wayland, because that would require code changes, and that’s not the goal right now.
Instead, I insist on using EGLFS with KMS (kernel mode setting) — not the old eglfs_brcm backend.⚙️ Qt Base Configuration Command (for RPi3) ($Module is Qtbase)
Here’s your configuration command, cleaned up and with explanations:
./configure
-release
-opengl es2
-device linux-rasp-pi3-vc4-g++
-device-option CROSS_COMPILE="$TOOLCHAIN"
-sysroot "$SYSROOT"
-opensource -confirm-license
-nomake examples -nomake tests -make libs
-eglfs -kms
-openssl
-pkg-config
-prefix "$PREFIX"
-extprefix "$EXTPATH"
-hostprefix "$QHOSTPATH"
-recheck-all -v 2>&1 | tee "$LOGPATH/$MODULE.log" || fail "configure $MODULE"./monApp -platform eglfs qt.qpa.egldeviceintegration: Failed to load EGL device integration "eglfs_kms" libEGL warning: DRI3: Screen seems not DRI3 capable libEGL warning: DRI3: Screen seems not DRI3 capable MESA: error: ZINK: failed to choose pdev libEGL warning: egl: failed to create dri2 screen EGL library doesn't support Emulator extensions Aborted export QT_QPA_EGLFS_INTEGRATION=eglfs_kms_egldevice export QT_QPA_PLATFORM=eglfs ./monApp Required extensions missing! Aborted note that in my qtbase.log i have this output:
Configure summary:
Building on: linux-g++ (x86_64, CPU features: mmx sse sse2)
Building for: devices/linux-rasp-pi3-brcm-g++ (arm, CPU features: neon)
Target compiler: gcc 10.2.1
Configuration: cross_compile compile_examples enable_new_dtags largefile neon precompile_header shared shared rpath release c++11 c++14 c++17 c++1z concurrent dbus reduce_exports stl
Build options:
Mode ................................... release
Optimize release build for size ........ no
Building shared libraries .............. yes
Using C standard ....................... C11
Using C++ standard ..................... C++17
Using ccache ........................... no
Using new DTAGS ........................ yes
Relocatable ............................ yes
Using precompiled headers .............. yes
Using LTCG ............................. no
Target compiler supports:
NEON ................................. yes
Build parts ............................ libs
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
udev ................................... yes
Using system zlib ...................... yes
Zstandard support ...................... yes
Qt Core:
DoubleConversion ....................... yes
Using system DoubleConversion ........ no
GLib ................................... yes
iconv .................................. yes
ICU .................................... no
Built-in copy of the MIME database ..... yes
Tracing backend ........................ <none>
Logging backends:
journald ............................. no
syslog ............................... no
slog2 ................................ no
PCRE2 .................................. yes
Using system PCRE2 ................... yes
Qt Network:
getifaddrs() ........................... yes
IPv6 ifname ............................ yes
libproxy ............................... no
Linux AF_NETLINK ....................... yes
OpenSSL ................................ yes
Qt directly linked to OpenSSL ........ no
OpenSSL 1.1 ............................ yes
DTLS ................................... yes
OCSP-stapling .......................... yes
SCTP ................................... no
Use system proxies ..................... yes
GSSAPI ................................. no
Qt Gui:
Accessibility .......................... yes
FreeType ............................... yes
Using system FreeType ................ yes
HarfBuzz ............................... yes
Using system HarfBuzz ................ no
Fontconfig ............................. yes
Image formats:
GIF .................................. yes
ICO .................................. yes
JPEG ................................. yes
Using system libjpeg ............... yes
PNG .................................. yes
Using system libpng ................ yes
Text formats:
HtmlParser ........................... yes
CssParser ............................ yes
OdfWriter ............................ yes
MarkdownReader ....................... yes
Using system libmd4c ............... no
MarkdownWriter ....................... 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 ............................... yes
INTEGRITY HID .......................... no
mtdev .................................. yes
tslib .................................. yes
xkbcommon .............................. yes
X11 specific:
XLib ................................. no
XCB Xlib ............................. no
EGL on X11 ........................... no
xkbcommon-x11 ........................ no
QPA backends:
DirectFB ............................... no
EGLFS .................................. yes
EGLFS details:
EGLFS OpenWFD ........................ no
EGLFS i.Mx6 .......................... no
EGLFS i.Mx6 Wayland .................. no
EGLFS RCAR ........................... no
EGLFS EGLDevice ...................... no
EGLFS GBM ............................ no
EGLFS VSP2 ........................... no
EGLFS Mali ........................... no
EGLFS Raspberry Pi ................... yes
EGLFS X11 ............................ no
LinuxFB ................................ yes
VNC .................................... yes
Qt Sql:
SQL item models ........................ yes
Qt Widgets:
GTK+ ................................... no
Styles ................................. Fusion Windows
Qt PrintSupport:
CUPS ................................... no
Qt Sql Drivers:
DB2 (IBM) .............................. no
InterBase .............................. no
MySql .................................. no
OCI (Oracle) ........................... no
ODBC ................................... no
PostgreSQL ............................. yes
SQLite2 ................................ no
SQLite ................................. yes
Using system provided SQLite ......... no
TDS (Sybase) ........................... no
Qt Testlib:
Tester for item models ................. yesI don't get what am i doing wrong and how to test better this cross compilation . knowing it works well on v11 ( bullseye). Thank you