2025-06-06 5:55 AM - last edited on 2025-06-06 6:07 AM by Andrew Neil
Platform:
Yocto version: openstlinux-6.6-yocto-scarthgap-mpu-v24.11.06
Machine: stm32mp1
Build environment: Ubuntu 22.04
Target image: st-image-weston
Summary:
I'm attempting to integrate PyQt5 into the latest ST OpenSTLinux (Scarthgap-based) BSP. While the build proceeds fine up to qtbase, the compilation fails when reaching python3-pyqt5, due to a LONG_BIT platform-related error.
Steps Followed:
1. repo init -u https://github.com/STMicroelectronics/oe-manifest.git -b refs/tags/openstlinux-6.6-yocto-scarthgap-mpu-v24.11.06
2. repo sync
3. git clone https://github.com/meta-qt5/meta-qt5.git -b scarthgap ( copied into layers folder)
4.DISTRO=openstlinux-weston MACHINE=stm32mp1 source layers/meta-st/scripts/envsetup.sh
5. bitbake-layers add-layer layers/meta-openembedded/meta-python
6. bitbake-layers add-layer layers/meta-qt5
7. Added IMAGE_INSTALL:append = " python3-pyqt5" in conf/local.conf
8. bitbake st-image-weston
local.conf Additions:
# GPU / Qt5 related config
DISTRO_FEATURES:append = " opengl"
PACKAGECONFIG:append:pn-qtbase = " gles2 eglfs kms gbm wayland"
PACKAGECONFIG:pn-qtbase = "dbus udev evdev widgets tools libs \
freetype fontconfig gles2 eglfs kms gbm \
linuxfb accessibility sql-sqlite openssl"
# Attempt to suppress deprecated warnings
CXXFLAGS:append:pn-python3-pyqt5 = " -Wno-error=deprecated-declarations"
TARGET_CXXFLAGS:append:pn-python3-pyqt5 = " -Wno-error=deprecated-declarations"
PyQt5 Build Error:
After successful build of qtbase, the following occurs during bitbake st-image-weston:
#error "LONG_BIT definition appears wrong for platform (bad gcc/glibc config?)."
| 586 | #error "LONG_BIT definition appears wrong for platform (bad gcc/glibc config?)."
The failing task:
ERROR: Task (/layers/meta-qt5/recipes-python/pyqt5/python3-pyqt5_5.15.10.bb:do_compile) failed with exit code '1'
Request for Guidance:
Is this issue related to architecture mismatch, gcc-glibc config, or a PyQt5/meta-qt5 compatibility issue?
Has anyone successfully built PyQt5 on ST's Scarthgap (6.6) Yocto release?
Are there any recommended patches or workarounds for LONG_BIT issues in PyQt5 for STM32MP1?
Any help or direction would be greatly appreciated.
Thanks,
Sumithra.S