diff mbox series

[1/3] mesa: fix missing dependency for libdrm for panfrost tools

Message ID 20260326-mesa-libdrm-imagination-v1-1-fe018f03be6a@cherry.de
State Under Review
Headers show
Series mesa: fix build for panfrost tools, imagination Vulkan driver and Vulkan-only build | expand

Commit Message

Quentin Schulz March 26, 2026, 11:05 a.m. UTC
From: Quentin Schulz <quentin.schulz@cherry.de>

mesa-tools-native builds the panfrost tools but if wayland is not in
DISTRO_FEATURES, libdrm dependency is missing and mesa-tools-native will
fail with:

../sources/mesa-26.0.2/src/panfrost/lib/kmod/pan_kmod.c:7:10: fatal error:
xf86drm.h: No such file or directory
    7 | #include <xf86drm.h>
      |          ^~~~~~~~~~~

Note the mesa-26.0.2 in the path. It's simply because the tarball
sources contain this name as root directory, it can be a bit misleading
when looking at mesa-tools-native logs and seeing this error.

Fixes: 937a0931dd07 ("add mesa-tools native-only recipe")
Reported-by: Khem Raj <raj.khem@gmail.com>
Reported-by: Changqing Li <changqing.li@windriver.com>
Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
---
 meta/recipes-graphics/mesa/mesa.inc | 1 +
 1 file changed, 1 insertion(+)
diff mbox series

Patch

diff --git a/meta/recipes-graphics/mesa/mesa.inc b/meta/recipes-graphics/mesa/mesa.inc
index a95adfc960..e5ee4ad259 100644
--- a/meta/recipes-graphics/mesa/mesa.inc
+++ b/meta/recipes-graphics/mesa/mesa.inc
@@ -160,6 +160,7 @@  TOOLS .= "${@bb.utils.contains('PACKAGECONFIG', 'panfrost', ',panfrost', '', d)}
 
 # dependencies for tools.
 TOOLS_DEPS:append = "${@bb.utils.contains('PACKAGECONFIG', 'freedreno', ' ncurses libconfig libxml2 ', '', d)}"
+TOOLS_DEPS:append = "${@bb.utils.contains('PACKAGECONFIG', 'panfrost', ' libdrm', '', d)}"
 
 PACKAGECONFIG[expat] = "-Dexpat=enabled, -Dexpat=disabled, expat"
 PACKAGECONFIG[tools] = "-Dtools=${@strip_comma('${TOOLS}')}, -Dtools='', ${TOOLS_DEPS}"