Message ID | 20251010120125.2868011-1-dmitry.baryshkov@oss.qualcomm.com |
---|---|
State | New |
Headers | show |
Series | [1/5] mesa: add opencl -> clang build dependency | expand |
This fixes a build issue when building nativesdk-mesa since the clang dependency was missing. On 10/10/2025 6:59 AM, Dmitry Baryshkov via lists.openembedded.org wrote: > With the commits 448f4a84cb22 ("llvm: add recipe for just the LLVM > libraries") and d76dc362c8e1 ("clang: use llvm recipe") the 'llvm' > dependency inside mesa.inc does no longer pull in the clang libraries, > failing RustiCL build as it can not find Clang libaries. > > Add direct dependency on the clang in order to fulfill build-time deps. > > Fixes: d76dc362c8e1 ("clang: use llvm recipe") > Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com> > --- > > Note, this fixes the build issue, so it would be nice to pick this up > even if there are review comments for other patches in the series. > > BTW: would it be possible to enable OpenCL in one of autobuilder > configurations to spot out such issues? Or would it make sense to enable > the 'opencl' DISTRO_FEATURE for poky? > > --- > meta/recipes-graphics/mesa/mesa.inc | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/meta/recipes-graphics/mesa/mesa.inc b/meta/recipes-graphics/mesa/mesa.inc > index 7046deeb2b63..f299f9570284 100644 > --- a/meta/recipes-graphics/mesa/mesa.inc > +++ b/meta/recipes-graphics/mesa/mesa.inc > @@ -128,7 +128,7 @@ PACKAGECONFIG[egl] = "-Degl=enabled, -Degl=disabled" > > # "opencl" also requires libclc and gallium-llvm to be present in PKGCONFIG! > # Be sure to enable them both for the target and for the native build. > -PACKAGECONFIG[opencl] = "-Dgallium-rusticl=true -Dmesa-clc-bundle-headers=enabled, -Dgallium-rusticl=false, bindgen-cli-native" > +PACKAGECONFIG[opencl] = "-Dgallium-rusticl=true -Dmesa-clc-bundle-headers=enabled, -Dgallium-rusticl=false, bindgen-cli-native clang" > > PACKAGECONFIG[broadcom] = "" > PACKAGECONFIG[etnaviv] = ",,python3-pycparser-native" > > > > -=-=-=-=-=-=-=-=-=-=-=- > Links: You receive all messages sent to this group. > View/Reply Online (#224683): https://lists.openembedded.org/g/openembedded-core/message/224683 > Mute This Topic: https://lists.openembedded.org/mt/115687493/6551054 > Group Owner: openembedded-core+owner@lists.openembedded.org > Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [reatmon@ti.com] > -=-=-=-=-=-=-=-=-=-=-=- >
On Fri, 2025-10-10 at 14:59 +0300, Dmitry Baryshkov via lists.openembedded.org wrote: > With the commits 448f4a84cb22 ("llvm: add recipe for just the LLVM > libraries") and d76dc362c8e1 ("clang: use llvm recipe") the 'llvm' > dependency inside mesa.inc does no longer pull in the clang libraries, > failing RustiCL build as it can not find Clang libaries. > > Add direct dependency on the clang in order to fulfill build-time deps. > > Fixes: d76dc362c8e1 ("clang: use llvm recipe") > Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com> > --- > > Note, this fixes the build issue, so it would be nice to pick this up > even if there are review comments for other patches in the series. > > BTW: would it be possible to enable OpenCL in one of autobuilder > configurations to spot out such issues? Or would it make sense to enable > the 'opencl' DISTRO_FEATURE for poky? I'm not against the idea but it isn't quite that simple due to the meta-oe dependency... Cheers, Richard
On Fri, Oct 10, 2025 at 04:42:28PM +0100, Richard Purdie wrote: > On Fri, 2025-10-10 at 14:59 +0300, Dmitry Baryshkov via lists.openembedded.org wrote: > > With the commits 448f4a84cb22 ("llvm: add recipe for just the LLVM > > libraries") and d76dc362c8e1 ("clang: use llvm recipe") the 'llvm' > > dependency inside mesa.inc does no longer pull in the clang libraries, > > failing RustiCL build as it can not find Clang libaries. > > > > Add direct dependency on the clang in order to fulfill build-time deps. > > > > Fixes: d76dc362c8e1 ("clang: use llvm recipe") > > Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com> > > --- > > > > Note, this fixes the build issue, so it would be nice to pick this up > > even if there are review comments for other patches in the series. > > > > BTW: would it be possible to enable OpenCL in one of autobuilder > > configurations to spot out such issues? Or would it make sense to enable > > the 'opencl' DISTRO_FEATURE for poky? > > I'm not against the idea but it isn't quite that simple due to the > meta-oe dependency... Strangely enough, Mesa's ICD doesn't depend on the OpenCL headers and so it seems to be buildable even w/o meta-oe. Alternatively we can pull OpenCL into OE-Core, if it's better. The only downside that I can imagine that that mesa will depend on Rust and full target Clang, increasing the build time.
diff --git a/meta/recipes-graphics/mesa/mesa.inc b/meta/recipes-graphics/mesa/mesa.inc index 7046deeb2b63..f299f9570284 100644 --- a/meta/recipes-graphics/mesa/mesa.inc +++ b/meta/recipes-graphics/mesa/mesa.inc @@ -128,7 +128,7 @@ PACKAGECONFIG[egl] = "-Degl=enabled, -Degl=disabled" # "opencl" also requires libclc and gallium-llvm to be present in PKGCONFIG! # Be sure to enable them both for the target and for the native build. -PACKAGECONFIG[opencl] = "-Dgallium-rusticl=true -Dmesa-clc-bundle-headers=enabled, -Dgallium-rusticl=false, bindgen-cli-native" +PACKAGECONFIG[opencl] = "-Dgallium-rusticl=true -Dmesa-clc-bundle-headers=enabled, -Dgallium-rusticl=false, bindgen-cli-native clang" PACKAGECONFIG[broadcom] = "" PACKAGECONFIG[etnaviv] = ",,python3-pycparser-native"
With the commits 448f4a84cb22 ("llvm: add recipe for just the LLVM libraries") and d76dc362c8e1 ("clang: use llvm recipe") the 'llvm' dependency inside mesa.inc does no longer pull in the clang libraries, failing RustiCL build as it can not find Clang libaries. Add direct dependency on the clang in order to fulfill build-time deps. Fixes: d76dc362c8e1 ("clang: use llvm recipe") Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com> --- Note, this fixes the build issue, so it would be nice to pick this up even if there are review comments for other patches in the series. BTW: would it be possible to enable OpenCL in one of autobuilder configurations to spot out such issues? Or would it make sense to enable the 'opencl' DISTRO_FEATURE for poky? --- meta/recipes-graphics/mesa/mesa.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)