Hi Khem, Changqing,

On 3/25/26 8:39 AM, Khem Raj via lists.openembedded.org wrote:
From: Changqing Li <[email protected]>

Fix do_compile failure:
../sources/mesa-26.0.1/src/panfrost/lib/kmod/pan_kmod.c:7:10: fatal error: 
xf86drm.h: No such file or directory


What's the setup for this failure?

Signed-off-by: Changqing Li <[email protected]>
Signed-off-by: Khem Raj <[email protected]>
---
  meta/recipes-graphics/mesa/mesa-tools-native.bb | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-graphics/mesa/mesa-tools-native.bb 
b/meta/recipes-graphics/mesa/mesa-tools-native.bb
index 50d2f5cbb0..743e3391e9 100644
--- a/meta/recipes-graphics/mesa/mesa-tools-native.bb
+++ b/meta/recipes-graphics/mesa/mesa-tools-native.bb
@@ -11,7 +11,7 @@ PACKAGECONFIG += "gallium-llvm"
  # to PACKAGECONFIG like in mesa.inc
  PACKAGECONFIG += "${@bb.utils.filter('DISTRO_FEATURES', 'x11 wayland', d)}"
-DEPENDS += "libclc-native spirv-tools-native spirv-llvm-translator-native"
+DEPENDS += "libclc-native spirv-tools-native spirv-llvm-translator-native 
libdrm-native"

libdrm-native is brought in via the wayland PACKAGECONFIG, which is enabled if DISTRO_FEATURES has it, so I'm assuming this issue can be reproduced on non-wayland setups?

Reading the code...

src/panfrost/lib/kmod/meson.build

clearly highlights there's a dependency on libdrm (dep_libdrm), but dep_libdrm (created in meson.build) isn't created as a required dependency, while it probably should since src/panfrost/lib/kmod/panfrost_kmod.c clearly calls functions from xf86drm.h which are only defined in the lib. Maybe something to patch in mesa itself as well, so that it complains it cannot build the tool because of missing libdrm dependency.

libdrm is apparently necessary for DRI, GBM and any Vulkan driver (see with_dri2 in meson.build). DRI is true when building Gallium drivers (we have this correct in PACKAGECONFIG[gallium]). We would need to check but I'm assuming we're missing the libdrm dependency in PACKAGECONFIG[vulkan] if we're building without gallium in PACKAGECONFIG. That still wouldn't fix the missing libdrm dependency for panfrost tool though, for that I'm suggesting we add it to mesa.inc via:

TOOLS_DEPS:append = "${@bb.utils.contains('PACKAGECONFIG', 'panfrost', 'libdrm ', '', d)}"

to match what we're doing for the freedreno tool.

Cheers,
Quentin
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#233921): 
https://lists.openembedded.org/g/openembedded-core/message/233921
Mute This Topic: https://lists.openembedded.org/mt/118497550/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to