2022-09-08 06:48 AM
In trying to provide X11 support to a Weston distribution, I modified the weston distro conf (meta-st-openstlinux/conf/distro/openstlinux-weston.conf) to read:
#DISTRO_FEATURES:remove = " x11 "
# with X11
PREFERRED_PROVIDER_virtual/xserver = "${@bb.utils.contains('DISTRO_FEATURES', 'x11 wayland', 'xwayland', 'xserver-xorg', d)}"
This appropriately builds the X11 libraries needed, but I get a configuration error for the mesa-gl package:
| ../mesa-22.0.0/meson.build:555:6: ERROR: Problem encountered: xlib based GLX requires at least one gallium driver
It looks like the invocation of meson does not pass the right value for gallium-drivers even though the environment does imply it should be set appropriately.
The do_configure log file contains "-Dgallium-drivers=":
NOTE: Executing meson -Dshared-glapi=enabled -Dglx-read-only-text=true -Dplatforms=x11 -Ddri3=disabled -Degl=disabled -Delf-tls=false -Dgallium-drivers= -Dllvm=disabled -Dgbm=disabled -Dgles1=disabled -Dgles2=disabled -Dlmsensors=disabled -Dgallium-opencl=disabled -Dopencl-spirv=false -Dopengl=true -Dosmesa=false -Dlibunwind=disabled -Dgallium-va=disabled -Dgallium-vdpau=disabled -Dvulkan-drivers= -Dgallium-xa=disabled -Dgallium-xvmc=disabled...
The bitbake environment seems to set the drivers correctly:
$ bitbake -e mesa-gl | grep ^GALLIUM
GALLIUMDRIVERS="swrast"
GALLIUMDRIVERS:x86-x32=""
GALLIUMDRIVERS_LLVM="r300,nouveau"
GALLIUMDRIVERS_RADEONSI=""
We are building with our own Distro and Machine definitions, but I went back to the original STM32MP Distro package and get the same results.
Any thoughts? Am I missing something?
2022-09-08 11:52 AM
A workaround is to provide the following line in the mesa-gl_%.bbappend:
PACKAGECONFIG:class-target = "opengl x11 gallium"
The mesa-gl_22.0.3.bb recipe does not seem to provide gallium in PACKAGECONFIG when x11 is a distro feature.
PACKAGECONFIG:class-target = "opengl ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', 'osmesa gallium', d)}"
After getting past the mesa-gl config issue, I encountered an issue with xserver-xorg also at the do_configure task:
ERROR: Problem encountered: DRI3 requested, but xshmfence not found
This was resolved with a line in a new xserver-xorg_%.bbappend:
DEPENDS:append = " libxshmfence"
I got the image built but this seems like I must be missing some more fundamental distro or image feature.
2023-02-02 07:51 AM
In my case, I added libxshmfence to "layers/openembedded-core/meta/recipes-graphics/xorg-xserver/xserver-xorg_21.1.4.bb". And had no mesa-gl_22.0.3.bb to modify.
Thanks for this helpful message.