cancel
Showing results for 
Search instead for 
Did you mean: 

STM32MP157F-DK2 Flutter Build Failing with Mesa

lucien950
Visitor

I am running bitbake core-image-minimal;

The build error is as follows

ERROR: mesa-2_24.0.7-r0 do_configure: meson failed
ERROR: mesa-2_24.0.7-r0 do_configure: ExecutionError('/home/l/yocto/build/tmp-glibc/work/cortexa7t2hf-neon-vfpv4-oe-linux-gnueabi/mesa/24.0.7/temp/run.do_configure.1438955', 1, None, None)
ERROR: Logfile of failure stored in: /home/l/yocto/build/tmp-glibc/work/cortexa7t2hf-neon-vfpv4-oe-linux-gnueabi/mesa/24.0.7/temp/log.do_configure.1438955
Log data follows:
| DEBUG: Executing python function extend_recipe_sysroot
| NOTE: Direct dependencies are ['/home/l/yocto/layers/openembedded-core/meta/recipes-core/expat/expat_2.6.2.bb:do_populate_sysroot', '/home/l/yocto/layers/openembedded-core/meta/recipes-core/glibc/glibc_2.39.bb:do_populate_sysroot', '/home/l/yocto/layers/openembedded-core/meta/recipes-core/zlib/zlib_1.3.1.bb:do_populate_sysroot', '/home/l/yocto/layers/openembedded-core/meta/recipes-devtools/gcc/gcc-cross_13.3.bb:do_populate_sysroot', '/home/l/yocto/layers/openembedded-core/meta/recipes-devtools/gcc/gcc-runtime_13.3.bb:do_populate_sysroot', '/home/l/yocto/layers/openembedded-core/meta/recipes-devtools/qemu/qemu-native_8.2.3.bb:do_populate_sysroot', '/home/l/yocto/layers/openembedded-core/meta/recipes-devtools/quilt/quilt-native_0.67.bb:do_populate_sysroot', '/home/l/yocto/layers/openembedded-core/meta/recipes-graphics/drm/libdrm_2.4.120.bb:do_populate_sysroot', '/home/l/yocto/layers/openembedded-core/meta/recipes-graphics/xorg-app/xrandr_1.5.2.bb:do_populate_sysroot', '/home/l/yocto/layers/openembedded-core/meta/recipes-graphics/xorg-lib/libx11_1.8.9.bb:do_populate_sysroot', '/home/l/yocto/layers/openembedded-core/meta/recipes-graphics/xorg-lib/libxdamage_1.1.6.bb:do_populate_sysroot', '/home/l/yocto/layers/openembedded-core/meta/recipes-graphics/xorg-lib/libxext_1.3.6.bb:do_populate_sysroot', '/home/l/yocto/layers/openembedded-core/meta/recipes-graphics/xorg-lib/libxfixes_6.0.1.bb:do_populate_sysroot', '/home/l/yocto/layers/openembedded-core/meta/recipes-graphics/xorg-lib/libxxf86vm_1.1.5.bb:do_populate_sysroot', '/home/l/yocto/layers/openembedded-core/meta/recipes-graphics/xorg-proto/xorgproto_2023.2.bb:do_populate_sysroot', 'virtual:native:/home/l/yocto/layers/openembedded-core/meta/recipes-core/gettext/gettext_0.22.5.bb:do_populate_sysroot', 'virtual:native:/home/l/yocto/layers/openembedded-core/meta/recipes-core/libxml/libxml2_2.12.8.bb:do_populate_sysroot', 'virtual:native:/home/l/yocto/layers/openembedded-core/meta/recipes-devtools/bison/bison_3.8.2.bb:do_populate_sysroot', 'virtual:native:/home/l/yocto/layers/openembedded-core/meta/recipes-devtools/chrpath/chrpath_0.16.bb:do_populate_sysroot', 'virtual:native:/home/l/yocto/layers/openembedded-core/meta/recipes-devtools/flex/flex_2.6.4.bb:do_populate_sysroot', 'virtual:native:/home/l/yocto/layers/openembedded-core/meta/recipes-devtools/meson/meson_1.3.1.bb:do_populate_sysroot', 'virtual:native:/home/l/yocto/layers/openembedded-core/meta/recipes-devtools/ninja/ninja_1.11.1.bb:do_populate_sysroot', 'virtual:native:/home/l/yocto/layers/openembedded-core/meta/recipes-devtools/patch/patch_2.7.6.bb:do_populate_sysroot', 'virtual:native:/home/l/yocto/layers/openembedded-core/meta/recipes-devtools/pkgconfig/pkgconfig_git.bb:do_populate_sysroot', 'virtual:native:/home/l/yocto/layers/openembedded-core/meta/recipes-devtools/pseudo/pseudo_git.bb:do_populate_sysroot', 'virtual:native:/home/l/yocto/layers/openembedded-core/meta/recipes-devtools/python/python3-mako_1.3.2.bb:do_populate_sysroot', 'virtual:native:/home/l/yocto/layers/openembedded-core/meta/recipes-devtools/python/python3_3.12.4.bb:do_populate_sysroot', 'virtual:native:/home/l/yocto/layers/openembedded-core/meta/recipes-extended/xz/xz_5.4.6.bb:do_populate_sysroot', 'virtual:native:/home/l/yocto/layers/openembedded-core/meta/recipes-graphics/xorg-util/makedepend_1.0.9.bb:do_populate_sysroot']
| NOTE: Installed into sysroot: []
| NOTE: Skipping as already exists in sysroot: ['expat', 'gettext-minimal-native', 'glibc', 'zlib', 'binutils-cross-arm', 'cmake-native', 'gcc-cross-arm', 'gcc-runtime', 'libgcc', 'libtool-native', 'm4-native', 'qemu-native', 'quilt-native', 'texinfo-dummy-native', 'libdrm', 'xrandr', 'libpthread-stubs', 'libx11', 'libxau', 'libxcb', 'libxdamage', 'libxdmcp', 'libxext', 'libxfixes', 'libxrandr', 'libxrender', 'libxxf86vm', 'xtrans', 'xcb-proto', 'xorgproto', 'util-macros', 'linux-libc-headers', 'openssl-native', 'expat-native', 'gettext-native', 'glib-2.0-native', 'libxml2-native', 'ncurses-native', 'util-linux-libuuid-native', 'util-linux-native', 'zlib-native', 'bison-native', 'chrpath-native', 'flex-native', 'gnu-config-native', 'libedit-native', 'make-native', 'meson-native', 'ninja-native', 'patch-native', 'perl-native', 'pkgconfig-native', 'pseudo-native', 'python3-build-native', 'python3-calver-native', 'python3-editables-native', 'python3-flit-core-native', 'python3-hatchling-native', 'python3-importlib-metadata-native', 'python3-installer-native', 'python3-mako-native', 'python3-markupsafe-native', 'python3-more-itertools-native', 'python3-packaging-native', 'python3-pathlib2-native', 'python3-pathspec-native', 'python3-pip-native', 'python3-pluggy-native', 'python3-pygments-native', 'python3-pyparsing-native', 'python3-pyproject-hooks-native', 'python3-setuptools-scm-native', 'python3-setuptools-native', 'python3-six-native', 'python3-toml-native', 'python3-tomli-native', 'python3-trove-classifiers-native', 'python3-typing-extensions-native', 'python3-wheel-native', 'python3-zipp-native', 'python3-native', 'bzip2-native', 'libnsl2-native', 'libtirpc-native', 'unzip-native', 'xz-native', 'zstd-native', 'xorgproto-native', 'makedepend-native', 'util-macros-native', 'attr-native', 'gdbm-native', 'gmp-native', 'libcap-ng-native', 'libffi-native', 'libmpc-native', 'libpcre2-native', 'mpfr-native', 're2c-native', 'sqlite3-native']
| DEBUG: Python function extend_recipe_sysroot finished
| DEBUG: Executing shell function do_configure
| NOTE: Executing meson -Dshared-glapi=enabled -Dglx-read-only-text=true -Dplatforms=x11 -Ddri3=disabled -Degl=enabled -Dgallium-drivers=swrast,etnaviv,kmsro -Dllvm=disabled -Dgbm=enabled -Dgles1=enabled -Dgles2=enabled -Dglvnd=false -Dimagination-srv=false -Dlmsensors=disabled -Dgallium-opencl=disabled -Dopencl-spirv=false -Dopengl=true -Dosmesa=false -Dperfetto=false -Dtools= -Dlibunwind=disabled -Dgallium-va=disabled -Dgallium-vdpau=disabled -Dvideo-codecs= -Dvulkan-drivers= -Dvulkan-beta=false -Dgallium-xa=disabled ...
| The Meson build system
| Version: 1.3.1
| Source dir: /home/l/yocto/build/tmp-glibc/work/cortexa7t2hf-neon-vfpv4-oe-linux-gnueabi/mesa/24.0.7/mesa-24.0.7
| Build dir: /home/l/yocto/build/tmp-glibc/work/cortexa7t2hf-neon-vfpv4-oe-linux-gnueabi/mesa/24.0.7/build
| Build type: cross build
| Project name: mesa
| Project version: 24.0.7
| C compiler for the host machine: arm-oe-linux-gnueabi-gcc -mthumb -mfpu=neon-vfpv4 -mfloat-abi=hard -mcpu=cortex-a7 -D_TIME_BITS=64 -D_FILE_OFFSET_BITS=64 --sysroot=/home/l/yocto/build/tmp-glibc/work/cortexa7t2hf-neon-vfpv4-oe-linux-gnueabi/mesa/24.0.7/recipe-sysroot (gcc 13.3.0 "arm-oe-linux-gnueabi-gcc (GCC) 13.3.0")
| C linker for the host machine: arm-oe-linux-gnueabi-gcc -mthumb -mfpu=neon-vfpv4 -mfloat-abi=hard -mcpu=cortex-a7 -D_TIME_BITS=64 -D_FILE_OFFSET_BITS=64 --sysroot=/home/l/yocto/build/tmp-glibc/work/cortexa7t2hf-neon-vfpv4-oe-linux-gnueabi/mesa/24.0.7/recipe-sysroot ld.bfd 2.42.0.20240716
| C++ compiler for the host machine: arm-oe-linux-gnueabi-g++ -mthumb -mfpu=neon-vfpv4 -mfloat-abi=hard -mcpu=cortex-a7 -D_TIME_BITS=64 -D_FILE_OFFSET_BITS=64 --sysroot=/home/l/yocto/build/tmp-glibc/work/cortexa7t2hf-neon-vfpv4-oe-linux-gnueabi/mesa/24.0.7/recipe-sysroot (gcc 13.3.0 "arm-oe-linux-gnueabi-g++ (GCC) 13.3.0")
| C++ linker for the host machine: arm-oe-linux-gnueabi-g++ -mthumb -mfpu=neon-vfpv4 -mfloat-abi=hard -mcpu=cortex-a7 -D_TIME_BITS=64 -D_FILE_OFFSET_BITS=64 --sysroot=/home/l/yocto/build/tmp-glibc/work/cortexa7t2hf-neon-vfpv4-oe-linux-gnueabi/mesa/24.0.7/recipe-sysroot ld.bfd 2.42.0.20240716
| C compiler for the build machine: gcc (gcc 13.3.0 "gcc (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0")
| C linker for the build machine: gcc ld.bfd 2.42
| C++ compiler for the build machine: g++ (gcc 13.3.0 "g++ (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0")
| C++ linker for the build machine: g++ ld.bfd 2.42
| Build machine cpu family: x86_64
| Build machine cpu: x86_64
| Host machine cpu family: arm
| Host machine cpu: arm
| Target machine cpu family: arm
| Target machine cpu: arm
| Checking if "-mtls-dialect=gnu2" runs: YES
|
| ../mesa-24.0.7/meson.build:571:2: ERROR: Problem encountered: kmsro requires dri3 for X11 support
|
| A full log can be found at /home/l/yocto/build/tmp-glibc/work/cortexa7t2hf-neon-vfpv4-oe-linux-gnueabi/mesa/24.0.7/build/meson-logs/meson-log.txt
| ERROR: meson failed
| WARNING: exit code 1 from a shell command.
ERROR: Task (/home/l/yocto/layers/openembedded-core/meta/recipes-graphics/mesa/mesa_24.0.7.bb:do_configure) failed with exit code '1'

I notice that it's saying that kmsro needs dri3. So either I get rid of kmsro or include dri3. I am trying to include dri3. We can see that in the logs, as part of the meson command, dri3 is explicitly turned off.

However, when I check `openembedded-core/meta/recipes-graphics/mesa/mesa.inc`, we find

PACKAGECONFIG = " \
        gallium \
        video-codecs \
        ${@bb.utils.filter('DISTRO_FEATURES', 'x11 vulkan wayland', d)} \
        ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'opengl egl gles gbm virgl', '', d)} \
        ${@bb.utils.contains('DISTRO_FEATURES', 'x11 opengl', 'dri3', '', d)} \
        ${@bb.utils.contains('DISTRO_FEATURES', 'x11 vulkan', 'dri3', '', d)} \
        ${@bb.utils.contains('DISTRO_FEATURES', 'vulkan', 'zink', '', d)} \
"
...
PACKAGECONFIG[dri3] = "-Ddri3=enabled, -Ddri3=disabled, xorgproto libxshmfence"

Notably that if x11 and opengl are present, dri3 should be enabled. I checked the value of DISTRO_FEATURES in bitbake, and I got

DISTRO_FEATURES="acl alsa bluetooth debuginfod ext2 ipv4 ipv6 pcmcia usbgadget usbhost wifi xattr nfs zeroconf pci 3g nfc x11 vfat seccomp usrmerge systemd opengl pulseaudio sysvinit gobject-introspection-data ldconfig"

which notably contains both x11 and opengl.

3 REPLIES 3
lucien950
Visitor

@Joel I wonder if you have an idea on how to fix this

lucien950
Visitor

Found this under layers/meta-st/meta-st-stm32mp/recipes-graphics/mesa/mesa_%.bbappend

PACKAGECONFIG:stm32mp1common = " \
    ${@bb.utils.filter('DISTRO_FEATURES', 'wayland ', d)} \
    ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'opengl egl gles gbm', '', d)} \
    ${@bb.utils.contains('DISTRO_FEATURES', 'x11 opengl', 'x11', '', d)} \
    ${@bb.utils.contains('DISTRO_FEATURES', 'x11 vulkan', 'dri3', '', d)} \
    \
    gallium \
    etnaviv \
    kmsro \
    "

 It appears if you are using x11 opengl it actually does not use dri3? I am not sure why this is the case.

lucien950
Visitor