public inbox for openembedded-core@lists.openembedded.org
 help / color / mirror / Atom feed
* [PATCH] mesa-tools-native: fix do_compile failure
@ 2026-03-11  8:25 Changqing Li
  2026-03-11  9:15 ` [OE-core] " Alexander Kanavin
  0 siblings, 1 reply; 11+ messages in thread
From: Changqing Li @ 2026-03-11  8:25 UTC (permalink / raw)
  To: openembedded-core

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

Signed-off-by: Changqing Li <changqing.li@windriver.com>
---
 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"
 
 EXTRA_OEMESON += " \
     -Dmesa-clc=enabled -Dinstall-mesa-clc=true -Dmesa-clc-bundle-headers=enabled \
-- 
2.34.1



^ permalink raw reply related	[flat|nested] 11+ messages in thread

* Re: [OE-core] [PATCH] mesa-tools-native: fix do_compile failure
  2026-03-11  8:25 [PATCH] mesa-tools-native: fix do_compile failure Changqing Li
@ 2026-03-11  9:15 ` Alexander Kanavin
  2026-03-12  1:05   ` Changqing Li
  0 siblings, 1 reply; 11+ messages in thread
From: Alexander Kanavin @ 2026-03-11  9:15 UTC (permalink / raw)
  To: changqing.li; +Cc: openembedded-core

On Wed, 11 Mar 2026 at 09:25, Changqing Li via lists.openembedded.org
<changqing.li=windriver.com@lists.openembedded.org> wrote:
>
> 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

> -DEPENDS += "libclc-native spirv-tools-native spirv-llvm-translator-native"
> +DEPENDS += "libclc-native spirv-tools-native spirv-llvm-translator-native libdrm-native"

This is not seen on the autobuilder, so what is the configuration that
triggers it?

Alex


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [OE-core] [PATCH] mesa-tools-native: fix do_compile failure
  2026-03-11  9:15 ` [OE-core] " Alexander Kanavin
@ 2026-03-12  1:05   ` Changqing Li
  2026-03-18  2:12     ` Khem Raj
  2026-03-18  2:21     ` Khem Raj
  0 siblings, 2 replies; 11+ messages in thread
From: Changqing Li @ 2026-03-12  1:05 UTC (permalink / raw)
  To: Alexander Kanavin; +Cc: openembedded-core


On 3/11/26 17:15, Alexander Kanavin wrote:
> CAUTION: This email comes from a non Wind River email account!
> Do not click links or open attachments unless you recognize the sender and know the content is safe.
>
> On Wed, 11 Mar 2026 at 09:25, Changqing Li via lists.openembedded.org
> <changqing.li=windriver.com@lists.openembedded.org> wrote:
>> 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
>> -DEPENDS += "libclc-native spirv-tools-native spirv-llvm-translator-native"
>> +DEPENDS += "libclc-native spirv-tools-native spirv-llvm-translator-native libdrm-native"
> This is not seen on the autobuilder, so what is the configuration that
> triggers it?

It is triggered when DISTRO_FEATURES contains opengl, but not contains 
"x11 wayland".  Now,  poky enable opengl x11 wayland by default.

//Changqing

> Alex


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [OE-core] [PATCH] mesa-tools-native: fix do_compile failure
  2026-03-12  1:05   ` Changqing Li
@ 2026-03-18  2:12     ` Khem Raj
  2026-03-18  2:21     ` Khem Raj
  1 sibling, 0 replies; 11+ messages in thread
From: Khem Raj @ 2026-03-18  2:12 UTC (permalink / raw)
  To: changqing.li; +Cc: alex.kanavin, openembedded-core

This patch is breaking builds for eglfs backend ( one without X11 or wayland )
Ideally, this should be added by checking DISTRO_FEATURES_NATIVE for opengl maybe, but the
said patch is fine as well.

Please cherry-pick this patch for master

Thanks
-Khem


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [OE-core] [PATCH] mesa-tools-native: fix do_compile failure
  2026-03-12  1:05   ` Changqing Li
  2026-03-18  2:12     ` Khem Raj
@ 2026-03-18  2:21     ` Khem Raj
  1 sibling, 0 replies; 11+ messages in thread
From: Khem Raj @ 2026-03-18  2:21 UTC (permalink / raw)
  To: changqing.li; +Cc: alex.kanavin, openembedded-core

I meant to day, this patch is needed, its not breaking anything :)

Thanks
-Khem


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [OE-core] [PATCH] mesa-tools-native: fix do_compile failure
  2026-03-25  7:39 Khem Raj
@ 2026-03-25 12:51 ` Alexander Kanavin
  2026-03-25 14:46   ` Khem Raj
  2026-03-25 14:45 ` Quentin Schulz
  1 sibling, 1 reply; 11+ messages in thread
From: Alexander Kanavin @ 2026-03-25 12:51 UTC (permalink / raw)
  To: raj.khem; +Cc: openembedded-core, Changqing Li

On Wed, 25 Mar 2026 at 08:40, Khem Raj via lists.openembedded.org
<raj.khem=gmail.com@lists.openembedded.org> wrote:
> 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

> -DEPENDS += "libclc-native spirv-tools-native spirv-llvm-translator-native"
> +DEPENDS += "libclc-native spirv-tools-native spirv-llvm-translator-native libdrm-native"

Should this be in PACKAGECONFIG for panfrost?

Alex


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [OE-core] [PATCH] mesa-tools-native: fix do_compile failure
  2026-03-25  7:39 Khem Raj
  2026-03-25 12:51 ` [OE-core] " Alexander Kanavin
@ 2026-03-25 14:45 ` Quentin Schulz
  1 sibling, 0 replies; 11+ messages in thread
From: Quentin Schulz @ 2026-03-25 14:45 UTC (permalink / raw)
  To: raj.khem, openembedded-core; +Cc: Changqing Li

Hi Khem, Changqing,

On 3/25/26 8:39 AM, Khem Raj via lists.openembedded.org wrote:
> From: Changqing Li <changqing.li@windriver.com>
> 
> 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 <changqing.li@windriver.com>
> Signed-off-by: Khem Raj <raj.khem@gmail.com>
> ---
>   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


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [OE-core] [PATCH] mesa-tools-native: fix do_compile failure
  2026-03-25 12:51 ` [OE-core] " Alexander Kanavin
@ 2026-03-25 14:46   ` Khem Raj
  2026-03-25 14:53     ` Quentin Schulz
  0 siblings, 1 reply; 11+ messages in thread
From: Khem Raj @ 2026-03-25 14:46 UTC (permalink / raw)
  To: Alexander Kanavin; +Cc: openembedded-core, Changqing Li

[-- Attachment #1: Type: text/plain, Size: 700 bytes --]

On Wed, Mar 25, 2026 at 5:52 AM Alexander Kanavin <alex.kanavin@gmail.com>
wrote:

> On Wed, 25 Mar 2026 at 08:40, Khem Raj via lists.openembedded.org
> <raj.khem=gmail.com@lists.openembedded.org> wrote:
> > 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
>
> > -DEPENDS += "libclc-native spirv-tools-native
> spirv-llvm-translator-native"
> > +DEPENDS += "libclc-native spirv-tools-native
> spirv-llvm-translator-native libdrm-native"
>
> Should this be in PACKAGECONFIG for panfrost?
>

I have opengl-only image to build for odroid-c4 which does not have
panfrost.


>
> Alex
>

[-- Attachment #2: Type: text/html, Size: 1387 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [OE-core] [PATCH] mesa-tools-native: fix do_compile failure
  2026-03-25 14:46   ` Khem Raj
@ 2026-03-25 14:53     ` Quentin Schulz
  2026-03-25 16:26       ` Khem Raj
  0 siblings, 1 reply; 11+ messages in thread
From: Quentin Schulz @ 2026-03-25 14:53 UTC (permalink / raw)
  To: raj.khem, Alexander Kanavin; +Cc: openembedded-core, Changqing Li

Hi Khem,

On 3/25/26 3:46 PM, Khem Raj via lists.openembedded.org wrote:
> On Wed, Mar 25, 2026 at 5:52 AM Alexander Kanavin <alex.kanavin@gmail.com>
> wrote:
> 
>> On Wed, 25 Mar 2026 at 08:40, Khem Raj via lists.openembedded.org
>> <raj.khem=gmail.com@lists.openembedded.org> wrote:
>>> 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
>>
>>> -DEPENDS += "libclc-native spirv-tools-native
>> spirv-llvm-translator-native"
>>> +DEPENDS += "libclc-native spirv-tools-native
>> spirv-llvm-translator-native libdrm-native"
>>
>> Should this be in PACKAGECONFIG for panfrost?
>>
> 
> I have opengl-only image to build for odroid-c4 which does not have
> panfrost.
> 

It "has", due to building mesa-tools-native which enables building 
panfrost tools unconditionally.

panfrost PACKAGECONFIG may enable building the gallium driver (if 
combined with gallium PACKAGECONFIG), the vulkan (panvk) driver (if 
combined with vulkan PACKAGECONFIG) and/or the panfrost tools (if 
combined with tools PACKAGECONFIG).

So it's a missing dependency for the panfrost tools and should be added 
as dependency to the panfrost tools (see my other mail). I don't think 
you need it if you're not building the panfrost tools.

Cheers,
Quentin


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [OE-core] [PATCH] mesa-tools-native: fix do_compile failure
  2026-03-25 14:53     ` Quentin Schulz
@ 2026-03-25 16:26       ` Khem Raj
  2026-03-25 16:35         ` Quentin Schulz
  0 siblings, 1 reply; 11+ messages in thread
From: Khem Raj @ 2026-03-25 16:26 UTC (permalink / raw)
  To: Quentin Schulz; +Cc: Alexander Kanavin, openembedded-core, Changqing Li

[-- Attachment #1: Type: text/plain, Size: 1629 bytes --]

On Wed, Mar 25, 2026 at 7:53 AM Quentin Schulz <quentin.schulz@cherry.de>
wrote:

> Hi Khem,
>
> On 3/25/26 3:46 PM, Khem Raj via lists.openembedded.org wrote:
> > On Wed, Mar 25, 2026 at 5:52 AM Alexander Kanavin <
> alex.kanavin@gmail.com>
> > wrote:
> >
> >> On Wed, 25 Mar 2026 at 08:40, Khem Raj via lists.openembedded.org
> >> <raj.khem=gmail.com@lists.openembedded.org> wrote:
> >>> 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
> >>
> >>> -DEPENDS += "libclc-native spirv-tools-native
> >> spirv-llvm-translator-native"
> >>> +DEPENDS += "libclc-native spirv-tools-native
> >> spirv-llvm-translator-native libdrm-native"
> >>
> >> Should this be in PACKAGECONFIG for panfrost?
> >>
> >
> > I have opengl-only image to build for odroid-c4 which does not have
> > panfrost.
> >
>
> It "has", due to building mesa-tools-native which enables building
> panfrost tools unconditionally.
>
> panfrost PACKAGECONFIG may enable building the gallium driver (if
> combined with gallium PACKAGECONFIG), the vulkan (panvk) driver (if
> combined with vulkan PACKAGECONFIG) and/or the panfrost tools (if
> combined with tools PACKAGECONFIG).
>
> So it's a missing dependency for the panfrost tools and should be added
> as dependency to the panfrost tools (see my other mail). I don't think
> you need it if you're not building the panfrost tools.
>

It uses mali binary driver not lima, and panfrost is not in distro features
or packageconfig for mesa-gl


>
> Cheers,
> Quentin
>

[-- Attachment #2: Type: text/html, Size: 2669 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [OE-core] [PATCH] mesa-tools-native: fix do_compile failure
  2026-03-25 16:26       ` Khem Raj
@ 2026-03-25 16:35         ` Quentin Schulz
  0 siblings, 0 replies; 11+ messages in thread
From: Quentin Schulz @ 2026-03-25 16:35 UTC (permalink / raw)
  To: Khem Raj; +Cc: Alexander Kanavin, openembedded-core, Changqing Li

Hi Khem,

On 3/25/26 5:26 PM, Khem Raj wrote:
> On Wed, Mar 25, 2026 at 7:53 AM Quentin Schulz <quentin.schulz@cherry.de>
> wrote:
> 
>> Hi Khem,
>>
>> On 3/25/26 3:46 PM, Khem Raj via lists.openembedded.org wrote:
>>> On Wed, Mar 25, 2026 at 5:52 AM Alexander Kanavin <
>> alex.kanavin@gmail.com>
>>> wrote:
>>>
>>>> On Wed, 25 Mar 2026 at 08:40, Khem Raj via lists.openembedded.org
>>>> <raj.khem=gmail.com@lists.openembedded.org> wrote:
>>>>> 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
>>>>
>>>>> -DEPENDS += "libclc-native spirv-tools-native
>>>> spirv-llvm-translator-native"
>>>>> +DEPENDS += "libclc-native spirv-tools-native
>>>> spirv-llvm-translator-native libdrm-native"
>>>>
>>>> Should this be in PACKAGECONFIG for panfrost?
>>>>
>>>
>>> I have opengl-only image to build for odroid-c4 which does not have
>>> panfrost.
>>>
>>
>> It "has", due to building mesa-tools-native which enables building
>> panfrost tools unconditionally.
>>
>> panfrost PACKAGECONFIG may enable building the gallium driver (if
>> combined with gallium PACKAGECONFIG), the vulkan (panvk) driver (if
>> combined with vulkan PACKAGECONFIG) and/or the panfrost tools (if
>> combined with tools PACKAGECONFIG).
>>
>> So it's a missing dependency for the panfrost tools and should be added
>> as dependency to the panfrost tools (see my other mail). I don't think
>> you need it if you're not building the panfrost tools.
>>
> 
> It uses mali binary driver not lima, and panfrost is not in distro features
> or packageconfig for mesa-gl
> 

The error is in mesa-tools-native and you're fixing the 
mesa-tools-native here, not mesa-gl.

You **are** building the panfrost tools, unconditionally when building 
mesa-tools-native. This is a deliberate choice, see

https://git.openembedded.org/openembedded-core/tree/meta/recipes-graphics/mesa/mesa-tools-native.bb#n6

I'm not sure what brings mesa-tools-native in the first place for you as 
it's brought in when libclc PACKAGECONFIG is selected in a target or 
native mesa recipe (excluding mesa-tools-native).

mesa-gl brings this in but only for x86 (see the various 
PACKAGECONFIG:append: in mesa-gl.bb).

Quentin


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2026-03-25 16:35 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-11  8:25 [PATCH] mesa-tools-native: fix do_compile failure Changqing Li
2026-03-11  9:15 ` [OE-core] " Alexander Kanavin
2026-03-12  1:05   ` Changqing Li
2026-03-18  2:12     ` Khem Raj
2026-03-18  2:21     ` Khem Raj
  -- strict thread matches above, loose matches on Subject: below --
2026-03-25  7:39 Khem Raj
2026-03-25 12:51 ` [OE-core] " Alexander Kanavin
2026-03-25 14:46   ` Khem Raj
2026-03-25 14:53     ` Quentin Schulz
2026-03-25 16:26       ` Khem Raj
2026-03-25 16:35         ` Quentin Schulz
2026-03-25 14:45 ` Quentin Schulz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox