2024-08-12 03:47 AM - edited 2024-08-12 03:48 AM
Hi ST Community, @Erwan SZYMANSKI
I’ve been working on integrating a Qt example from ~/Qt/Examples/Qt-6.7.2/quickcontrols/imagine into my custom Yocto layer for an STM32 board. I created a recipe for this and updated my local.conf accordingly. After building the image and flashing it to my board, I encountered the following error when running the application. I have added my .bb recipe file and local.conf file. (I have qt5 layer installed too)
nesnes@nesnes-ABRA-A5-V19-2:~/STM32MPU-Ecosystem-v5.1.0/Distribution-Package/build-openstlinuxweston-stm32mp15-disco$ bitbake automotive
NOTE: Started PRServer with DBfile: /home/nesnes/STM32MPU-Ecosystem-v5.1.0/Distribution-Package/build-openstlinuxweston-stm32mp15-disco/cache/prserv.sqlite3, Address: 127.0.0.1:33289, PID: 89725
Loading cache: 100% |########################################################################################################################################################################| Time: 0:00:00
Loaded 4703 entries from dependency cache.
NOTE: Resolving any missing task queue dependencies
Build Configuration:
BB_VERSION = "2.4.0"
BUILD_SYS = "x86_64-linux"
NATIVELSBSTRING = "universal"
TARGET_SYS = "arm-ostl-linux-gnueabi"
MACHINE = "stm32mp15-disco"
DISTRO = "openstlinux-weston"
DISTRO_VERSION = "4.2.4-snapshot-20240812"
TUNE_FEATURES = "arm vfp cortexa7 neon vfpv4 thumb callconvention-hard"
TARGET_FPU = "hard"
DISTRO_CODENAME = "mickledore"
ACCEPT_EULA_stm32mp15-disco = "1"
GCCVERSION = "12.%"
PREFERRED_PROVIDER_virtual/kernel = "linux-stm32mp"
meta-python
meta-oe
meta-gnome
meta-multimedia
meta-networking
meta-webserver = "HEAD:aa5e8edabbc414d8ec1b2ad63c8743c7baf99626"
meta-st-stm32mp = "HEAD:1f152e07019dc06fd331b4926ec7e76ceae3d259"
meta-st-openstlinux = "HEAD:2636960b2bead3d1cb294e378e2b06ef8997189e"
meta = "HEAD:23b5141400b2c676c806df3308f023f7c04e34e0"
meta-my-layer = "<unknown>:<unknown>"
meta-st-x-linux-qt = "v1.0.0:1e51cb49240116fb512deccd8f6bad551918f866"
meta-qt5 = "scarthgap:eb828418264a49b8d00035cb3d7b12fcea3be801"
Initialising tasks: 100% |###################################################################################################################################################################| Time: 0:00:00
Sstate summary: Wanted 94 Local 94 Mirrors 0 Missed 0 Current 888 (100% match, 100% complete)
NOTE: Executing Tasks
NOTE: Tasks Summary: Attempted 2633 tasks of which 2633 didn't need to be rerun and all succeeded.
NOTE: Writing buildhistory
NOTE: Writing buildhistory took: 1 seconds
automotive: error while loading shared libraries: libGLESv2.so.2: cannot open shared object file: No such file or directory
root@stm32mp15-disco:~# automotive
automotive: error while loading shared libraries: libGLESv2.so.2: cannot open shared object file: No such file or directory
root@stm32mp15-disco:~# apt-get install libGLESv2
Reading package lists... Done
Building dependency tree... Done
E: Unable to locate package libGLESv2
root@stm32mp15-disco:~# automotive
automotive: error while loading shared libraries: libGLESv2.so.2: cannot open shared object file: No such file or directory
root@stm32mp15-disco:~# apt-get install libGLESv2.so.2
Reading package lists... Done
Building dependency tree... Done
E: Unable to locate package libGLESv2.so.2
E: Couldn't find any package by glob 'libGLESv2.so.2'
E: Couldn't find any package by regex 'libGLESv2.so.2'
root@stm32mp15-disco:~# sudo apt-get install -y libgles2-mesa-dev
-sh: sudo: command not found
root@stm32mp15-disco:~# apt-get install -y libgles2-mesa-dev
Reading package lists... Done
Building dependency tree... Done
E: Unable to locate package libgles2-mesa-dev
root@stm32mp15-disco:~# sudo apt-get install libegl1-mesa
-sh: sudo: command not found
root@stm32mp15-disco:~# apt-get install libgles2-mesa
Reading package lists... Done
Building dependency tree... Done
E: Unable to locate package libgles2-mesa
root@stm32mp15-disco:~# apt-get update
Reading package lists... Done
root@stm32mp15-disco:~# apt-cache search libgles2
libgles2-gcnano - Vivante libraries OpenGL ES, OpenVG and EGL (multi backend)
root@stm32mp15-disco:~# apt-get install libgles2-mesa-dev
Reading package lists... Done
Building dependency tree... Done
E: Unable to locate package libgles2-mesa-dev
root@stm32mp15-disco:~# apt-get install libgles2-gcnano
Reading package lists... Done
Building dependency tree... Done
libgles2-gcnano is already the newest version (6.4.15+20240206-r0.0).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
IMAGE_INSTALL += " gettemp"
IMAGE_INSTALL += " automotive"
DISTRO_FEATURES += " wayland"
IMAGE_INSTALL += " opkg grep"
IMAGE_INSTALL += " libgles2"
IMAGE_INSTALL += " qtbase qtwayland qtquickcontrols2 qtdeclarative gcnano-userland-multi-binary-stm32mp "
CORE_IMAGE_EXTRA_INSTALL += " wayland weston"
SUMMARY = "QT automotive recipe"
DESCRIPTION = "Recipe to build and install automotive application using Qt"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
# Source files location
SRC_URI = "file://src"
# Define dependencies
DEPENDS += "qtbase qtdeclarative qtquickcontrols2 wayland gcnano-userland-multi-binary-stm32mp"
# Source directory
S = "${WORKDIR}/src"
# Inherit necessary classes
inherit qmake5
# Build steps
do_configure() {
# Change to the source directory where automotive.pro is located
cd ${S}
# Ensure that qmake is run on the correct .pro file
${OE_QMAKE_QMAKE} ${S}/automotive.pro
}
do_compile() {
# Run the build command in the source directory
cd ${S}
${MAKE}
}
# Install steps
do_install() {
# Create installation directory
install -d ${D}${bindir}
# Install the compiled binary
install -m 0755 ${S}/automotive ${D}${bindir}
}
# Specify installed files
FILES_${PN} += "${bindir}/automotive"
# Ensure the correct architecture for cross-compiling
TARGET_ARCH = "arm"
Solved! Go to Solution.
2024-08-19 01:00 AM
Hello @nesnes ,
Maybe try to check the st-image-qt and what does it bring into the final image. As you build st-image-weston maybe you miss some distro installations.
Kind regards,
Erwan.
2024-08-19 01:41 AM
@Erwan SZYMANSKIFor the "I know that on OpenSTLinux <= 5.0 provided a st-example-image-qtwayland to build as an image Qt compliant" suggestion , my distro doesn't have that image
nesnes@nesnes-ABRA-A5-V19-2:~/STM32MPU-Ecosystem-v5.1.0/Distribution-Package/build-openstlinuxweston-stm32mp15-disco$ bitbake st-example-image-qtwayland
NOTE: Started PRServer with DBfile: /home/nesnes/STM32MPU-Ecosystem-v5.1.0/Distribution-Package/build-openstlinuxweston-stm32mp15-disco/cache/prserv.sqlite3, Address: 127.0.0.1:34061, PID: 118789
Loading cache: 100% |########################################################################################################################################################################| Time: 0:00:00
Loaded 4703 entries from dependency cache.
ERROR: Nothing PROVIDES 'st-example-image-qtwayland'
Summary: There was 1 ERROR message, returning a non-zero exit code.