mbox series

[v2,0/3] mesa: small improvements after 25.0 merge

Message ID 20250418-mesa-25-fixes-v2-0-e110ccfe291f@oss.qualcomm.com
Headers show
Series mesa: small improvements after 25.0 merge | expand

Message

Dmitry Baryshkov April 18, 2025, 12:57 a.m. UTC
Several bugfixes after Mesa 25.0 recipe was merged:
- Replace the bindgen patches with meson-based fix (Dylan Baker)
- Bundle OpenCL C headers

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
---
Changes in v2:
- Dropped applied patches
- Add the bundle-opencl-headers patch
- Link to v1: https://lore.kernel.org/r/20250412-mesa-25-fixes-v1-0-791840391271@oss.qualcomm.com

---
Dmitry Baryshkov (3):
      meson: pass -target and -I to bindgen calls
      mesa: drop the bindgen patch
      mesa: bundle Clang OpenCL headers into meta-clc

 meta/classes-recipe/meson.bbclass                  |  1 +
 ...d-an-option-to-force-inclusion-of-OpenCL-.patch | 57 ++++++++++++++++++
 ...vide-cross-compilation-arguments-to-LLVM-.patch | 67 ----------------------
 meta/recipes-graphics/mesa/mesa.inc                |  9 +--
 4 files changed, 61 insertions(+), 73 deletions(-)
---
base-commit: 53c772c941d5ce69ab89f35cd04724b740daf269
change-id: 20250411-mesa-25-fixes-5a38fe55dd3c

Best regards,

Comments

Khem Raj April 21, 2025, 3:21 p.m. UTC | #1
Hi Dmitry

I have picked these patch into clang-merge-2 branch.

https://web.git.yoctoproject.org/poky-contrib/log/?h=kraj/clang-merge-2

They help with some mesa-native build failures however, I am still
seeing a build failure build mesa-native
on musl targets. I am not sure why target should matter but it seems
to see the error

https://autobuilder.yoctoproject.org/valkyrie/#/builders/111/builds/150

Error is that mesa_clc is not available before its use. Interestingly,
it never fails locally here but it always fails on AB. Is there some
sort of build race or something else going on?
Would appreciate help.

On Thu, Apr 17, 2025 at 5:57 PM Dmitry Baryshkov via
lists.openembedded.org
<dmitry.baryshkov=oss.qualcomm.com@lists.openembedded.org> wrote:
>
> Several bugfixes after Mesa 25.0 recipe was merged:
> - Replace the bindgen patches with meson-based fix (Dylan Baker)
> - Bundle OpenCL C headers
>
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
> ---
> Changes in v2:
> - Dropped applied patches
> - Add the bundle-opencl-headers patch
> - Link to v1: https://lore.kernel.org/r/20250412-mesa-25-fixes-v1-0-791840391271@oss.qualcomm.com
>
> ---
> Dmitry Baryshkov (3):
>       meson: pass -target and -I to bindgen calls
>       mesa: drop the bindgen patch
>       mesa: bundle Clang OpenCL headers into meta-clc
>
>  meta/classes-recipe/meson.bbclass                  |  1 +
>  ...d-an-option-to-force-inclusion-of-OpenCL-.patch | 57 ++++++++++++++++++
>  ...vide-cross-compilation-arguments-to-LLVM-.patch | 67 ----------------------
>  meta/recipes-graphics/mesa/mesa.inc                |  9 +--
>  4 files changed, 61 insertions(+), 73 deletions(-)
> ---
> base-commit: 53c772c941d5ce69ab89f35cd04724b740daf269
> change-id: 20250411-mesa-25-fixes-5a38fe55dd3c
>
> Best regards,
> --
> Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#215115): https://lists.openembedded.org/g/openembedded-core/message/215115
> Mute This Topic: https://lists.openembedded.org/mt/112324544/1997914
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [raj.khem@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
Dmitry Baryshkov April 21, 2025, 7:32 p.m. UTC | #2
On Mon, 21 Apr 2025 at 18:22, Khem Raj <raj.khem@gmail.com> wrote:
>
> Hi Dmitry
>
> I have picked these patch into clang-merge-2 branch.
>
> https://web.git.yoctoproject.org/poky-contrib/log/?h=kraj/clang-merge-2
>
> They help with some mesa-native build failures however, I am still
> seeing a build failure build mesa-native
> on musl targets. I am not sure why target should matter but it seems
> to see the error

Note, the error is about 'required file', it usually means that the
dynamic loader is not found.
I'll try reproducing it locally.

>
> https://autobuilder.yoctoproject.org/valkyrie/#/builders/111/builds/150
>
> Error is that mesa_clc is not available before its use. Interestingly,
> it never fails locally here but it always fails on AB. Is there some
> sort of build race or something else going on?

And this is usually because there was a uninative-enabled build in
sstate cache which is now being reused for the non-uninative.
Let's see if I can reproduce it...

> Would appreciate help.
>
> On Thu, Apr 17, 2025 at 5:57 PM Dmitry Baryshkov via
> lists.openembedded.org
> <dmitry.baryshkov=oss.qualcomm.com@lists.openembedded.org> wrote:
> >
> > Several bugfixes after Mesa 25.0 recipe was merged:
> > - Replace the bindgen patches with meson-based fix (Dylan Baker)
> > - Bundle OpenCL C headers
> >
> > Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
> > ---
> > Changes in v2:
> > - Dropped applied patches
> > - Add the bundle-opencl-headers patch
> > - Link to v1: https://lore.kernel.org/r/20250412-mesa-25-fixes-v1-0-791840391271@oss.qualcomm.com
> >
> > ---
> > Dmitry Baryshkov (3):
> >       meson: pass -target and -I to bindgen calls
> >       mesa: drop the bindgen patch
> >       mesa: bundle Clang OpenCL headers into meta-clc
> >
> >  meta/classes-recipe/meson.bbclass                  |  1 +
> >  ...d-an-option-to-force-inclusion-of-OpenCL-.patch | 57 ++++++++++++++++++
> >  ...vide-cross-compilation-arguments-to-LLVM-.patch | 67 ----------------------
> >  meta/recipes-graphics/mesa/mesa.inc                |  9 +--
> >  4 files changed, 61 insertions(+), 73 deletions(-)
> > ---
> > base-commit: 53c772c941d5ce69ab89f35cd04724b740daf269
> > change-id: 20250411-mesa-25-fixes-5a38fe55dd3c
> >
> > Best regards,
> > --
> > Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
> >
> >
> > -=-=-=-=-=-=-=-=-=-=-=-
> > Links: You receive all messages sent to this group.
> > View/Reply Online (#215115): https://lists.openembedded.org/g/openembedded-core/message/215115
> > Mute This Topic: https://lists.openembedded.org/mt/112324544/1997914
> > Group Owner: openembedded-core+owner@lists.openembedded.org
> > Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [raj.khem@gmail.com]
> > -=-=-=-=-=-=-=-=-=-=-=-
> >
Khem Raj April 22, 2025, 12:20 a.m. UTC | #3
On 4/21/25 12:32 PM, Dmitry Baryshkov wrote:
> On Mon, 21 Apr 2025 at 18:22, Khem Raj <raj.khem@gmail.com> wrote:
>>
>> Hi Dmitry
>>
>> I have picked these patch into clang-merge-2 branch.
>>
>> https://web.git.yoctoproject.org/poky-contrib/log/?h=kraj/clang-merge-2
>>
>> They help with some mesa-native build failures however, I am still
>> seeing a build failure build mesa-native
>> on musl targets. I am not sure why target should matter but it seems
>> to see the error
> 
> Note, the error is about 'required file', it usually means that the
> dynamic loader is not found.
> I'll try reproducing it locally.
> 
>>
>> https://autobuilder.yoctoproject.org/valkyrie/#/builders/111/builds/150
>>
>> Error is that mesa_clc is not available before its use. Interestingly,
>> it never fails locally here but it always fails on AB. Is there some
>> sort of build race or something else going on?
> 
> And this is usually because there was a uninative-enabled build in
> sstate cache which is now being reused for the non-uninative.
> Let's see if I can reproduce it...

Its in right direction, I could get the information from the worker machine

build-renamed/tmp/work/x86_64-linux/mesa-native/25.0.2$ 
./build/src/compiler/clc/mesa_clc
-bash: ./build/src/compiler/clc/mesa_clc: cannot execute: required file 
not found

if dump the ELF headers it looks for interpreter from a uninative path
which is absolute and points to the location where it was built in 
another build

       [Requesting program interpreter: 
/srv/pokybuild/yocto-worker/meta-oe/build/build/tmp/sysroots-uninative/x86_64-linux/lib/ld-linux-x86-64.so.2]

This file does not exist in current build.


> 
>> Would appreciate help.
>>
>> On Thu, Apr 17, 2025 at 5:57 PM Dmitry Baryshkov via
>> lists.openembedded.org
>> <dmitry.baryshkov=oss.qualcomm.com@lists.openembedded.org> wrote:
>>>
>>> Several bugfixes after Mesa 25.0 recipe was merged:
>>> - Replace the bindgen patches with meson-based fix (Dylan Baker)
>>> - Bundle OpenCL C headers
>>>
>>> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
>>> ---
>>> Changes in v2:
>>> - Dropped applied patches
>>> - Add the bundle-opencl-headers patch
>>> - Link to v1: https://lore.kernel.org/r/20250412-mesa-25-fixes-v1-0-791840391271@oss.qualcomm.com
>>>
>>> ---
>>> Dmitry Baryshkov (3):
>>>        meson: pass -target and -I to bindgen calls
>>>        mesa: drop the bindgen patch
>>>        mesa: bundle Clang OpenCL headers into meta-clc
>>>
>>>   meta/classes-recipe/meson.bbclass                  |  1 +
>>>   ...d-an-option-to-force-inclusion-of-OpenCL-.patch | 57 ++++++++++++++++++
>>>   ...vide-cross-compilation-arguments-to-LLVM-.patch | 67 ----------------------
>>>   meta/recipes-graphics/mesa/mesa.inc                |  9 +--
>>>   4 files changed, 61 insertions(+), 73 deletions(-)
>>> ---
>>> base-commit: 53c772c941d5ce69ab89f35cd04724b740daf269
>>> change-id: 20250411-mesa-25-fixes-5a38fe55dd3c
>>>
>>> Best regards,
>>> --
>>> Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
>>>
>>>
>>> -=-=-=-=-=-=-=-=-=-=-=-
>>> Links: You receive all messages sent to this group.
>>> View/Reply Online (#215115): https://lists.openembedded.org/g/openembedded-core/message/215115
>>> Mute This Topic: https://lists.openembedded.org/mt/112324544/1997914
>>> Group Owner: openembedded-core+owner@lists.openembedded.org
>>> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [raj.khem@gmail.com]
>>> -=-=-=-=-=-=-=-=-=-=-=-
>>>
> 
> 
>
Khem Raj April 22, 2025, 1:13 a.m. UTC | #4
On 4/21/25 5:20 PM, Khem Raj wrote:
> On 4/21/25 12:32 PM, Dmitry Baryshkov wrote:
>> On Mon, 21 Apr 2025 at 18:22, Khem Raj <raj.khem@gmail.com> wrote:
>>>
>>> Hi Dmitry
>>>
>>> I have picked these patch into clang-merge-2 branch.
>>>
>>> https://web.git.yoctoproject.org/poky-contrib/log/?h=kraj/clang-merge-2
>>>
>>> They help with some mesa-native build failures however, I am still
>>> seeing a build failure build mesa-native
>>> on musl targets. I am not sure why target should matter but it seems
>>> to see the error
>>
>> Note, the error is about 'required file', it usually means that the
>> dynamic loader is not found.
>> I'll try reproducing it locally.
>>
>>>
>>> https://autobuilder.yoctoproject.org/valkyrie/#/builders/111/builds/150
>>>
>>> Error is that mesa_clc is not available before its use. Interestingly,
>>> it never fails locally here but it always fails on AB. Is there some
>>> sort of build race or something else going on?
>>
>> And this is usually because there was a uninative-enabled build in
>> sstate cache which is now being reused for the non-uninative.
>> Let's see if I can reproduce it...
> 
> Its in right direction, I could get the information from the worker machine
> 
> build-renamed/tmp/work/x86_64-linux/mesa-native/25.0.2$ ./build/src/ 
> compiler/clc/mesa_clc
> -bash: ./build/src/compiler/clc/mesa_clc: cannot execute: required file 
> not found
> 
> if dump the ELF headers it looks for interpreter from a uninative path
> which is absolute and points to the location where it was built in 
> another build
> 
>        [Requesting program interpreter: /srv/pokybuild/yocto-worker/ 
> meta-oe/build/build/tmp/sysroots-uninative/x86_64-linux/lib/ld-linux- 
> x86-64.so.2]
> 
> This file does not exist in current build.

I think I got the problem, its ldflags being injected from llvm-config 
containing the buildtime paths where llvm/clang-native was built in, you 
have sent a patch to fix it which is already applied to core, I missed 
applying it to clang :(. I have applied it to all clang variants since 
we use shared sources for all clang recipes, we need to keep source tree 
in sync for all of them, also pushed it into the kraj/clang-merge-2 
branch now. I think this should get us through this bump.

Would be good, to get some more feedback on how it plays out in your 
testing.

> 
> 
>>
>>> Would appreciate help.
>>>
>>> On Thu, Apr 17, 2025 at 5:57 PM Dmitry Baryshkov via
>>> lists.openembedded.org
>>> <dmitry.baryshkov=oss.qualcomm.com@lists.openembedded.org> wrote:
>>>>
>>>> Several bugfixes after Mesa 25.0 recipe was merged:
>>>> - Replace the bindgen patches with meson-based fix (Dylan Baker)
>>>> - Bundle OpenCL C headers
>>>>
>>>> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
>>>> ---
>>>> Changes in v2:
>>>> - Dropped applied patches
>>>> - Add the bundle-opencl-headers patch
>>>> - Link to v1: https://lore.kernel.org/r/20250412-mesa-25-fixes- 
>>>> v1-0-791840391271@oss.qualcomm.com
>>>>
>>>> ---
>>>> Dmitry Baryshkov (3):
>>>>        meson: pass -target and -I to bindgen calls
>>>>        mesa: drop the bindgen patch
>>>>        mesa: bundle Clang OpenCL headers into meta-clc
>>>>
>>>>   meta/classes-recipe/meson.bbclass                  |  1 +
>>>>   ...d-an-option-to-force-inclusion-of-OpenCL-.patch | 57 ++++++++++ 
>>>> ++++++++
>>>>   ...vide-cross-compilation-arguments-to-LLVM-.patch | 67 
>>>> ----------------------
>>>>   meta/recipes-graphics/mesa/mesa.inc                |  9 +--
>>>>   4 files changed, 61 insertions(+), 73 deletions(-)
>>>> ---
>>>> base-commit: 53c772c941d5ce69ab89f35cd04724b740daf269
>>>> change-id: 20250411-mesa-25-fixes-5a38fe55dd3c
>>>>
>>>> Best regards,
>>>> -- 
>>>> Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
>>>>
>>>>
>>>> -=-=-=-=-=-=-=-=-=-=-=-
>>>> Links: You receive all messages sent to this group.
>>>> View/Reply Online (#215115): https://lists.openembedded.org/g/ 
>>>> openembedded-core/message/215115
>>>> Mute This Topic: https://lists.openembedded.org/mt/112324544/1997914
>>>> Group Owner: openembedded-core+owner@lists.openembedded.org
>>>> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/ 
>>>> unsub [raj.khem@gmail.com]
>>>> -=-=-=-=-=-=-=-=-=-=-=-
>>>>
>>
>>
>>