Skip to contentSkip to conversation

bindgen-cli: Add new recipe

PATCH In review Zoltán Böszörményi 5 participants 30 messages Feb 24, 2023 – Feb 27, 2023 3 messages not in the archive

lore
Share & tools
lore
#0 lore raw

PATCH 1/4 bindgen-cli: Add new recipe

The recipe is automatically generated by cargo-bitbake, with the manual change to add BBCLASSEXTEND = "native" in the include file.

It is used by Mesa 23.0.0 to build Rusticl.

---
 meta/recipes-devtools/bindgen/bindgen-cli.inc |   1 +
 .../bindgen/bindgen-cli_0.64.0.bb             | 132 ++++++++++++++++++
 2 files changed, 133 insertions(+)
 create mode 100644 meta/recipes-devtools/bindgen/bindgen-cli.inc
 create mode 100644 meta/recipes-devtools/bindgen/bindgen-cli_0.64.0.bb
meta/recipes-devtools/bindgen/bindgen-cli.inc new file +1 -0
new file mode 100644
index 0000000000..d3267ac413
@@ -0,0 +1 @@
+BBCLASSEXTEND = "native"
meta/recipes-devtools/bindgen/bindgen-cli_0.64.0.bb new file +132 -0

132 lines not on this page · raw message

Signature · 1 line
2.39.2
#1 lore raw

PATCH 2/4 mesa, mesa-gl: 23.0.0

---
 ...-backend-fix-gbm-compile-without-dri.patch | 65 -------------------
 ...ormat-Check-for-NEON-before-using-it.patch | 16 ++---
 .../{mesa-gl_22.3.5.bb => mesa-gl_23.0.0.bb}  |  0
 meta/recipes-graphics/mesa/mesa.inc           |  3 +-
 .../mesa/{mesa_22.3.5.bb => mesa_23.0.0.bb}   |  0
 5 files changed, 9 insertions(+), 75 deletions(-)
 delete mode 100644 meta/recipes-graphics/mesa/files/0001-gbm-backend-fix-gbm-compile-without-dri.patch
 rename meta/recipes-graphics/mesa/{mesa-gl_22.3.5.bb => mesa-gl_23.0.0.bb} (100%)
 rename meta/recipes-graphics/mesa/{mesa_22.3.5.bb => mesa_23.0.0.bb} (100%)
meta/recipes-graphics/mesa/files/0001-gbm-backend-fix-gbm-compile-without-dri.patch deleted +0 -65
deleted file mode 100644
index 6541671b7a..0000000000
@@ -1,65 +0,0 @@
-From 25946100e21cf2095bea334e8d7096798561d0b7 Mon Sep 17 00:00:00 2001
-From: Vincent Davis Jr <[email protected]>
-Date: Wed, 28 Dec 2022 16:28:01 -0600
-Subject: [PATCH] gbm/backend: fix gbm compile without dri
-
-Upstream-Status: Backport
-
-https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20447
-https://gitlab.freedesktop.org/mesa/mesa/-/commit/842ca284650f066e58706741a7d22d67b5088e60
-
-At mesa version 22.2.3 patch wasn't introduced until after.
-
-Commit introduces a fix that allows for gbm to be built with an empty
-backend. There are situation especially in a Yocto/OE cross compilation
-environment where you want to build with an empty backend. The particular
-situation is as such:
-
-The mesa-gl recipe is the preferred provider for virtual/libgbm, virtual/libgl,
-virtual/mesa, etc... But the x11 DISTRO_FEATURE in't included this leads to build
-errors such as:
-
-| /../../../ld: src/gbm/libgbm.so.1.0.0.p/main_backend.c.o: in function `find_backend':
-| backend.c:(.text.find_backend+0xa4): undefined reference to `gbm_dri_backend'
-| /../../../ld: src/gbm/libgbm.so.1.0.0.p/main_backend.c.o:(.data.rel.ro.builtin_backends+0x4):
-                undefined reference to `gbm_dri_backend'
-| collect2: error: ld returned 1 exit status
-
-Issue should be replicable by setting -Ddri3=disabled and -Dgbm=enabled
-
-Add fix to bypasses compilation issue by excluding gbm dri backend. If
-HAVE_DRI || HAVE_DRIX not specified.
-
-Acked-by: David Heidelberg <[email protected]>
-Signed-off-by: Vincent Davis Jr <[email protected]>
----
- src/gbm/main/backend.c | 4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/src/gbm/main/backend.c b/src/gbm/main/backend.c
-index 974d0a76a4e..feee0703495 100644
---- a/src/gbm/main/backend.c
-+++ b/src/gbm/main/backend.c
-@@ -42,7 +42,9 @@
- #define ARRAY_SIZE(a) (sizeof(a)/sizeof((a)[0]))
- #define VER_MIN(a, b) ((a) < (b) ? (a) : (b))
- 
-+#if defined(HAVE_DRI) || defined(HAVE_DRI2) || defined(HAVE_DRI3)
- extern const struct gbm_backend gbm_dri_backend;
-+#endif
- 
- struct gbm_backend_desc {
-    const char *name;
-@@ -51,7 +53,9 @@ struct gbm_backend_desc {
- };
- 
- static const struct gbm_backend_desc builtin_backends[] = {
-+#if defined(HAVE_DRI) || defined(HAVE_DRI2) || defined(HAVE_DRI3)
-    { "dri", &gbm_dri_backend },
-+#endif
- };
- 
- #define BACKEND_LIB_SUFFIX "_gbm"
--- 
-2.34.1
-
meta/recipes-graphics/mesa/files/0001-util-format-Check-for-NEON-before-using-it.patch +8 -8
index d22ff3c8a8..0bbd518047 100644
@@ -23,12 +23,12 @@ diff --git a/src/util/format/u_format.c b/src/util/format/u_format.c
 index c071250..0880984 100644
 --- a/src/util/format/u_format.c
 +++ b/src/util/format/u_format.c
-@@ -1184,7 +1184,7 @@ static void
+@@ -1187,7 +1187,7 @@
  util_format_unpack_table_init(void)
  {
     for (enum pipe_format format = PIPE_FORMAT_NONE; format < PIPE_FORMAT_COUNT; format++) {
--#if (defined(PIPE_ARCH_AARCH64) || defined(PIPE_ARCH_ARM)) && !defined(NO_FORMAT_ASM) && !defined(__SOFTFP__)
-+#if (defined(PIPE_ARCH_AARCH64) || (defined(__ARM_NEON) && defined(PIPE_ARCH_ARM))) && !defined(NO_FORMAT_ASM)
+-#if (DETECT_ARCH_AARCH64 || DETECT_ARCH_ARM) && !defined(NO_FORMAT_ASM) && !defined(__SOFTFP__)
++#if (DETECT_ARCH_AARCH64 || (DETECT_ARCH_ARM && defined(__ARM_NEON))) && !defined(NO_FORMAT_ASM) && !defined(__SOFTFP__)
        const struct util_format_unpack_description *unpack = util_format_unpack_description_neon(format);
        if (unpack) {
           util_format_unpack_table[format] = unpack;
@@ -36,12 +36,12 @@ diff --git a/src/util/format/u_format_unpack_neon.c b/src/util/format/u_format_u
 index a4a5cb1..1e4f794 100644
 --- a/src/util/format/u_format_unpack_neon.c
 +++ b/src/util/format/u_format_unpack_neon.c
-@@ -23,7 +23,7 @@
+@@ -24,7 +24,7 @@
+ #include "util/detect_arch.h"
+ #include "util/format/u_format.h"
  
- #include <u_format.h>
- 
--#if (defined(PIPE_ARCH_AARCH64) || defined(PIPE_ARCH_ARM)) && !defined(NO_FORMAT_ASM) && !defined(__SOFTFP__)
-+#if (defined(PIPE_ARCH_AARCH64) || (defined(__ARM_NEON) && defined(PIPE_ARCH_ARM))) && !defined(NO_FORMAT_ASM)
+-#if (DETECT_ARCH_AARCH64 || DETECT_ARCH_ARM) && !defined(NO_FORMAT_ASM) && !defined(__SOFTFP__)
++#if (DETECT_ARCH_AARCH64 || (DETECT_ARCH_ARM && defined(__ARM_NEON))) && !defined(NO_FORMAT_ASM) && !defined(__SOFTFP__)
  
  /* armhf builds default to vfp, not neon, and refuses to compile neon intrinsics
   * unless you tell it "no really".
meta/recipes-graphics/mesa/mesa-gl_23.0.0.bb renamed from meta/recipes-graphics/mesa/mesa-gl_22.3.5.bb +0 -0
similarity index 100%
rename from meta/recipes-graphics/mesa/mesa-gl_22.3.5.bb
rename to meta/recipes-graphics/mesa/mesa-gl_23.0.0.bb
meta/recipes-graphics/mesa/mesa.inc +1 -2
index 0a3dc1dd62..70f9b6fc17 100644
@@ -18,10 +18,9 @@ SRC_URI = "https://mesa.freedesktop.org/archive/mesa-${PV}.tar.xz \
            file://0001-meson.build-check-for-all-linux-host_os-combinations.patch \
            file://0001-meson-misdetects-64bit-atomics-on-mips-clang.patch \
            file://0001-util-format-Check-for-NEON-before-using-it.patch \
-           file://0001-gbm-backend-fix-gbm-compile-without-dri.patch \
            "
 
-SRC_URI[sha256sum] = "3eed2ecae2bc674494566faab9fcc9beb21cd804c7ba2b59a1694f3d7236e6a9"
+SRC_URI[sha256sum] = "01f3cff3763f09e0adabcb8011e4aebc6ad48f6a4dd4bae904fe918707d253e4"
 
 UPSTREAM_CHECK_GITTAGREGEX = "mesa-(?P<pver>\d+(\.\d+)+)"
 
meta/recipes-graphics/mesa/mesa_23.0.0.bb renamed from meta/recipes-graphics/mesa/mesa_22.3.5.bb +0 -0
similarity index 100%
rename from meta/recipes-graphics/mesa/mesa_22.3.5.bb
rename to meta/recipes-graphics/mesa/mesa_23.0.0.bb
Signature · 1 line
2.39.2
#2 lore raw

PATCH 3/4 mesa: Rename PACKAGECONFIG "opencl" to "clover"

In reply to Zoltán Böszörményi

There is another OpenCL frontend called "rusticl" now.

---
 meta/recipes-graphics/mesa/mesa.inc | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
meta/recipes-graphics/mesa/mesa.inc +4 -4
index 70f9b6fc17..9ec10c49ca 100644
@@ -115,9 +115,9 @@ PACKAGECONFIG[gles] = "-Dgles1=enabled -Dgles2=enabled, -Dgles1=disabled -Dgles2
 # "egl" requires "opengl"
 PACKAGECONFIG[egl] = "-Degl=enabled, -Degl=disabled"
 
-# "opencl" requires libclc from meta-clang and spirv-tools from OE-Core
+# "clover" requires libclc from meta-clang and spirv-tools from OE-Core
 OPENCL_NATIVE = "${@bb.utils.contains('PACKAGECONFIG', 'freedreno', '-Dopencl-native=true', '', d)}"
-PACKAGECONFIG[opencl] = "-Dgallium-opencl=icd -Dopencl-spirv=true ${OPENCL_NATIVE},-Dgallium-opencl=disabled -Dopencl-spirv=false,libclc spirv-tools"
+PACKAGECONFIG[clover] = "-Dgallium-opencl=icd -Dopencl-spirv=true ${OPENCL_NATIVE},-Dgallium-opencl=disabled -Dopencl-spirv=false,libclc spirv-tools"
 
 PACKAGECONFIG[broadcom] = ""
 PACKAGECONFIG[etnaviv] = ""
@@ -196,7 +196,7 @@ DEV_PKG_DEPENDENCY = ""
 # development package of libgles3.
 RDEPENDS:libgles3-mesa-dev += "libgles2-mesa-dev"
 
-RDEPENDS:libopencl-mesa += "${@bb.utils.contains('PACKAGECONFIG', 'opencl', 'libclc spirv-tools', '', d)}"
+RDEPENDS:libopencl-mesa += "${@bb.utils.contains('PACKAGECONFIG', 'clover', 'libclc spirv-tools', '', d)}"
 
 PACKAGES =+ "libegl-mesa libegl-mesa-dev \
              libosmesa libosmesa-dev \
@@ -242,7 +242,7 @@ python __anonymous() {
               ("gles", "libgles1", "libglesv1-cm1"),
               ("gles", "libgles2", "libglesv2-2"),
               ("gles", "libgles3",),
-              ("opencl", "libopencl",)):
+              ("clover", "libopencl",)):
         if not p[0] in pkgconfig:
             continue
         mlprefix = d.getVar("MLPREFIX")
Signature · 1 line
2.39.2
#3 lore raw

Re: [OE-core] [PATCH 3/4] mesa: Rename PACKAGECONFIG "opencl" to "clover"

Quoted 12 lines · Zoltan Boszormenyi

There is another OpenCL frontend called "rusticl" now.

---
 meta/recipes-graphics/mesa/mesa.inc | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
meta/recipes-graphics/mesa/mesa.inc +0 -0
index 70f9b6fc17..9ec10c49ca 100644

meta/recipes-graphics/mesa/mesa.inc PACKAGECONFIG[gles] = "-Dgles1=enabled -Dgles2=enabled, -Dgles1=disabled -Dgles2 · line 120

Quoted 8 lines
meta/recipes-graphics/mesa/mesa.inc +2 -2
@@ -115,9 +115,9 @@ PACKAGECONFIG[gles] = "-Dgles1=enabled -Dgles2=enabled, -Dgles1=disabled -Dgles2
 # "egl" requires "opengl"
 PACKAGECONFIG[egl] = "-Degl=enabled, -Degl=disabled"
 
-# "opencl" requires libclc from meta-clang and spirv-tools from OE-Core
+# "clover" requires libclc from meta-clang and spirv-tools from OE-Core
 OPENCL_NATIVE = "${@bb.utils.contains('PACKAGECONFIG', 'freedreno', '-Dopencl-native=true', '', d)}"
-PACKAGECONFIG[opencl] = "-Dgallium-opencl=icd -Dopencl-spirv=true ${OPENCL_NATIVE},-Dgallium-opencl=disabled -Dopencl-spirv=false,libclc spirv-tools"
+PACKAGECONFIG[clover] = "-Dgallium-opencl=icd -Dopencl-spirv=true ${OPENCL_NATIVE},-Dgallium-opencl=disabled -Dopencl-spirv=false,libclc spirv-tools"

Are we allowed to do that? It will break anyone using "opencl" in there PACKAGECONFIG

Quoted 34 lines
meta/recipes-graphics/mesa/mesa.inc +2 -2
 PACKAGECONFIG[broadcom] = ""
 PACKAGECONFIG[etnaviv] = ""
@@ -196,7 +196,7 @@ DEV_PKG_DEPENDENCY = ""
 # development package of libgles3.
 RDEPENDS:libgles3-mesa-dev += "libgles2-mesa-dev"
 
-RDEPENDS:libopencl-mesa += "${@bb.utils.contains('PACKAGECONFIG', 'opencl', 'libclc spirv-tools', '', d)}"
+RDEPENDS:libopencl-mesa += "${@bb.utils.contains('PACKAGECONFIG', 'clover', 'libclc spirv-tools', '', d)}"
 
 PACKAGES =+ "libegl-mesa libegl-mesa-dev \
              libosmesa libosmesa-dev \
@@ -242,7 +242,7 @@ python __anonymous() {
               ("gles", "libgles1", "libglesv1-cm1"),
               ("gles", "libgles2", "libglesv2-2"),
               ("gles", "libgles3",),
-              ("opencl", "libopencl",)):
+              ("clover", "libopencl",)):
         if not p[0] in pkgconfig:
             continue
         mlprefix = d.getVar("MLPREFIX")
Signature · 11 lines
2.39.2



-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#177666): https://lists.openembedded.org/g/openembedded-core/message/177666
Mute This Topic: https://lists.openembedded.org/mt/97202945/3617179
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-
Signature · 3 lines
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#4 lore raw

Re: [OE-core] [PATCH 3/4] mesa: Rename PACKAGECONFIG "opencl" to "clover"

Quoted 5 lines · Alexandre Belloni via lists.openembedded.org

meta/recipes-graphics/mesa/mesa.inc PACKAGECONFIG[gles] = "-Dgles1=enabled -Dgles2=enabled, -Dgles1=disabled -Dgles2 · line 120

Quoted 2 lines
meta/recipes-graphics/mesa/mesa.inc +1 -1
-PACKAGECONFIG[opencl] = "-Dgallium-opencl=icd -Dopencl-spirv=true ${OPENCL_NATIVE},-Dgallium-opencl=disabled -Dopencl-spirv=false,libclc spirv-tools"
+PACKAGECONFIG[clover] = "-Dgallium-opencl=icd -Dopencl-spirv=true ${OPENCL_NATIVE},-Dgallium-opencl=disabled -Dopencl-spirv=false,libclc spirv-tools"

Are we allowed to do that? It will break anyone using "opencl" in there PACKAGECONFIG

It's a part of the implicit agreement that bumping master revision to a newer master revision can and does break stuff.

In this case 'opencl' is ambigous about what opencl implementation you get. Curl's 'ssl' option was recently renamed to 'openssl' for the same reason, and broke builds similarly.

Alex

#5 lore raw

PATCH 4/4 mesa: Add PACKAGECONFIG "rusticl"

In reply to Zoltán Böszörményi
---
 meta/recipes-graphics/mesa/mesa.inc | 16 +++++++++++++---
 1 file changed, 13 insertions(+), 3 deletions(-)
meta/recipes-graphics/mesa/mesa.inc +13 -3
index 9ec10c49ca..e70cf9a42a 100644
@@ -45,7 +45,7 @@ PROVIDES = " \
     virtual/mesa \
     "
 
-inherit meson pkgconfig python3native gettext features_check
+inherit meson pkgconfig python3native gettext features_check rust
 
 BBCLASSEXTEND = "native nativesdk"
 
@@ -119,6 +119,13 @@ PACKAGECONFIG[egl] = "-Degl=enabled, -Degl=disabled"
 OPENCL_NATIVE = "${@bb.utils.contains('PACKAGECONFIG', 'freedreno', '-Dopencl-native=true', '', d)}"
 PACKAGECONFIG[clover] = "-Dgallium-opencl=icd -Dopencl-spirv=true ${OPENCL_NATIVE},-Dgallium-opencl=disabled -Dopencl-spirv=false,libclc spirv-tools"
 
+# "rusticl" requires libclc and spirv-llvm-translator from meta-clang and spirv-tools from OE-Core
+PACKAGECONFIG[rusticl] = "-Dgallium-rusticl=true -Drust_std=2021,-Dgallium-rusticl=false,bindgen-cli-native libclc spirv-tools spirv-llvm-translator,libclc spirv-tools spirv-llvm-translator"
+
+# "rusticl" runs bindgen.
+# This setting is needed by bindgen to dlopen the correct libclang.
+export LIBCLANG_PATH = "${STAGING_LIBDIR_NATIVE}"
+
 PACKAGECONFIG[broadcom] = ""
 PACKAGECONFIG[etnaviv] = ""
 PACKAGECONFIG[freedreno] = ""
@@ -197,6 +204,7 @@ DEV_PKG_DEPENDENCY = ""
 RDEPENDS:libgles3-mesa-dev += "libgles2-mesa-dev"
 
 RDEPENDS:libopencl-mesa += "${@bb.utils.contains('PACKAGECONFIG', 'clover', 'libclc spirv-tools', '', d)}"
+RDEPENDS:libopencl-mesa += "${@bb.utils.contains('PACKAGECONFIG', 'rusticl', 'libclc spirv-tools spirv-llvm-translator', '', d)}"
 
 PACKAGES =+ "libegl-mesa libegl-mesa-dev \
              libosmesa libosmesa-dev \
@@ -242,7 +250,8 @@ python __anonymous() {
               ("gles", "libgles1", "libglesv1-cm1"),
               ("gles", "libgles2", "libglesv2-2"),
               ("gles", "libgles3",),
-              ("clover", "libopencl",)):
+              ("clover", "libopencl",),
+              ("rusticl", "libopencl",)):
         if not p[0] in pkgconfig:
             continue
         mlprefix = d.getVar("MLPREFIX")
@@ -303,7 +312,8 @@ FILES:libgles1-mesa = "${libdir}/libGLESv1*.so.*"
 FILES:libgles2-mesa = "${libdir}/libGLESv2.so.*"
 FILES:libgl-mesa = "${libdir}/libGL.so.*"
 FILES:libglx-mesa = "${libdir}/libGLX*.so.*"
-FILES:libopencl-mesa = "${libdir}/libMesaOpenCL.so.* ${libdir}/gallium-pipe/*.so ${sysconfdir}/OpenCL/vendors/mesa.icd"
+FILES:libopencl-mesa = "${libdir}/libMesaOpenCL.so.* ${libdir}/libRusticlOpenCL.so ${libdir}/gallium-pipe/*.so ${sysconfdir}/OpenCL/vendors/mesa.icd ${sysconfdir}/OpenCL/vendors/rusticl.icd"
+INSANE_SKIP:libopencl-mesa += "${@bb.utils.contains('PACKAGECONFIG', 'rusticl', 'dev-so', '', d)}"
 FILES:libglapi = "${libdir}/libglapi.so.*"
 FILES:libosmesa = "${libdir}/libOSMesa.so.*"
 FILES:libxatracker = "${libdir}/libxatracker.so.*"
Signature · 1 line
2.39.2
#6 lore raw

Re: [OE-core] [PATCH 4/4] mesa: Add PACKAGECONFIG "rusticl"

meta/recipes-graphics/mesa/mesa.inc PROVIDES = " \ · line 48

Quoted 4 lines · Zoltan Boszormenyi via lists.openembedded.org
meta/recipes-graphics/mesa/mesa.inc +1 -1
-inherit meson pkgconfig python3native gettext features_check
+inherit meson pkgconfig python3native gettext features_check rust

This forces a dependency on rust-native, even if rusticl is disabled.

Is it actually needed? If so, make the inherit conditional.

Ross

#7 lore raw

Re: [OE-core] [PATCH 4/4] mesa: Add PACKAGECONFIG "rusticl"

2023. 02. 24. 10:45 keltezéssel, Ross Burton írta:

Quoted 6 lines

meta/recipes-graphics/mesa/mesa.inc PROVIDES = " \ · line 48

Quoted 3 lines · Zoltan Boszormenyi via lists.openembedded.org
meta/recipes-graphics/mesa/mesa.inc +1 -1
-inherit meson pkgconfig python3native gettext features_check
+inherit meson pkgconfig python3native gettext features_check rust

This forces a dependency on rust-native, even if rusticl is disabled.

Is it actually needed? If so, make the inherit conditional.

I will do that, thanks.

Quoted 2 lines

Ross

A message that is not in the archive (sent off-list or not yet received): [email protected]

#9 lore raw

Re: [OE-core] [PATCH 4/4] mesa: Add PACKAGECONFIG "rusticl"

2023. 02. 24. 11:05 keltezéssel, Zoltan Boszormenyi via lists.openembedded.org írta:

Quoted 9 lines

2023. 02. 24. 10:45 keltezéssel, Ross Burton írta:

Quoted 6 lines

meta/recipes-graphics/mesa/mesa.inc PROVIDES = " \ · line 48

Quoted 3 lines · Zoltan Boszormenyi via lists.openembedded.org
meta/recipes-graphics/mesa/mesa.inc +1 -1
-inherit meson pkgconfig python3native gettext features_check
+inherit meson pkgconfig python3native gettext features_check rust

This forces a dependency on rust-native, even if rusticl is disabled.

Is it actually needed? If so, make the inherit conditional.

I will do that, thanks.

Problem is, now the configure stage fails with:

| ../mesa-23.0.0/meson.build:964: WARNING: add_languages is missing native:, assuming languages are wanted for both host and build.
| Compiler for language rust for the build machine not found.
|
| ../mesa-23.0.0/meson.build:964:2: ERROR: Rust compiler rustc -C linker=x86_64-oe-linux-gcc -C link-arg=-m64 -C link-arg=-march=nehalem -C link-arg=-mtune=generic -C link-arg=-mfpmath=sse -C link-arg=-msse4.2 -C link-arg=-fstack-protector-strong -C link-arg=-O2 -C link-arg=-D_FORTIFY_SOURCE=2 -C link-arg=-Wformat -C link-arg=-Wformat-security -C link-arg=-Werror=format-security -C link-arg=--sysroot=/data2/dtd-yocto-4.0/tmp-sicom-glibc/work/corei7-64-oe-linux/mesa/2_23.0.0-r0/recipe-sysroot can not compile programs.
|
| error: Error loading target specification: Could not find specification for target "x86_64-linux". Run `rustc --print target-list` for a list of built-in targets

I also tried it with moving the conditionally set rust between or before the already inherited classes.

It succeeds when inherit rust is not conditional.

Quoted 13 lines
Quoted 3 lines

Ross

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

#10 lore raw

Re: [OE-core] [PATCH 4/4] mesa: Add PACKAGECONFIG "rusticl"

Quoted 17 lines · Zoltan Boszormenyi

Problem is, now the configure stage fails with:

| ../mesa-23.0.0/meson.build:964: WARNING: add_languages is missing native:, assuming languages are wanted for both host and build.

| Compiler for language rust for the build machine not found.
|
| ../mesa-23.0.0/meson.build:964:2: ERROR: Rust compiler rustc -C

linker=x86_64-oe-linux-gcc -C link-arg=-m64 -C link-arg=-march=nehalem -C link-arg=-mtune=generic -C link-arg=-mfpmath=sse -C link-arg=-msse4.2 -C link-arg=-fstack-protector-strong -C link-arg=-O2 -C link-arg=-D_FORTIFY_SOURCE=2 -C link-arg=-Wformat -C link-arg=-Wformat-security -C link-arg=-Werror=format-security -C link-arg=--sysroot=/data2/dtd-yocto-4.0/tmp-sicom-glibc/work/corei7-64-oe-linux/mesa/2_23.0.0-r0/recipe-sysroot can not compile programs.
|
| error: Error loading target specification: Could not find specification for target "x86_64-linux". Run rustc --print target-list for a list of built-in targets

Quoted 4 lines

I also tried it with moving the conditionally set rust between or before the already inherited classes.

It succeeds when inherit rust is not conditional.

It also succeeds when there is no inherit rust at all, in the current master branch recipe.

If inherit rust is conditional, and condition is false, then there is some other change that triggers the failure, and that change should be conditional as well.

Alex

A message that is not in the archive (sent off-list or not yet received): [email protected]

#12 lore raw

Re: [OE-core] [PATCH 4/4] mesa: Add PACKAGECONFIG "rusticl"

Quoted 6 lines · Alexander Kanavin via lists.openembedded.org

It also succeeds when there is no inherit rust at all, in the current master branch recipe.

If inherit rust is conditional, and condition is false, then there is some other change that triggers the failure, and that change should be conditional as well.

Or is it the other way around - fails when condition should be true? How did you write it?

Alex

#13 lore raw

Re: [OE-core] [PATCH 4/4] mesa: Add PACKAGECONFIG "rusticl"

2023. 02. 24. 12:12 keltezéssel, Alexander Kanavin írta:

Quoted 11 lines
Quoted 6 lines · Alexander Kanavin via lists.openembedded.org

It also succeeds when there is no inherit rust at all, in the current master branch recipe.

If inherit rust is conditional, and condition is false, then there is some other change that triggers the failure, and that change should be conditional as well.

Or is it the other way around - fails when condition should be true? How did you write it?

Copied from a different recipe and modified for this use case:

inherit ${@bb.utils.contains('PACKAGECONFIG', 'rusticl', 'rust', '', d)}

Quoted 1 line

Alex

#14 lore raw
In reply to Zoltán Böszörményi

As this is needed only for rusticl, and that is switched off by default, there is no need for the recipe to be in core. I'd say meta-oe is a better location.

Also, the list of crates should be generated by cargo-update-recipe-crates class, not by cargo bitbake.

Alex

Quoted 171 lines · Zoltan Boszormenyi

The recipe is automatically generated by cargo-bitbake, with the manual change to add BBCLASSEXTEND = "native" in the include file.

It is used by Mesa 23.0.0 to build Rusticl.

---
 meta/recipes-devtools/bindgen/bindgen-cli.inc |   1 +
 .../bindgen/bindgen-cli_0.64.0.bb             | 132 ++++++++++++++++++
 2 files changed, 133 insertions(+)
 create mode 100644 meta/recipes-devtools/bindgen/bindgen-cli.inc
 create mode 100644 meta/recipes-devtools/bindgen/bindgen-cli_0.64.0.bb
meta/recipes-devtools/bindgen/bindgen-cli.inc new file +1 -0
new file mode 100644
index 0000000000..d3267ac413
@@ -0,0 +1 @@
+BBCLASSEXTEND = "native"
meta/recipes-devtools/bindgen/bindgen-cli_0.64.0.bb new file +132 -1
new file mode 100644
index 0000000000..da3d692717
@@ -0,0 +1,132 @@
+# Auto-Generated by cargo-bitbake 0.3.16-alpha.0
+#
+inherit cargo
+
+# If this is git based prefer versioned ones if they exist
+# DEFAULT_PREFERENCE = "-1"
+
+# how to get bindgen-cli could be as easy as but default to a git checkout:
+# SRC_URI += "crate://crates.io/bindgen-cli/0.64.0"
+SRC_URI += "git://github.com/rust-lang/rust-bindgen.git;protocol=https;nobranch=1;branch=v0.64.0"
+SRCREV = "ae6817256ac557981906e93a1f866349db85053e"
+S = "${WORKDIR}/git"
+CARGO_SRC_DIR = "bindgen-cli"
+
+
+# please note if you have entries that do not begin with crate://
+# you must change them to how that package can be fetched
+SRC_URI += " \
+    crate://crates.io/aho-corasick/0.5.3 \
+    crate://crates.io/aho-corasick/0.7.20 \
+    crate://crates.io/ansi_term/0.12.1 \
+    crate://crates.io/atty/0.2.14 \
+    crate://crates.io/bitflags/1.3.2 \
+    crate://crates.io/block/0.1.6 \
+    crate://crates.io/cc/1.0.78 \
+    crate://crates.io/cexpr/0.6.0 \
+    crate://crates.io/cfg-if/1.0.0 \
+    crate://crates.io/clang-sys/1.4.0 \
+    crate://crates.io/clap/2.34.0 \
+    crate://crates.io/clap/4.1.4 \
+    crate://crates.io/clap_derive/4.1.0 \
+    crate://crates.io/clap_lex/0.3.1 \
+    crate://crates.io/diff/0.1.13 \
+    crate://crates.io/either/1.8.1 \
+    crate://crates.io/env_logger/0.3.5 \
+    crate://crates.io/env_logger/0.9.3 \
+    crate://crates.io/errno-dragonfly/0.1.2 \
+    crate://crates.io/errno/0.2.8 \
+    crate://crates.io/fastrand/1.8.0 \
+    crate://crates.io/fuchsia-cprng/0.1.1 \
+    crate://crates.io/glob/0.3.1 \
+    crate://crates.io/heck/0.4.0 \
+    crate://crates.io/hermit-abi/0.1.19 \
+    crate://crates.io/hermit-abi/0.2.6 \
+    crate://crates.io/humantime/2.1.0 \
+    crate://crates.io/instant/0.1.12 \
+    crate://crates.io/io-lifetimes/1.0.4 \
+    crate://crates.io/is-terminal/0.4.2 \
+    crate://crates.io/kernel32-sys/0.2.2 \
+    crate://crates.io/lazy_static/1.4.0 \
+    crate://crates.io/lazycell/1.3.0 \
+    crate://crates.io/libc/0.2.139 \
+    crate://crates.io/libloading/0.6.7 \
+    crate://crates.io/libloading/0.7.4 \
+    crate://crates.io/linux-raw-sys/0.1.4 \
+    crate://crates.io/log/0.3.9 \
+    crate://crates.io/log/0.4.17 \
+    crate://crates.io/malloc_buf/0.0.6 \
+    crate://crates.io/memchr/0.1.11 \
+    crate://crates.io/memchr/2.5.0 \
+    crate://crates.io/minimal-lexical/0.2.1 \
+    crate://crates.io/nom/7.1.3 \
+    crate://crates.io/objc/0.2.7 \
+    crate://crates.io/once_cell/1.17.0 \
+    crate://crates.io/os_str_bytes/6.4.1 \
+    crate://crates.io/peeking_take_while/0.1.2 \
+    crate://crates.io/proc-macro-error-attr/1.0.4 \
+    crate://crates.io/proc-macro-error/1.0.4 \
+    crate://crates.io/proc-macro2/1.0.50 \
+    crate://crates.io/quickcheck/0.4.1 \
+    crate://crates.io/quote/1.0.23 \
+    crate://crates.io/rand/0.3.23 \
+    crate://crates.io/rand/0.4.6 \
+    crate://crates.io/rand_core/0.3.1 \
+    crate://crates.io/rand_core/0.4.2 \
+    crate://crates.io/rdrand/0.4.0 \
+    crate://crates.io/redox_syscall/0.2.16 \
+    crate://crates.io/regex-syntax/0.3.9 \
+    crate://crates.io/regex-syntax/0.6.28 \
+    crate://crates.io/regex/0.1.80 \
+    crate://crates.io/regex/1.7.1 \
+    crate://crates.io/remove_dir_all/0.5.3 \
+    crate://crates.io/rustc-hash/1.1.0 \
+    crate://crates.io/rustix/0.36.7 \
+    crate://crates.io/shlex/1.1.0 \
+    crate://crates.io/strsim/0.10.0 \
+    crate://crates.io/strsim/0.8.0 \
+    crate://crates.io/syn/1.0.107 \
+    crate://crates.io/tempdir/0.3.7 \
+    crate://crates.io/tempfile/3.3.0 \
+    crate://crates.io/termcolor/1.2.0 \
+    crate://crates.io/textwrap/0.11.0 \
+    crate://crates.io/thread-id/2.0.0 \
+    crate://crates.io/thread_local/0.2.7 \
+    crate://crates.io/unicode-ident/1.0.6 \
+    crate://crates.io/unicode-width/0.1.10 \
+    crate://crates.io/utf8-ranges/0.1.3 \
+    crate://crates.io/vec_map/0.8.2 \
+    crate://crates.io/version_check/0.9.4 \
+    crate://crates.io/which/4.4.0 \
+    crate://crates.io/winapi-build/0.1.1 \
+    crate://crates.io/winapi-i686-pc-windows-gnu/0.4.0 \
+    crate://crates.io/winapi-util/0.1.5 \
+    crate://crates.io/winapi-x86_64-pc-windows-gnu/0.4.0 \
+    crate://crates.io/winapi/0.2.8 \
+    crate://crates.io/winapi/0.3.9 \
+    crate://crates.io/windows-sys/0.42.0 \
+    crate://crates.io/windows_aarch64_gnullvm/0.42.1 \
+    crate://crates.io/windows_aarch64_msvc/0.42.1 \
+    crate://crates.io/windows_i686_gnu/0.42.1 \
+    crate://crates.io/windows_i686_msvc/0.42.1 \
+    crate://crates.io/windows_x86_64_gnu/0.42.1 \
+    crate://crates.io/windows_x86_64_gnullvm/0.42.1 \
+    crate://crates.io/windows_x86_64_msvc/0.42.1 \
+"
+
+
+
+# FIXME: update generateme with the real MD5 of the license file
+LIC_FILES_CHKSUM = " \
+    file://bindgen-cli/LICENSE;md5=0b9a98cb3dcdefcceb145324693fda9b \
+"
+
+SUMMARY = "Automatically generates Rust FFI bindings to C and C++ libraries."
+HOMEPAGE = "https://rust-lang.github.io/rust-bindgen/"
+LICENSE = "BSD-3-Clause"
+
+# includes this file if it exists but does not fail
+# this is useful for anything you may want to override from
+# what cargo-bitbake generates.
+include bindgen-cli-${PV}.inc
+include bindgen-cli.inc
--

2.39.2

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

#15 lore raw

2023. 02. 24. 10:44 keltezéssel, Alexander Kanavin írta:

Quoted 3 lines

As this is needed only for rusticl, and that is switched off by default, there is no need for the recipe to be in core. I'd say meta-oe is a better location.

Why?

Rust itself is in OE-core for a while now and
bindgen is practically an integral part of Rust
if it's to be interfaced with C/C++.

Quoted 2 lines

Also, the list of crates should be generated by cargo-update-recipe-crates class, not by cargo bitbake.

I will look into it, thanks.

Quoted 174 lines

Alex

Quoted 170 lines · Zoltan Boszormenyi

The recipe is automatically generated by cargo-bitbake, with the manual change to add BBCLASSEXTEND = "native" in the include file.

It is used by Mesa 23.0.0 to build Rusticl.

---
  meta/recipes-devtools/bindgen/bindgen-cli.inc |   1 +
  .../bindgen/bindgen-cli_0.64.0.bb             | 132 ++++++++++++++++++
  2 files changed, 133 insertions(+)

create mode 100644 meta/recipes-devtools/bindgen/bindgen-cli.inc create mode 100644 meta/recipes-devtools/bindgen/bindgen-cli_0.64.0.bb

meta/recipes-devtools/bindgen/bindgen-cli.inc new file +1 -0
new file mode 100644
index 0000000000..d3267ac413
@@ -0,0 +1 @@
+BBCLASSEXTEND = "native"
meta/recipes-devtools/bindgen/bindgen-cli_0.64.0.bb new file +132 -1
new file mode 100644
index 0000000000..da3d692717
@@ -0,0 +1,132 @@
+# Auto-Generated by cargo-bitbake 0.3.16-alpha.0
+#
+inherit cargo
+
+# If this is git based prefer versioned ones if they exist
+# DEFAULT_PREFERENCE = "-1"
+
+# how to get bindgen-cli could be as easy as but default to a git checkout:
+# SRC_URI += "crate://crates.io/bindgen-cli/0.64.0"
+SRC_URI += "git://github.com/rust-lang/rust-bindgen.git;protocol=https;nobranch=1;branch=v0.64.0"
+SRCREV = "ae6817256ac557981906e93a1f866349db85053e"
+S = "${WORKDIR}/git"
+CARGO_SRC_DIR = "bindgen-cli"
+
+
+# please note if you have entries that do not begin with crate://
+# you must change them to how that package can be fetched
+SRC_URI += " \
+    crate://crates.io/aho-corasick/0.5.3 \
+    crate://crates.io/aho-corasick/0.7.20 \
+    crate://crates.io/ansi_term/0.12.1 \
+    crate://crates.io/atty/0.2.14 \
+    crate://crates.io/bitflags/1.3.2 \
+    crate://crates.io/block/0.1.6 \
+    crate://crates.io/cc/1.0.78 \
+    crate://crates.io/cexpr/0.6.0 \
+    crate://crates.io/cfg-if/1.0.0 \
+    crate://crates.io/clang-sys/1.4.0 \
+    crate://crates.io/clap/2.34.0 \
+    crate://crates.io/clap/4.1.4 \
+    crate://crates.io/clap_derive/4.1.0 \
+    crate://crates.io/clap_lex/0.3.1 \
+    crate://crates.io/diff/0.1.13 \
+    crate://crates.io/either/1.8.1 \
+    crate://crates.io/env_logger/0.3.5 \
+    crate://crates.io/env_logger/0.9.3 \
+    crate://crates.io/errno-dragonfly/0.1.2 \
+    crate://crates.io/errno/0.2.8 \
+    crate://crates.io/fastrand/1.8.0 \
+    crate://crates.io/fuchsia-cprng/0.1.1 \
+    crate://crates.io/glob/0.3.1 \
+    crate://crates.io/heck/0.4.0 \
+    crate://crates.io/hermit-abi/0.1.19 \
+    crate://crates.io/hermit-abi/0.2.6 \
+    crate://crates.io/humantime/2.1.0 \
+    crate://crates.io/instant/0.1.12 \
+    crate://crates.io/io-lifetimes/1.0.4 \
+    crate://crates.io/is-terminal/0.4.2 \
+    crate://crates.io/kernel32-sys/0.2.2 \
+    crate://crates.io/lazy_static/1.4.0 \
+    crate://crates.io/lazycell/1.3.0 \
+    crate://crates.io/libc/0.2.139 \
+    crate://crates.io/libloading/0.6.7 \
+    crate://crates.io/libloading/0.7.4 \
+    crate://crates.io/linux-raw-sys/0.1.4 \
+    crate://crates.io/log/0.3.9 \
+    crate://crates.io/log/0.4.17 \
+    crate://crates.io/malloc_buf/0.0.6 \
+    crate://crates.io/memchr/0.1.11 \
+    crate://crates.io/memchr/2.5.0 \
+    crate://crates.io/minimal-lexical/0.2.1 \
+    crate://crates.io/nom/7.1.3 \
+    crate://crates.io/objc/0.2.7 \
+    crate://crates.io/once_cell/1.17.0 \
+    crate://crates.io/os_str_bytes/6.4.1 \
+    crate://crates.io/peeking_take_while/0.1.2 \
+    crate://crates.io/proc-macro-error-attr/1.0.4 \
+    crate://crates.io/proc-macro-error/1.0.4 \
+    crate://crates.io/proc-macro2/1.0.50 \
+    crate://crates.io/quickcheck/0.4.1 \
+    crate://crates.io/quote/1.0.23 \
+    crate://crates.io/rand/0.3.23 \
+    crate://crates.io/rand/0.4.6 \
+    crate://crates.io/rand_core/0.3.1 \
+    crate://crates.io/rand_core/0.4.2 \
+    crate://crates.io/rdrand/0.4.0 \
+    crate://crates.io/redox_syscall/0.2.16 \
+    crate://crates.io/regex-syntax/0.3.9 \
+    crate://crates.io/regex-syntax/0.6.28 \
+    crate://crates.io/regex/0.1.80 \
+    crate://crates.io/regex/1.7.1 \
+    crate://crates.io/remove_dir_all/0.5.3 \
+    crate://crates.io/rustc-hash/1.1.0 \
+    crate://crates.io/rustix/0.36.7 \
+    crate://crates.io/shlex/1.1.0 \
+    crate://crates.io/strsim/0.10.0 \
+    crate://crates.io/strsim/0.8.0 \
+    crate://crates.io/syn/1.0.107 \
+    crate://crates.io/tempdir/0.3.7 \
+    crate://crates.io/tempfile/3.3.0 \
+    crate://crates.io/termcolor/1.2.0 \
+    crate://crates.io/textwrap/0.11.0 \
+    crate://crates.io/thread-id/2.0.0 \
+    crate://crates.io/thread_local/0.2.7 \
+    crate://crates.io/unicode-ident/1.0.6 \
+    crate://crates.io/unicode-width/0.1.10 \
+    crate://crates.io/utf8-ranges/0.1.3 \
+    crate://crates.io/vec_map/0.8.2 \
+    crate://crates.io/version_check/0.9.4 \
+    crate://crates.io/which/4.4.0 \
+    crate://crates.io/winapi-build/0.1.1 \
+    crate://crates.io/winapi-i686-pc-windows-gnu/0.4.0 \
+    crate://crates.io/winapi-util/0.1.5 \
+    crate://crates.io/winapi-x86_64-pc-windows-gnu/0.4.0 \
+    crate://crates.io/winapi/0.2.8 \
+    crate://crates.io/winapi/0.3.9 \
+    crate://crates.io/windows-sys/0.42.0 \
+    crate://crates.io/windows_aarch64_gnullvm/0.42.1 \
+    crate://crates.io/windows_aarch64_msvc/0.42.1 \
+    crate://crates.io/windows_i686_gnu/0.42.1 \
+    crate://crates.io/windows_i686_msvc/0.42.1 \
+    crate://crates.io/windows_x86_64_gnu/0.42.1 \
+    crate://crates.io/windows_x86_64_gnullvm/0.42.1 \
+    crate://crates.io/windows_x86_64_msvc/0.42.1 \
+"
+
+
+
+# FIXME: update generateme with the real MD5 of the license file
+LIC_FILES_CHKSUM = " \
+    file://bindgen-cli/LICENSE;md5=0b9a98cb3dcdefcceb145324693fda9b \
+"
+
+SUMMARY = "Automatically generates Rust FFI bindings to C and C++ libraries."
+HOMEPAGE = "https://rust-lang.github.io/rust-bindgen/"
+LICENSE = "BSD-3-Clause"
+
+# includes this file if it exists but does not fail
+# this is useful for anything you may want to override from
+# what cargo-bitbake generates.
+include bindgen-cli-${PV}.inc
+include bindgen-cli.inc
--

2.39.2

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

#16 lore raw
Quoted 11 lines · Böszörményi Zoltán

2023. 02. 24. 10:44 keltezéssel, Alexander Kanavin írta:

Quoted 3 lines

As this is needed only for rusticl, and that is switched off by default, there is no need for the recipe to be in core. I'd say meta-oe is a better location.

Why?

Rust itself is in OE-core for a while now and
bindgen is practically an integral part of Rust
if it's to be interfaced with C/C++.

That is not enough for inclusion into core. It either needs to be useful in a typical, common embedded use case, or be a hard depenency of such an item. So it has only one consumer, rusticl, and even that is not enabled by default or broadly useful.

Keep in mind that maintainer capacity is not infinite, we're all volunteers except RP.

Alex

#17 lore raw

2023. 02. 24. 11:13 keltezéssel, Alexander Kanavin írta:

Quoted 7 lines · Böszörményi Zoltán
Quoted 6 lines

2023. 02. 24. 10:44 keltezéssel, Alexander Kanavin írta:

Quoted 3 lines

As this is needed only for rusticl, and that is switched off by default, there is no need for the recipe to be in core. I'd say meta-oe is a better location.

Why?

Quoted 7 lines
Quoted 3 lines

Rust itself is in OE-core for a while now and
bindgen is practically an integral part of Rust
if it's to be interfaced with C/C++.

That is not enough for inclusion into core. It either needs to be useful in a typical, common embedded use case, or be a hard depenency of such an item. So it has only one consumer, rusticl, and even that is not enabled by default or broadly useful.

Understood. I will move the bindgen recipe to meta-oe.

Quoted 5 lines

Keep in mind that maintainer capacity is not infinite, we're all volunteers except RP.

Alex

#18 lore raw
In reply to Zoltán Böszörményi

I need to go and ask our resident rustacean, but when we pulled this crate into a build here, I had to bring in meta-clang in order to satisfy the runtime deps. May well be that I got something wrong at the time, or something's changed, but we definitely needed that.

Quoted 171 lines · Zoltan Boszormenyi

The recipe is automatically generated by cargo-bitbake, with the manual change to add BBCLASSEXTEND = "native" in the include file.

It is used by Mesa 23.0.0 to build Rusticl.

---
 meta/recipes-devtools/bindgen/bindgen-cli.inc |   1 +
 .../bindgen/bindgen-cli_0.64.0.bb             | 132 ++++++++++++++++++
 2 files changed, 133 insertions(+)
 create mode 100644 meta/recipes-devtools/bindgen/bindgen-cli.inc
 create mode 100644 meta/recipes-devtools/bindgen/bindgen-cli_0.64.0.bb
meta/recipes-devtools/bindgen/bindgen-cli.inc new file +1 -0
new file mode 100644
index 0000000000..d3267ac413
@@ -0,0 +1 @@
+BBCLASSEXTEND = "native"
meta/recipes-devtools/bindgen/bindgen-cli_0.64.0.bb new file +132 -1
new file mode 100644
index 0000000000..da3d692717
@@ -0,0 +1,132 @@
+# Auto-Generated by cargo-bitbake 0.3.16-alpha.0
+#
+inherit cargo
+
+# If this is git based prefer versioned ones if they exist
+# DEFAULT_PREFERENCE = "-1"
+
+# how to get bindgen-cli could be as easy as but default to a git checkout:
+# SRC_URI += "crate://crates.io/bindgen-cli/0.64.0"
+SRC_URI += "git://github.com/rust-lang/rust-bindgen.git;protocol=https;nobranch=1;branch=v0.64.0"
+SRCREV = "ae6817256ac557981906e93a1f866349db85053e"
+S = "${WORKDIR}/git"
+CARGO_SRC_DIR = "bindgen-cli"
+
+
+# please note if you have entries that do not begin with crate://
+# you must change them to how that package can be fetched
+SRC_URI += " \
+    crate://crates.io/aho-corasick/0.5.3 \
+    crate://crates.io/aho-corasick/0.7.20 \
+    crate://crates.io/ansi_term/0.12.1 \
+    crate://crates.io/atty/0.2.14 \
+    crate://crates.io/bitflags/1.3.2 \
+    crate://crates.io/block/0.1.6 \
+    crate://crates.io/cc/1.0.78 \
+    crate://crates.io/cexpr/0.6.0 \
+    crate://crates.io/cfg-if/1.0.0 \
+    crate://crates.io/clang-sys/1.4.0 \
+    crate://crates.io/clap/2.34.0 \
+    crate://crates.io/clap/4.1.4 \
+    crate://crates.io/clap_derive/4.1.0 \
+    crate://crates.io/clap_lex/0.3.1 \
+    crate://crates.io/diff/0.1.13 \
+    crate://crates.io/either/1.8.1 \
+    crate://crates.io/env_logger/0.3.5 \
+    crate://crates.io/env_logger/0.9.3 \
+    crate://crates.io/errno-dragonfly/0.1.2 \
+    crate://crates.io/errno/0.2.8 \
+    crate://crates.io/fastrand/1.8.0 \
+    crate://crates.io/fuchsia-cprng/0.1.1 \
+    crate://crates.io/glob/0.3.1 \
+    crate://crates.io/heck/0.4.0 \
+    crate://crates.io/hermit-abi/0.1.19 \
+    crate://crates.io/hermit-abi/0.2.6 \
+    crate://crates.io/humantime/2.1.0 \
+    crate://crates.io/instant/0.1.12 \
+    crate://crates.io/io-lifetimes/1.0.4 \
+    crate://crates.io/is-terminal/0.4.2 \
+    crate://crates.io/kernel32-sys/0.2.2 \
+    crate://crates.io/lazy_static/1.4.0 \
+    crate://crates.io/lazycell/1.3.0 \
+    crate://crates.io/libc/0.2.139 \
+    crate://crates.io/libloading/0.6.7 \
+    crate://crates.io/libloading/0.7.4 \
+    crate://crates.io/linux-raw-sys/0.1.4 \
+    crate://crates.io/log/0.3.9 \
+    crate://crates.io/log/0.4.17 \
+    crate://crates.io/malloc_buf/0.0.6 \
+    crate://crates.io/memchr/0.1.11 \
+    crate://crates.io/memchr/2.5.0 \
+    crate://crates.io/minimal-lexical/0.2.1 \
+    crate://crates.io/nom/7.1.3 \
+    crate://crates.io/objc/0.2.7 \
+    crate://crates.io/once_cell/1.17.0 \
+    crate://crates.io/os_str_bytes/6.4.1 \
+    crate://crates.io/peeking_take_while/0.1.2 \
+    crate://crates.io/proc-macro-error-attr/1.0.4 \
+    crate://crates.io/proc-macro-error/1.0.4 \
+    crate://crates.io/proc-macro2/1.0.50 \
+    crate://crates.io/quickcheck/0.4.1 \
+    crate://crates.io/quote/1.0.23 \
+    crate://crates.io/rand/0.3.23 \
+    crate://crates.io/rand/0.4.6 \
+    crate://crates.io/rand_core/0.3.1 \
+    crate://crates.io/rand_core/0.4.2 \
+    crate://crates.io/rdrand/0.4.0 \
+    crate://crates.io/redox_syscall/0.2.16 \
+    crate://crates.io/regex-syntax/0.3.9 \
+    crate://crates.io/regex-syntax/0.6.28 \
+    crate://crates.io/regex/0.1.80 \
+    crate://crates.io/regex/1.7.1 \
+    crate://crates.io/remove_dir_all/0.5.3 \
+    crate://crates.io/rustc-hash/1.1.0 \
+    crate://crates.io/rustix/0.36.7 \
+    crate://crates.io/shlex/1.1.0 \
+    crate://crates.io/strsim/0.10.0 \
+    crate://crates.io/strsim/0.8.0 \
+    crate://crates.io/syn/1.0.107 \
+    crate://crates.io/tempdir/0.3.7 \
+    crate://crates.io/tempfile/3.3.0 \
+    crate://crates.io/termcolor/1.2.0 \
+    crate://crates.io/textwrap/0.11.0 \
+    crate://crates.io/thread-id/2.0.0 \
+    crate://crates.io/thread_local/0.2.7 \
+    crate://crates.io/unicode-ident/1.0.6 \
+    crate://crates.io/unicode-width/0.1.10 \
+    crate://crates.io/utf8-ranges/0.1.3 \
+    crate://crates.io/vec_map/0.8.2 \
+    crate://crates.io/version_check/0.9.4 \
+    crate://crates.io/which/4.4.0 \
+    crate://crates.io/winapi-build/0.1.1 \
+    crate://crates.io/winapi-i686-pc-windows-gnu/0.4.0 \
+    crate://crates.io/winapi-util/0.1.5 \
+    crate://crates.io/winapi-x86_64-pc-windows-gnu/0.4.0 \
+    crate://crates.io/winapi/0.2.8 \
+    crate://crates.io/winapi/0.3.9 \
+    crate://crates.io/windows-sys/0.42.0 \
+    crate://crates.io/windows_aarch64_gnullvm/0.42.1 \
+    crate://crates.io/windows_aarch64_msvc/0.42.1 \
+    crate://crates.io/windows_i686_gnu/0.42.1 \
+    crate://crates.io/windows_i686_msvc/0.42.1 \
+    crate://crates.io/windows_x86_64_gnu/0.42.1 \
+    crate://crates.io/windows_x86_64_gnullvm/0.42.1 \
+    crate://crates.io/windows_x86_64_msvc/0.42.1 \
+"
+
+
+
+# FIXME: update generateme with the real MD5 of the license file
+LIC_FILES_CHKSUM = " \
+    file://bindgen-cli/LICENSE;md5=0b9a98cb3dcdefcceb145324693fda9b \
+"
+
+SUMMARY = "Automatically generates Rust FFI bindings to C and C++ libraries."
+HOMEPAGE = "https://rust-lang.github.io/rust-bindgen/"
+LICENSE = "BSD-3-Clause"
+
+# includes this file if it exists but does not fail
+# this is useful for anything you may want to override from
+# what cargo-bitbake generates.
+include bindgen-cli-${PV}.inc
+include bindgen-cli.inc
--

2.39.2

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

Signature · 1 line
Alex Kiernan
#19 lore raw

2023. 02. 24. 14:32 keltezéssel, Alex Kiernan írta:

Quoted 4 lines

I need to go and ask our resident rustacean, but when we pulled this crate into a build here, I had to bring in meta-clang in order to satisfy the runtime deps. May well be that I got something wrong at the time, or something's changed, but we definitely needed that.

I am also using meta-clang.

Then I will probably have to post it to meta-clang or make this recipe conditional on the presence of meta-clang.

Quoted 173 lines · Zoltan Boszormenyi
Quoted 170 lines

The recipe is automatically generated by cargo-bitbake, with the manual change to add BBCLASSEXTEND = "native" in the include file.

It is used by Mesa 23.0.0 to build Rusticl.

---
  meta/recipes-devtools/bindgen/bindgen-cli.inc |   1 +
  .../bindgen/bindgen-cli_0.64.0.bb             | 132 ++++++++++++++++++
  2 files changed, 133 insertions(+)

create mode 100644 meta/recipes-devtools/bindgen/bindgen-cli.inc create mode 100644 meta/recipes-devtools/bindgen/bindgen-cli_0.64.0.bb

meta/recipes-devtools/bindgen/bindgen-cli.inc new file +1 -0
new file mode 100644
index 0000000000..d3267ac413
@@ -0,0 +1 @@
+BBCLASSEXTEND = "native"
meta/recipes-devtools/bindgen/bindgen-cli_0.64.0.bb new file +132 -1
new file mode 100644
index 0000000000..da3d692717
@@ -0,0 +1,132 @@
+# Auto-Generated by cargo-bitbake 0.3.16-alpha.0
+#
+inherit cargo
+
+# If this is git based prefer versioned ones if they exist
+# DEFAULT_PREFERENCE = "-1"
+
+# how to get bindgen-cli could be as easy as but default to a git checkout:
+# SRC_URI += "crate://crates.io/bindgen-cli/0.64.0"
+SRC_URI += "git://github.com/rust-lang/rust-bindgen.git;protocol=https;nobranch=1;branch=v0.64.0"
+SRCREV = "ae6817256ac557981906e93a1f866349db85053e"
+S = "${WORKDIR}/git"
+CARGO_SRC_DIR = "bindgen-cli"
+
+
+# please note if you have entries that do not begin with crate://
+# you must change them to how that package can be fetched
+SRC_URI += " \
+    crate://crates.io/aho-corasick/0.5.3 \
+    crate://crates.io/aho-corasick/0.7.20 \
+    crate://crates.io/ansi_term/0.12.1 \
+    crate://crates.io/atty/0.2.14 \
+    crate://crates.io/bitflags/1.3.2 \
+    crate://crates.io/block/0.1.6 \
+    crate://crates.io/cc/1.0.78 \
+    crate://crates.io/cexpr/0.6.0 \
+    crate://crates.io/cfg-if/1.0.0 \
+    crate://crates.io/clang-sys/1.4.0 \
+    crate://crates.io/clap/2.34.0 \
+    crate://crates.io/clap/4.1.4 \
+    crate://crates.io/clap_derive/4.1.0 \
+    crate://crates.io/clap_lex/0.3.1 \
+    crate://crates.io/diff/0.1.13 \
+    crate://crates.io/either/1.8.1 \
+    crate://crates.io/env_logger/0.3.5 \
+    crate://crates.io/env_logger/0.9.3 \
+    crate://crates.io/errno-dragonfly/0.1.2 \
+    crate://crates.io/errno/0.2.8 \
+    crate://crates.io/fastrand/1.8.0 \
+    crate://crates.io/fuchsia-cprng/0.1.1 \
+    crate://crates.io/glob/0.3.1 \
+    crate://crates.io/heck/0.4.0 \
+    crate://crates.io/hermit-abi/0.1.19 \
+    crate://crates.io/hermit-abi/0.2.6 \
+    crate://crates.io/humantime/2.1.0 \
+    crate://crates.io/instant/0.1.12 \
+    crate://crates.io/io-lifetimes/1.0.4 \
+    crate://crates.io/is-terminal/0.4.2 \
+    crate://crates.io/kernel32-sys/0.2.2 \
+    crate://crates.io/lazy_static/1.4.0 \
+    crate://crates.io/lazycell/1.3.0 \
+    crate://crates.io/libc/0.2.139 \
+    crate://crates.io/libloading/0.6.7 \
+    crate://crates.io/libloading/0.7.4 \
+    crate://crates.io/linux-raw-sys/0.1.4 \
+    crate://crates.io/log/0.3.9 \
+    crate://crates.io/log/0.4.17 \
+    crate://crates.io/malloc_buf/0.0.6 \
+    crate://crates.io/memchr/0.1.11 \
+    crate://crates.io/memchr/2.5.0 \
+    crate://crates.io/minimal-lexical/0.2.1 \
+    crate://crates.io/nom/7.1.3 \
+    crate://crates.io/objc/0.2.7 \
+    crate://crates.io/once_cell/1.17.0 \
+    crate://crates.io/os_str_bytes/6.4.1 \
+    crate://crates.io/peeking_take_while/0.1.2 \
+    crate://crates.io/proc-macro-error-attr/1.0.4 \
+    crate://crates.io/proc-macro-error/1.0.4 \
+    crate://crates.io/proc-macro2/1.0.50 \
+    crate://crates.io/quickcheck/0.4.1 \
+    crate://crates.io/quote/1.0.23 \
+    crate://crates.io/rand/0.3.23 \
+    crate://crates.io/rand/0.4.6 \
+    crate://crates.io/rand_core/0.3.1 \
+    crate://crates.io/rand_core/0.4.2 \
+    crate://crates.io/rdrand/0.4.0 \
+    crate://crates.io/redox_syscall/0.2.16 \
+    crate://crates.io/regex-syntax/0.3.9 \
+    crate://crates.io/regex-syntax/0.6.28 \
+    crate://crates.io/regex/0.1.80 \
+    crate://crates.io/regex/1.7.1 \
+    crate://crates.io/remove_dir_all/0.5.3 \
+    crate://crates.io/rustc-hash/1.1.0 \
+    crate://crates.io/rustix/0.36.7 \
+    crate://crates.io/shlex/1.1.0 \
+    crate://crates.io/strsim/0.10.0 \
+    crate://crates.io/strsim/0.8.0 \
+    crate://crates.io/syn/1.0.107 \
+    crate://crates.io/tempdir/0.3.7 \
+    crate://crates.io/tempfile/3.3.0 \
+    crate://crates.io/termcolor/1.2.0 \
+    crate://crates.io/textwrap/0.11.0 \
+    crate://crates.io/thread-id/2.0.0 \
+    crate://crates.io/thread_local/0.2.7 \
+    crate://crates.io/unicode-ident/1.0.6 \
+    crate://crates.io/unicode-width/0.1.10 \
+    crate://crates.io/utf8-ranges/0.1.3 \
+    crate://crates.io/vec_map/0.8.2 \
+    crate://crates.io/version_check/0.9.4 \
+    crate://crates.io/which/4.4.0 \
+    crate://crates.io/winapi-build/0.1.1 \
+    crate://crates.io/winapi-i686-pc-windows-gnu/0.4.0 \
+    crate://crates.io/winapi-util/0.1.5 \
+    crate://crates.io/winapi-x86_64-pc-windows-gnu/0.4.0 \
+    crate://crates.io/winapi/0.2.8 \
+    crate://crates.io/winapi/0.3.9 \
+    crate://crates.io/windows-sys/0.42.0 \
+    crate://crates.io/windows_aarch64_gnullvm/0.42.1 \
+    crate://crates.io/windows_aarch64_msvc/0.42.1 \
+    crate://crates.io/windows_i686_gnu/0.42.1 \
+    crate://crates.io/windows_i686_msvc/0.42.1 \
+    crate://crates.io/windows_x86_64_gnu/0.42.1 \
+    crate://crates.io/windows_x86_64_gnullvm/0.42.1 \
+    crate://crates.io/windows_x86_64_msvc/0.42.1 \
+"
+
+
+
+# FIXME: update generateme with the real MD5 of the license file
+LIC_FILES_CHKSUM = " \
+    file://bindgen-cli/LICENSE;md5=0b9a98cb3dcdefcceb145324693fda9b \
+"
+
+SUMMARY = "Automatically generates Rust FFI bindings to C and C++ libraries."
+HOMEPAGE = "https://rust-lang.github.io/rust-bindgen/"
+LICENSE = "BSD-3-Clause"
+
+# includes this file if it exists but does not fail
+# this is useful for anything you may want to override from
+# what cargo-bitbake generates.
+include bindgen-cli-${PV}.inc
+include bindgen-cli.inc
--

2.39.2

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

#20 lore raw

v2 cover Mesa 23.0.0

In reply to Zoltán Böszörményi

Changelog for v2:

* bindgen-cli recipe was moved to meta-clang.
See https://github.com/kraj/meta-clang/pull/748
* The __anonymous() function that tweaks packaging variables were confused by two libopencl-mesa packages, creating havoc in naming subsequent packages. Use a synthetic "opencl" value that's added to the pkgconfig variable in this function if either "clover" or "rusticl" exists in PACKAGECONFIG.
* Made "inherit rust" conditional on PACKAGECONFIG="rusticl". (This fails under Kirkstone somehow for me.)

#21 lore raw

PATCH v2 1/3 mesa, mesa-gl: 23.0.0

---
 ...-backend-fix-gbm-compile-without-dri.patch | 65 -------------------
 ...ormat-Check-for-NEON-before-using-it.patch | 16 ++---
 .../{mesa-gl_22.3.5.bb => mesa-gl_23.0.0.bb}  |  0
 meta/recipes-graphics/mesa/mesa.inc           |  3 +-
 .../mesa/{mesa_22.3.5.bb => mesa_23.0.0.bb}   |  0
 5 files changed, 9 insertions(+), 75 deletions(-)
 delete mode 100644 meta/recipes-graphics/mesa/files/0001-gbm-backend-fix-gbm-compile-without-dri.patch
 rename meta/recipes-graphics/mesa/{mesa-gl_22.3.5.bb => mesa-gl_23.0.0.bb} (100%)
 rename meta/recipes-graphics/mesa/{mesa_22.3.5.bb => mesa_23.0.0.bb} (100%)
meta/recipes-graphics/mesa/files/0001-gbm-backend-fix-gbm-compile-without-dri.patch deleted +0 -65
deleted file mode 100644
index 6541671b7a..0000000000
@@ -1,65 +0,0 @@
-From 25946100e21cf2095bea334e8d7096798561d0b7 Mon Sep 17 00:00:00 2001
-From: Vincent Davis Jr <[email protected]>
-Date: Wed, 28 Dec 2022 16:28:01 -0600
-Subject: [PATCH] gbm/backend: fix gbm compile without dri
-
-Upstream-Status: Backport
-
-https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20447
-https://gitlab.freedesktop.org/mesa/mesa/-/commit/842ca284650f066e58706741a7d22d67b5088e60
-
-At mesa version 22.2.3 patch wasn't introduced until after.
-
-Commit introduces a fix that allows for gbm to be built with an empty
-backend. There are situation especially in a Yocto/OE cross compilation
-environment where you want to build with an empty backend. The particular
-situation is as such:
-
-The mesa-gl recipe is the preferred provider for virtual/libgbm, virtual/libgl,
-virtual/mesa, etc... But the x11 DISTRO_FEATURE in't included this leads to build
-errors such as:
-
-| /../../../ld: src/gbm/libgbm.so.1.0.0.p/main_backend.c.o: in function `find_backend':
-| backend.c:(.text.find_backend+0xa4): undefined reference to `gbm_dri_backend'
-| /../../../ld: src/gbm/libgbm.so.1.0.0.p/main_backend.c.o:(.data.rel.ro.builtin_backends+0x4):
-                undefined reference to `gbm_dri_backend'
-| collect2: error: ld returned 1 exit status
-
-Issue should be replicable by setting -Ddri3=disabled and -Dgbm=enabled
-
-Add fix to bypasses compilation issue by excluding gbm dri backend. If
-HAVE_DRI || HAVE_DRIX not specified.
-
-Acked-by: David Heidelberg <[email protected]>
-Signed-off-by: Vincent Davis Jr <[email protected]>
----
- src/gbm/main/backend.c | 4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/src/gbm/main/backend.c b/src/gbm/main/backend.c
-index 974d0a76a4e..feee0703495 100644
---- a/src/gbm/main/backend.c
-+++ b/src/gbm/main/backend.c
-@@ -42,7 +42,9 @@
- #define ARRAY_SIZE(a) (sizeof(a)/sizeof((a)[0]))
- #define VER_MIN(a, b) ((a) < (b) ? (a) : (b))
- 
-+#if defined(HAVE_DRI) || defined(HAVE_DRI2) || defined(HAVE_DRI3)
- extern const struct gbm_backend gbm_dri_backend;
-+#endif
- 
- struct gbm_backend_desc {
-    const char *name;
-@@ -51,7 +53,9 @@ struct gbm_backend_desc {
- };
- 
- static const struct gbm_backend_desc builtin_backends[] = {
-+#if defined(HAVE_DRI) || defined(HAVE_DRI2) || defined(HAVE_DRI3)
-    { "dri", &gbm_dri_backend },
-+#endif
- };
- 
- #define BACKEND_LIB_SUFFIX "_gbm"
--- 
-2.34.1
-
meta/recipes-graphics/mesa/files/0001-util-format-Check-for-NEON-before-using-it.patch +8 -8
index d22ff3c8a8..0bbd518047 100644
@@ -23,12 +23,12 @@ diff --git a/src/util/format/u_format.c b/src/util/format/u_format.c
 index c071250..0880984 100644
 --- a/src/util/format/u_format.c
 +++ b/src/util/format/u_format.c
-@@ -1184,7 +1184,7 @@ static void
+@@ -1187,7 +1187,7 @@
  util_format_unpack_table_init(void)
  {
     for (enum pipe_format format = PIPE_FORMAT_NONE; format < PIPE_FORMAT_COUNT; format++) {
--#if (defined(PIPE_ARCH_AARCH64) || defined(PIPE_ARCH_ARM)) && !defined(NO_FORMAT_ASM) && !defined(__SOFTFP__)
-+#if (defined(PIPE_ARCH_AARCH64) || (defined(__ARM_NEON) && defined(PIPE_ARCH_ARM))) && !defined(NO_FORMAT_ASM)
+-#if (DETECT_ARCH_AARCH64 || DETECT_ARCH_ARM) && !defined(NO_FORMAT_ASM) && !defined(__SOFTFP__)
++#if (DETECT_ARCH_AARCH64 || (DETECT_ARCH_ARM && defined(__ARM_NEON))) && !defined(NO_FORMAT_ASM) && !defined(__SOFTFP__)
        const struct util_format_unpack_description *unpack = util_format_unpack_description_neon(format);
        if (unpack) {
           util_format_unpack_table[format] = unpack;
@@ -36,12 +36,12 @@ diff --git a/src/util/format/u_format_unpack_neon.c b/src/util/format/u_format_u
 index a4a5cb1..1e4f794 100644
 --- a/src/util/format/u_format_unpack_neon.c
 +++ b/src/util/format/u_format_unpack_neon.c
-@@ -23,7 +23,7 @@
+@@ -24,7 +24,7 @@
+ #include "util/detect_arch.h"
+ #include "util/format/u_format.h"
  
- #include <u_format.h>
- 
--#if (defined(PIPE_ARCH_AARCH64) || defined(PIPE_ARCH_ARM)) && !defined(NO_FORMAT_ASM) && !defined(__SOFTFP__)
-+#if (defined(PIPE_ARCH_AARCH64) || (defined(__ARM_NEON) && defined(PIPE_ARCH_ARM))) && !defined(NO_FORMAT_ASM)
+-#if (DETECT_ARCH_AARCH64 || DETECT_ARCH_ARM) && !defined(NO_FORMAT_ASM) && !defined(__SOFTFP__)
++#if (DETECT_ARCH_AARCH64 || (DETECT_ARCH_ARM && defined(__ARM_NEON))) && !defined(NO_FORMAT_ASM) && !defined(__SOFTFP__)
  
  /* armhf builds default to vfp, not neon, and refuses to compile neon intrinsics
   * unless you tell it "no really".
meta/recipes-graphics/mesa/mesa-gl_23.0.0.bb renamed from meta/recipes-graphics/mesa/mesa-gl_22.3.5.bb +0 -0
similarity index 100%
rename from meta/recipes-graphics/mesa/mesa-gl_22.3.5.bb
rename to meta/recipes-graphics/mesa/mesa-gl_23.0.0.bb
meta/recipes-graphics/mesa/mesa.inc +1 -2
index 0a3dc1dd62..70f9b6fc17 100644
@@ -18,10 +18,9 @@ SRC_URI = "https://mesa.freedesktop.org/archive/mesa-${PV}.tar.xz \
            file://0001-meson.build-check-for-all-linux-host_os-combinations.patch \
            file://0001-meson-misdetects-64bit-atomics-on-mips-clang.patch \
            file://0001-util-format-Check-for-NEON-before-using-it.patch \
-           file://0001-gbm-backend-fix-gbm-compile-without-dri.patch \
            "
 
-SRC_URI[sha256sum] = "3eed2ecae2bc674494566faab9fcc9beb21cd804c7ba2b59a1694f3d7236e6a9"
+SRC_URI[sha256sum] = "01f3cff3763f09e0adabcb8011e4aebc6ad48f6a4dd4bae904fe918707d253e4"
 
 UPSTREAM_CHECK_GITTAGREGEX = "mesa-(?P<pver>\d+(\.\d+)+)"
 
meta/recipes-graphics/mesa/mesa_23.0.0.bb renamed from meta/recipes-graphics/mesa/mesa_22.3.5.bb +0 -0
similarity index 100%
rename from meta/recipes-graphics/mesa/mesa_22.3.5.bb
rename to meta/recipes-graphics/mesa/mesa_23.0.0.bb
Signature · 1 line
2.39.2
#22 lore raw

PATCH v2 2/3 mesa: Rename PACKAGECONFIG "opencl" to "clover"

In reply to Zoltán Böszörményi

There is another OpenCL frontend called "rusticl" now.

---
 meta/recipes-graphics/mesa/mesa.inc | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
meta/recipes-graphics/mesa/mesa.inc +5 -3
index 70f9b6fc17..89e2dc6e90 100644
@@ -115,9 +115,9 @@ PACKAGECONFIG[gles] = "-Dgles1=enabled -Dgles2=enabled, -Dgles1=disabled -Dgles2
 # "egl" requires "opengl"
 PACKAGECONFIG[egl] = "-Degl=enabled, -Degl=disabled"
 
-# "opencl" requires libclc from meta-clang and spirv-tools from OE-Core
+# "clover" requires libclc from meta-clang and spirv-tools from OE-Core
 OPENCL_NATIVE = "${@bb.utils.contains('PACKAGECONFIG', 'freedreno', '-Dopencl-native=true', '', d)}"
-PACKAGECONFIG[opencl] = "-Dgallium-opencl=icd -Dopencl-spirv=true ${OPENCL_NATIVE},-Dgallium-opencl=disabled -Dopencl-spirv=false,libclc spirv-tools"
+PACKAGECONFIG[clover] = "-Dgallium-opencl=icd -Dopencl-spirv=true ${OPENCL_NATIVE},-Dgallium-opencl=disabled -Dopencl-spirv=false,libclc spirv-tools"
 
 PACKAGECONFIG[broadcom] = ""
 PACKAGECONFIG[etnaviv] = ""
@@ -196,7 +196,7 @@ DEV_PKG_DEPENDENCY = ""
 # development package of libgles3.
 RDEPENDS:libgles3-mesa-dev += "libgles2-mesa-dev"
 
-RDEPENDS:libopencl-mesa += "${@bb.utils.contains('PACKAGECONFIG', 'opencl', 'libclc spirv-tools', '', d)}"
+RDEPENDS:libopencl-mesa += "${@bb.utils.contains('PACKAGECONFIG', 'clover', 'libclc spirv-tools', '', d)}"
 
 PACKAGES =+ "libegl-mesa libegl-mesa-dev \
              libosmesa libosmesa-dev \
@@ -233,6 +233,8 @@ do_install:append () {
 # RPROVIDEs/RCONFLICTs on the generic libgl name.
 python __anonymous() {
     pkgconfig = (d.getVar('PACKAGECONFIG') or "").split()
+    if "clover" in pkgconfig:
+        pkgconfig.append("opencl")
     suffix = ""
     if "-native" in d.getVar("PN"):
         suffix = "-native"
Signature · 1 line
2.39.2
#23 lore raw

Re: [PATCH v2 2/3] mesa: Rename PACKAGECONFIG "opencl" to "clover"

meta/recipes-graphics/mesa/mesa.inc do_install:append () { · line 240

Quoted 9 lines · Zoltán Böszörményi
meta/recipes-graphics/mesa/mesa.inc +2 -0
@@ -233,6 +233,8 @@ do_install:append () {
 # RPROVIDEs/RCONFLICTs on the generic libgl name.
 python __anonymous() {
     pkgconfig = (d.getVar('PACKAGECONFIG') or "").split()
+    if "clover" in pkgconfig:
+        pkgconfig.append("opencl")
     suffix = ""
     if "-native" in d.getVar("PN"):
         suffix = "-native"

Why? This change needs to be explained in the commit message.

Alex

#24 lore raw

PATCH v2 3/3 mesa: Add PACKAGECONFIG "rusticl"

In reply to Zoltán Böszörményi
---
 meta/recipes-graphics/mesa/mesa.inc | 15 ++++++++++++---
 1 file changed, 12 insertions(+), 3 deletions(-)
meta/recipes-graphics/mesa/mesa.inc +12 -3
index 89e2dc6e90..2fbc1f971e 100644
@@ -46,6 +46,7 @@ PROVIDES = " \
     "
 
 inherit meson pkgconfig python3native gettext features_check
+inherit ${@bb.utils.contains('PACKAGECONFIG', 'rusticl', 'rust', '', d)}
 
 BBCLASSEXTEND = "native nativesdk"
 
@@ -119,6 +120,13 @@ PACKAGECONFIG[egl] = "-Degl=enabled, -Degl=disabled"
 OPENCL_NATIVE = "${@bb.utils.contains('PACKAGECONFIG', 'freedreno', '-Dopencl-native=true', '', d)}"
 PACKAGECONFIG[clover] = "-Dgallium-opencl=icd -Dopencl-spirv=true ${OPENCL_NATIVE},-Dgallium-opencl=disabled -Dopencl-spirv=false,libclc spirv-tools"
 
+# "rusticl" requires libclc and spirv-llvm-translator from meta-clang and spirv-tools from OE-Core
+PACKAGECONFIG[rusticl] = "-Dgallium-rusticl=true -Drust_std=2021,-Dgallium-rusticl=false,bindgen-cli-native libclc spirv-tools spirv-llvm-translator,libclc spirv-tools spirv-llvm-translator"
+
+# Building "rusticl" runs bindgen.
+# This setting is needed by bindgen to dlopen the correct libclang.
+export LIBCLANG_PATH = "${STAGING_LIBDIR_NATIVE}"
+
 PACKAGECONFIG[broadcom] = ""
 PACKAGECONFIG[etnaviv] = ""
 PACKAGECONFIG[freedreno] = ""
@@ -197,6 +205,7 @@ DEV_PKG_DEPENDENCY = ""
 RDEPENDS:libgles3-mesa-dev += "libgles2-mesa-dev"
 
 RDEPENDS:libopencl-mesa += "${@bb.utils.contains('PACKAGECONFIG', 'clover', 'libclc spirv-tools', '', d)}"
+RDEPENDS:libopencl-mesa += "${@bb.utils.contains('PACKAGECONFIG', 'rusticl', 'libclc spirv-tools spirv-llvm-translator', '', d)}"
 
 PACKAGES =+ "libegl-mesa libegl-mesa-dev \
              libosmesa libosmesa-dev \
@@ -233,7 +242,7 @@ do_install:append () {
 # RPROVIDEs/RCONFLICTs on the generic libgl name.
 python __anonymous() {
     pkgconfig = (d.getVar('PACKAGECONFIG') or "").split()
-    if "clover" in pkgconfig:
+    if "clover" in pkgconfig or "rusticl" in pkgconfig:
         pkgconfig.append("opencl")
     suffix = ""
     if "-native" in d.getVar("PN"):
@@ -305,7 +314,7 @@ FILES:libgles1-mesa = "${libdir}/libGLESv1*.so.*"
 FILES:libgles2-mesa = "${libdir}/libGLESv2.so.*"
 FILES:libgl-mesa = "${libdir}/libGL.so.*"
 FILES:libglx-mesa = "${libdir}/libGLX*.so.*"
-FILES:libopencl-mesa = "${libdir}/libMesaOpenCL.so.* ${libdir}/gallium-pipe/*.so ${sysconfdir}/OpenCL/vendors/mesa.icd"
+FILES:libopencl-mesa = "${libdir}/libMesaOpenCL.so.* ${libdir}/libRusticlOpenCL.so.* ${libdir}/gallium-pipe/*.so ${sysconfdir}/OpenCL/vendors/mesa.icd ${sysconfdir}/OpenCL/vendors/rusticl.icd"
 FILES:libglapi = "${libdir}/libglapi.so.*"
 FILES:libosmesa = "${libdir}/libOSMesa.so.*"
 FILES:libxatracker = "${libdir}/libxatracker.so.*"
@@ -319,7 +328,7 @@ FILES:libglapi-dev = "${libdir}/libglapi.*"
 FILES:libgles1-mesa-dev = "${libdir}/libGLESv1*.* ${includedir}/GLES ${libdir}/pkgconfig/glesv1*.pc"
 FILES:libgles2-mesa-dev = "${libdir}/libGLESv2.* ${includedir}/GLES2 ${libdir}/pkgconfig/glesv2.pc"
 FILES:libgles3-mesa-dev = "${includedir}/GLES3"
-FILES:libopencl-mesa-dev = "${libdir}/libMesaOpenCL.so"
+FILES:libopencl-mesa-dev = "${libdir}/libMesaOpenCL.so ${libdir}/libRusticlOpenCL.so"
 FILES:libosmesa-dev = "${libdir}/libOSMesa.* ${includedir}/GL/osmesa.h ${libdir}/pkgconfig/osmesa.pc"
 FILES:libxatracker-dev = "${libdir}/libxatracker.so ${libdir}/libxatracker.la \
                           ${includedir}/xa_tracker.h ${includedir}/xa_composite.h ${includedir}/xa_context.h \
Signature · 1 line
2.39.2
#25 lore raw

Re: [PATCH v2 3/3] mesa: Add PACKAGECONFIG "rusticl"

Quoted 19 lines · Zoltán Böszörményi
---
 meta/recipes-graphics/mesa/mesa.inc | 15 ++++++++++++---
 1 file changed, 12 insertions(+), 3 deletions(-)
meta/recipes-graphics/mesa/mesa.inc +1 -0
index 89e2dc6e90..2fbc1f971e 100644
@@ -46,6 +46,7 @@ PROVIDES = " \
     "
 
 inherit meson pkgconfig python3native gettext features_check
+inherit ${@bb.utils.contains('PACKAGECONFIG', 'rusticl', 'rust', '', d)}
 
 BBCLASSEXTEND = "native nativesdk"
 

meta/recipes-graphics/mesa/mesa.inc PACKAGECONFIG[egl] = "-Degl=enabled, -Degl=disabled" · line 129

Quoted 10 lines
meta/recipes-graphics/mesa/mesa.inc +7 -0
@@ -119,6 +120,13 @@ PACKAGECONFIG[egl] = "-Degl=enabled, -Degl=disabled"
 OPENCL_NATIVE = "${@bb.utils.contains('PACKAGECONFIG', 'freedreno', '-Dopencl-native=true', '', d)}"
 PACKAGECONFIG[clover] = "-Dgallium-opencl=icd -Dopencl-spirv=true ${OPENCL_NATIVE},-Dgallium-opencl=disabled -Dopencl-spirv=false,libclc spirv-tools"
 
+# "rusticl" requires libclc and spirv-llvm-translator from meta-clang and spirv-tools from OE-Core
+PACKAGECONFIG[rusticl] = "-Dgallium-rusticl=true -Drust_std=2021,-Dgallium-rusticl=false,bindgen-cli-native libclc spirv-tools spirv-llvm-translator,libclc spirv-tools spirv-llvm-translator"
+
+# Building "rusticl" runs bindgen.
+# This setting is needed by bindgen to dlopen the correct libclang.
+export LIBCLANG_PATH = "${STAGING_LIBDIR_NATIVE}"
+

Could that be part of a wrapper in the bindgen recipe?

Quoted 41 lines
meta/recipes-graphics/mesa/mesa.inc +4 -4
 PACKAGECONFIG[broadcom] = ""
 PACKAGECONFIG[etnaviv] = ""
 PACKAGECONFIG[freedreno] = ""
@@ -197,6 +205,7 @@ DEV_PKG_DEPENDENCY = ""
 RDEPENDS:libgles3-mesa-dev += "libgles2-mesa-dev"
 
 RDEPENDS:libopencl-mesa += "${@bb.utils.contains('PACKAGECONFIG', 'clover', 'libclc spirv-tools', '', d)}"
+RDEPENDS:libopencl-mesa += "${@bb.utils.contains('PACKAGECONFIG', 'rusticl', 'libclc spirv-tools spirv-llvm-translator', '', d)}"
 
 PACKAGES =+ "libegl-mesa libegl-mesa-dev \
              libosmesa libosmesa-dev \
@@ -233,7 +242,7 @@ do_install:append () {
 # RPROVIDEs/RCONFLICTs on the generic libgl name.
 python __anonymous() {
     pkgconfig = (d.getVar('PACKAGECONFIG') or "").split()
-    if "clover" in pkgconfig:
+    if "clover" in pkgconfig or "rusticl" in pkgconfig:
         pkgconfig.append("opencl")
     suffix = ""
     if "-native" in d.getVar("PN"):
@@ -305,7 +314,7 @@ FILES:libgles1-mesa = "${libdir}/libGLESv1*.so.*"
 FILES:libgles2-mesa = "${libdir}/libGLESv2.so.*"
 FILES:libgl-mesa = "${libdir}/libGL.so.*"
 FILES:libglx-mesa = "${libdir}/libGLX*.so.*"
-FILES:libopencl-mesa = "${libdir}/libMesaOpenCL.so.* ${libdir}/gallium-pipe/*.so ${sysconfdir}/OpenCL/vendors/mesa.icd"
+FILES:libopencl-mesa = "${libdir}/libMesaOpenCL.so.* ${libdir}/libRusticlOpenCL.so.* ${libdir}/gallium-pipe/*.so ${sysconfdir}/OpenCL/vendors/mesa.icd ${sysconfdir}/OpenCL/vendors/rusticl.icd"
 FILES:libglapi = "${libdir}/libglapi.so.*"
 FILES:libosmesa = "${libdir}/libOSMesa.so.*"
 FILES:libxatracker = "${libdir}/libxatracker.so.*"
@@ -319,7 +328,7 @@ FILES:libglapi-dev = "${libdir}/libglapi.*"
 FILES:libgles1-mesa-dev = "${libdir}/libGLESv1*.* ${includedir}/GLES ${libdir}/pkgconfig/glesv1*.pc"
 FILES:libgles2-mesa-dev = "${libdir}/libGLESv2.* ${includedir}/GLES2 ${libdir}/pkgconfig/glesv2.pc"
 FILES:libgles3-mesa-dev = "${includedir}/GLES3"
-FILES:libopencl-mesa-dev = "${libdir}/libMesaOpenCL.so"
+FILES:libopencl-mesa-dev = "${libdir}/libMesaOpenCL.so ${libdir}/libRusticlOpenCL.so"
 FILES:libosmesa-dev = "${libdir}/libOSMesa.* ${includedir}/GL/osmesa.h ${libdir}/pkgconfig/osmesa.pc"
 FILES:libxatracker-dev = "${libdir}/libxatracker.so ${libdir}/libxatracker.la \
                           ${includedir}/xa_tracker.h ${includedir}/xa_composite.h ${includedir}/xa_context.h \
--

2.39.2

Signature · 1 line
Alex Kiernan
#26 lore raw

Re: [PATCH v2 3/3] mesa: Add PACKAGECONFIG "rusticl"

Quoted 6 lines · Alex Kiernan

meta/recipes-graphics/mesa/mesa.inc PACKAGECONFIG[egl] = "-Degl=enabled, -Degl=disabled" · line 129

Quoted 4 lines
meta/recipes-graphics/mesa/mesa.inc +4 -0
+# Building "rusticl" runs bindgen.
+# This setting is needed by bindgen to dlopen the correct libclang.
+export LIBCLANG_PATH = "${STAGING_LIBDIR_NATIVE}"
+

Could that be part of a wrapper in the bindgen recipe?

Specifically, take a look at create_wrapper in classes-global/utils.bbclass and examples of its use in meta/

Alex

#27 lore raw

Re: [PATCH v2 3/3] mesa: Add PACKAGECONFIG "rusticl"

2023. 02. 27. 10:31 keltezéssel, Alexander Kanavin írta:

Quoted 10 lines · Alex Kiernan
Quoted 5 lines

meta/recipes-graphics/mesa/mesa.inc PACKAGECONFIG[egl] = "-Degl=enabled, -Degl=disabled" · line 129

Quoted 4 lines
meta/recipes-graphics/mesa/mesa.inc +4 -0
+# Building "rusticl" runs bindgen.
+# This setting is needed by bindgen to dlopen the correct libclang.
+export LIBCLANG_PATH = "${STAGING_LIBDIR_NATIVE}"
+

Could that be part of a wrapper in the bindgen recipe?

Specifically, take a look at create_wrapper in classes-global/utils.bbclass and examples of its use in meta/

Alex

Thanks, I will look into it.

A message that is not in the archive (sent off-list or not yet received): [email protected]

#29 lore raw

Re: [OE-core] [PATCH v2 3/3] mesa: Add PACKAGECONFIG "rusticl"

Quoted 24 lines · Alex Kiernan via lists.openembedded.org
Quoted 22 lines · Zoltán Böszörményi
---
 meta/recipes-graphics/mesa/mesa.inc | 15 ++++++++++++---
 1 file changed, 12 insertions(+), 3 deletions(-)
meta/recipes-graphics/mesa/mesa.inc +1 -0
index 89e2dc6e90..2fbc1f971e 100644
@@ -46,6 +46,7 @@ PROVIDES = " \
     "
 
 inherit meson pkgconfig python3native gettext features_check
+inherit ${@bb.utils.contains('PACKAGECONFIG', 'rusticl', 'rust', '', d)}
 
 BBCLASSEXTEND = "native nativesdk"
 
@@ -119,6 +120,13 @@ PACKAGECONFIG[egl] = "-Degl=enabled, -Degl=disabled"
 OPENCL_NATIVE = "${@bb.utils.contains('PACKAGECONFIG', 'freedreno', '-Dopencl-native=true', '', d)}"
 PACKAGECONFIG[clover] = "-Dgallium-opencl=icd -Dopencl-spirv=true ${OPENCL_NATIVE},-Dgallium-opencl=disabled -Dopencl-spirv=false,libclc spirv-tools"
 
Quoted 10 lines

meta/recipes-graphics/mesa/mesa.inc PACKAGECONFIG[egl] = "-Degl=enabled, -Degl=disabled" · line 129

Quoted 7 lines
meta/recipes-graphics/mesa/mesa.inc +7 -0
+# "rusticl" requires libclc and spirv-llvm-translator from meta-clang and spirv-tools from OE-Core
+PACKAGECONFIG[rusticl] = "-Dgallium-rusticl=true -Drust_std=2021,-Dgallium-rusticl=false,bindgen-cli-native libclc spirv-tools spirv-llvm-translator,libclc spirv-tools spirv-llvm-translator"
+
+# Building "rusticl" runs bindgen.
+# This setting is needed by bindgen to dlopen the correct libclang.
+export LIBCLANG_PATH = "${STAGING_LIBDIR_NATIVE}"
+

Could that be part of a wrapper in the bindgen recipe?

Also, with this export, I don't believe you have a dependency on anything from meta-clang (certainly you're not declaring it here AFAICS).

Quoted 54 lines
Quoted 39 lines
meta/recipes-graphics/mesa/mesa.inc +4 -4
 PACKAGECONFIG[broadcom] = ""
 PACKAGECONFIG[etnaviv] = ""
 PACKAGECONFIG[freedreno] = ""
@@ -197,6 +205,7 @@ DEV_PKG_DEPENDENCY = ""
 RDEPENDS:libgles3-mesa-dev += "libgles2-mesa-dev"
 
 RDEPENDS:libopencl-mesa += "${@bb.utils.contains('PACKAGECONFIG', 'clover', 'libclc spirv-tools', '', d)}"
+RDEPENDS:libopencl-mesa += "${@bb.utils.contains('PACKAGECONFIG', 'rusticl', 'libclc spirv-tools spirv-llvm-translator', '', d)}"
 
 PACKAGES =+ "libegl-mesa libegl-mesa-dev \
              libosmesa libosmesa-dev \
@@ -233,7 +242,7 @@ do_install:append () {
 # RPROVIDEs/RCONFLICTs on the generic libgl name.
 python __anonymous() {
     pkgconfig = (d.getVar('PACKAGECONFIG') or "").split()
-    if "clover" in pkgconfig:
+    if "clover" in pkgconfig or "rusticl" in pkgconfig:
         pkgconfig.append("opencl")
     suffix = ""
     if "-native" in d.getVar("PN"):
@@ -305,7 +314,7 @@ FILES:libgles1-mesa = "${libdir}/libGLESv1*.so.*"
 FILES:libgles2-mesa = "${libdir}/libGLESv2.so.*"
 FILES:libgl-mesa = "${libdir}/libGL.so.*"
 FILES:libglx-mesa = "${libdir}/libGLX*.so.*"
-FILES:libopencl-mesa = "${libdir}/libMesaOpenCL.so.* ${libdir}/gallium-pipe/*.so ${sysconfdir}/OpenCL/vendors/mesa.icd"
+FILES:libopencl-mesa = "${libdir}/libMesaOpenCL.so.* ${libdir}/libRusticlOpenCL.so.* ${libdir}/gallium-pipe/*.so ${sysconfdir}/OpenCL/vendors/mesa.icd ${sysconfdir}/OpenCL/vendors/rusticl.icd"
 FILES:libglapi = "${libdir}/libglapi.so.*"
 FILES:libosmesa = "${libdir}/libOSMesa.so.*"
 FILES:libxatracker = "${libdir}/libxatracker.so.*"
@@ -319,7 +328,7 @@ FILES:libglapi-dev = "${libdir}/libglapi.*"
 FILES:libgles1-mesa-dev = "${libdir}/libGLESv1*.* ${includedir}/GLES ${libdir}/pkgconfig/glesv1*.pc"
 FILES:libgles2-mesa-dev = "${libdir}/libGLESv2.* ${includedir}/GLES2 ${libdir}/pkgconfig/glesv2.pc"
 FILES:libgles3-mesa-dev = "${includedir}/GLES3"
-FILES:libopencl-mesa-dev = "${libdir}/libMesaOpenCL.so"
+FILES:libopencl-mesa-dev = "${libdir}/libMesaOpenCL.so ${libdir}/libRusticlOpenCL.so"
 FILES:libosmesa-dev = "${libdir}/libOSMesa.* ${includedir}/GL/osmesa.h ${libdir}/pkgconfig/osmesa.pc"
 FILES:libxatracker-dev = "${libdir}/libxatracker.so ${libdir}/libxatracker.la \
                           ${includedir}/xa_tracker.h ${includedir}/xa_composite.h ${includedir}/xa_context.h \
--
Quoted 2 lines

2.39.2

--
Alex Kiernan

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

Signature · 1 line
Alex Kiernan
#30 lore raw

Re: [OE-core] [PATCH v2 3/3] mesa: Add PACKAGECONFIG "rusticl"

2023. 02. 27. 10:32 keltezéssel, Alex Kiernan írta:

Quoted 34 lines
Quoted 22 lines · Alex Kiernan via lists.openembedded.org
Quoted 21 lines · Zoltán Böszörményi
---
  meta/recipes-graphics/mesa/mesa.inc | 15 ++++++++++++---
  1 file changed, 12 insertions(+), 3 deletions(-)
meta/recipes-graphics/mesa/mesa.inc +1 -0
index 89e2dc6e90..2fbc1f971e 100644
@@ -46,6 +46,7 @@ PROVIDES = " \
      "
 
  inherit meson pkgconfig python3native gettext features_check
+inherit ${@bb.utils.contains('PACKAGECONFIG', 'rusticl', 'rust', '', d)}
 
  BBCLASSEXTEND = "native nativesdk"
 
@@ -119,6 +120,13 @@ PACKAGECONFIG[egl] = "-Degl=enabled, -Degl=disabled"
  OPENCL_NATIVE = "${@bb.utils.contains('PACKAGECONFIG', 'freedreno', '-Dopencl-native=true', '', d)}"
  PACKAGECONFIG[clover] = "-Dgallium-opencl=icd -Dopencl-spirv=true ${OPENCL_NATIVE},-Dgallium-opencl=disabled -Dopencl-spirv=false,libclc spirv-tools"
 
Quoted 9 lines

meta/recipes-graphics/mesa/mesa.inc PACKAGECONFIG[egl] = "-Degl=enabled, -Degl=disabled" · line 129

Quoted 7 lines
meta/recipes-graphics/mesa/mesa.inc +7 -0
+# "rusticl" requires libclc and spirv-llvm-translator from meta-clang and spirv-tools from OE-Core
+PACKAGECONFIG[rusticl] = "-Dgallium-rusticl=true -Drust_std=2021,-Dgallium-rusticl=false,bindgen-cli-native libclc spirv-tools spirv-llvm-translator,libclc spirv-tools spirv-llvm-translator"
+
+# Building "rusticl" runs bindgen.
+# This setting is needed by bindgen to dlopen the correct libclang.
+export LIBCLANG_PATH = "${STAGING_LIBDIR_NATIVE}"
+

Could that be part of a wrapper in the bindgen recipe?

Quoted 3 lines

Also, with this export, I don't believe you have a dependency on anything from meta-clang (certainly you're not declaring it here AFAICS).

See https://gitlab.freedesktop.org/mesa/mesa/-/issues/8352
bindgen dlopens libclang which AFAIK doesn't exist in oe-core or meta-oe. Unless I am wrong, bindgen does depend on meta-clang.

Quoted 55 lines
Quoted 54 lines
Quoted 40 lines
meta/recipes-graphics/mesa/mesa.inc +4 -4
  PACKAGECONFIG[broadcom] = ""
  PACKAGECONFIG[etnaviv] = ""
  PACKAGECONFIG[freedreno] = ""
@@ -197,6 +205,7 @@ DEV_PKG_DEPENDENCY = ""
  RDEPENDS:libgles3-mesa-dev += "libgles2-mesa-dev"
 
  RDEPENDS:libopencl-mesa += "${@bb.utils.contains('PACKAGECONFIG', 'clover', 'libclc spirv-tools', '', d)}"
+RDEPENDS:libopencl-mesa += "${@bb.utils.contains('PACKAGECONFIG', 'rusticl', 'libclc spirv-tools spirv-llvm-translator', '', d)}"
 
  PACKAGES =+ "libegl-mesa libegl-mesa-dev \
               libosmesa libosmesa-dev \
@@ -233,7 +242,7 @@ do_install:append () {
  # RPROVIDEs/RCONFLICTs on the generic libgl name.
  python __anonymous() {
      pkgconfig = (d.getVar('PACKAGECONFIG') or "").split()
-    if "clover" in pkgconfig:
+    if "clover" in pkgconfig or "rusticl" in pkgconfig:
          pkgconfig.append("opencl")
      suffix = ""
      if "-native" in d.getVar("PN"):
@@ -305,7 +314,7 @@ FILES:libgles1-mesa = "${libdir}/libGLESv1*.so.*"
  FILES:libgles2-mesa = "${libdir}/libGLESv2.so.*"
  FILES:libgl-mesa = "${libdir}/libGL.so.*"
  FILES:libglx-mesa = "${libdir}/libGLX*.so.*"
-FILES:libopencl-mesa = "${libdir}/libMesaOpenCL.so.* ${libdir}/gallium-pipe/*.so ${sysconfdir}/OpenCL/vendors/mesa.icd"
+FILES:libopencl-mesa = "${libdir}/libMesaOpenCL.so.* ${libdir}/libRusticlOpenCL.so.* ${libdir}/gallium-pipe/*.so ${sysconfdir}/OpenCL/vendors/mesa.icd ${sysconfdir}/OpenCL/vendors/rusticl.icd"
  FILES:libglapi = "${libdir}/libglapi.so.*"
  FILES:libosmesa = "${libdir}/libOSMesa.so.*"
  FILES:libxatracker = "${libdir}/libxatracker.so.*"
@@ -319,7 +328,7 @@ FILES:libglapi-dev = "${libdir}/libglapi.*"
  FILES:libgles1-mesa-dev = "${libdir}/libGLESv1*.* ${includedir}/GLES ${libdir}/pkgconfig/glesv1*.pc"
  FILES:libgles2-mesa-dev = "${libdir}/libGLESv2.* ${includedir}/GLES2 ${libdir}/pkgconfig/glesv2.pc"
  FILES:libgles3-mesa-dev = "${includedir}/GLES3"
-FILES:libopencl-mesa-dev = "${libdir}/libMesaOpenCL.so"
+FILES:libopencl-mesa-dev = "${libdir}/libMesaOpenCL.so ${libdir}/libRusticlOpenCL.so"
  FILES:libosmesa-dev = "${libdir}/libOSMesa.* ${includedir}/GL/osmesa.h ${libdir}/pkgconfig/osmesa.pc"
  FILES:libxatracker-dev = "${libdir}/libxatracker.so ${libdir}/libxatracker.la \
                            ${includedir}/xa_tracker.h ${includedir}/xa_composite.h ${includedir}/xa_context.h \
--
Quoted 2 lines

2.39.2

--
Alex Kiernan

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

#31 lore raw

Re: [OE-core] [PATCH v2 3/3] mesa: Add PACKAGECONFIG "rusticl"

Quoted 36 lines · Böszörményi Zoltán

2023. 02. 27. 10:32 keltezéssel, Alex Kiernan írta:

Quoted 34 lines
Quoted 31 lines · Alex Kiernan via lists.openembedded.org
Quoted 18 lines · Zoltán Böszörményi
---
  meta/recipes-graphics/mesa/mesa.inc | 15 ++++++++++++---
  1 file changed, 12 insertions(+), 3 deletions(-)
meta/recipes-graphics/mesa/mesa.inc +1 -0
index 89e2dc6e90..2fbc1f971e 100644
@@ -46,6 +46,7 @@ PROVIDES = " \
      "
 
  inherit meson pkgconfig python3native gettext features_check
+inherit ${@bb.utils.contains('PACKAGECONFIG', 'rusticl', 'rust', '', d)}
 
  BBCLASSEXTEND = "native nativesdk"
 

meta/recipes-graphics/mesa/mesa.inc PACKAGECONFIG[egl] = "-Degl=enabled, -Degl=disabled" · line 129

Quoted 10 lines
meta/recipes-graphics/mesa/mesa.inc +7 -0
@@ -119,6 +120,13 @@ PACKAGECONFIG[egl] = "-Degl=enabled, -Degl=disabled"
  OPENCL_NATIVE = "${@bb.utils.contains('PACKAGECONFIG', 'freedreno', '-Dopencl-native=true', '', d)}"
  PACKAGECONFIG[clover] = "-Dgallium-opencl=icd -Dopencl-spirv=true ${OPENCL_NATIVE},-Dgallium-opencl=disabled -Dopencl-spirv=false,libclc spirv-tools"
 
+# "rusticl" requires libclc and spirv-llvm-translator from meta-clang and spirv-tools from OE-Core
+PACKAGECONFIG[rusticl] = "-Dgallium-rusticl=true -Drust_std=2021,-Dgallium-rusticl=false,bindgen-cli-native libclc spirv-tools spirv-llvm-translator,libclc spirv-tools spirv-llvm-translator"
+
+# Building "rusticl" runs bindgen.
+# This setting is needed by bindgen to dlopen the correct libclang.
+export LIBCLANG_PATH = "${STAGING_LIBDIR_NATIVE}"
+

Could that be part of a wrapper in the bindgen recipe?

Quoted 8 lines
Quoted 3 lines

Also, with this export, I don't believe you have a dependency on anything from meta-clang (certainly you're not declaring it here AFAICS).

See https://gitlab.freedesktop.org/mesa/mesa/-/issues/8352
bindgen dlopens libclang which AFAIK doesn't exist in oe-core or meta-oe. Unless I am wrong, bindgen does depend on meta-clang.

Reading your recipe, it looks to me like your libclang dependency is resolving from rust-native, as you've no DEPENDS to bring clang-native into your recipe's sysroot-native.

Quoted 46 lines
Quoted 46 lines
Quoted 46 lines
Quoted 40 lines
meta/recipes-graphics/mesa/mesa.inc +4 -4
  PACKAGECONFIG[broadcom] = ""
  PACKAGECONFIG[etnaviv] = ""
  PACKAGECONFIG[freedreno] = ""
@@ -197,6 +205,7 @@ DEV_PKG_DEPENDENCY = ""
  RDEPENDS:libgles3-mesa-dev += "libgles2-mesa-dev"
 
  RDEPENDS:libopencl-mesa += "${@bb.utils.contains('PACKAGECONFIG', 'clover', 'libclc spirv-tools', '', d)}"
+RDEPENDS:libopencl-mesa += "${@bb.utils.contains('PACKAGECONFIG', 'rusticl', 'libclc spirv-tools spirv-llvm-translator', '', d)}"
 
  PACKAGES =+ "libegl-mesa libegl-mesa-dev \
               libosmesa libosmesa-dev \
@@ -233,7 +242,7 @@ do_install:append () {
  # RPROVIDEs/RCONFLICTs on the generic libgl name.
  python __anonymous() {
      pkgconfig = (d.getVar('PACKAGECONFIG') or "").split()
-    if "clover" in pkgconfig:
+    if "clover" in pkgconfig or "rusticl" in pkgconfig:
          pkgconfig.append("opencl")
      suffix = ""
      if "-native" in d.getVar("PN"):
@@ -305,7 +314,7 @@ FILES:libgles1-mesa = "${libdir}/libGLESv1*.so.*"
  FILES:libgles2-mesa = "${libdir}/libGLESv2.so.*"
  FILES:libgl-mesa = "${libdir}/libGL.so.*"
  FILES:libglx-mesa = "${libdir}/libGLX*.so.*"
-FILES:libopencl-mesa = "${libdir}/libMesaOpenCL.so.* ${libdir}/gallium-pipe/*.so ${sysconfdir}/OpenCL/vendors/mesa.icd"
+FILES:libopencl-mesa = "${libdir}/libMesaOpenCL.so.* ${libdir}/libRusticlOpenCL.so.* ${libdir}/gallium-pipe/*.so ${sysconfdir}/OpenCL/vendors/mesa.icd ${sysconfdir}/OpenCL/vendors/rusticl.icd"
  FILES:libglapi = "${libdir}/libglapi.so.*"
  FILES:libosmesa = "${libdir}/libOSMesa.so.*"
  FILES:libxatracker = "${libdir}/libxatracker.so.*"
@@ -319,7 +328,7 @@ FILES:libglapi-dev = "${libdir}/libglapi.*"
  FILES:libgles1-mesa-dev = "${libdir}/libGLESv1*.* ${includedir}/GLES ${libdir}/pkgconfig/glesv1*.pc"
  FILES:libgles2-mesa-dev = "${libdir}/libGLESv2.* ${includedir}/GLES2 ${libdir}/pkgconfig/glesv2.pc"
  FILES:libgles3-mesa-dev = "${includedir}/GLES3"
-FILES:libopencl-mesa-dev = "${libdir}/libMesaOpenCL.so"
+FILES:libopencl-mesa-dev = "${libdir}/libMesaOpenCL.so ${libdir}/libRusticlOpenCL.so"
  FILES:libosmesa-dev = "${libdir}/libOSMesa.* ${includedir}/GL/osmesa.h ${libdir}/pkgconfig/osmesa.pc"
  FILES:libxatracker-dev = "${libdir}/libxatracker.so ${libdir}/libxatracker.la \
                            ${includedir}/xa_tracker.h ${includedir}/xa_composite.h ${includedir}/xa_context.h \
--
Quoted 2 lines

2.39.2

--
Alex Kiernan

Quoted 10 lines
Quoted 9 lines
Quoted 8 lines

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

--
Alex Kiernan

#32 lore raw

Re: [OE-core] [PATCH v2 3/3] mesa: Add PACKAGECONFIG "rusticl"

Quoted 3 lines · Alex Kiernan

Reading your recipe, it looks to me like your libclang dependency is resolving from rust-native, as you've no DEPENDS to bring clang-native into your recipe's sysroot-native.

That cannot be because rust-native doesn't depend on meta-clang either. It does build rust-llvm though. So maybe meta-clang is not needed after all?

Just to ensure that the recipe ends up in the right place; there's an open PR to add it to meta-clang, but I'm not sure that is the correct destination.

Alex