Skip to contentSkip to conversation

spirv-llvm-translator: small recipe cleanup

PATCH Superseded Ross Burton 3 participants 5 messages Sep 5, 2025 – Sep 8, 2025

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/3 spirv-llvm-translator: small recipe cleanup

- There is no need for python3native, as this recipe doesn't depend on other python modules.

- Inherit lib_package so the llvm-spirv binary is in a separate package to the libLLVMSPIRVLib.so library.

- Remove obsolete CMake options that no longer appear to be required.

---
 .../spir/spirv-llvm-translator_20.1.4.bb               | 10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)
meta/recipes-graphics/spir/spirv-llvm-translator_20.1.4.bb +1 -9
index 64a73ce55aa..3a090b7b5cb 100644
@@ -15,18 +15,10 @@ UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>\d+(\.\d+)+)"
 
 DEPENDS = "llvm spirv-tools spirv-headers"
 
-inherit cmake pkgconfig python3native
+inherit cmake pkgconfig lib_package
 
-# Specify any options you want to pass to cmake using EXTRA_OECMAKE:
-# for CMAKE_SHARED_LIBS=OFF see https://github.com/KhronosGroup/SPIRV-LLVM-Translator/issues/1868
 EXTRA_OECMAKE = "\
     -DBUILD_SHARED_LIBS=ON \
-    -DCMAKE_BUILD_TYPE=Release \
-    -DCMAKE_POSITION_INDEPENDENT_CODE=ON \
-    -DCMAKE_SKIP_RPATH=ON \
-    -DLLVM_EXTERNAL_LIT=lit \
-    -DLLVM_INCLUDE_TESTS=ON \
-    -Wno-dev \
     -DLLVM_EXTERNAL_SPIRV_HEADERS_SOURCE_DIR=${STAGING_INCDIR}/.. \
 "
 
Signature · 1 line
2.43.0
#1 lore raw

PATCH 2/3 spirv-tools: improve packaging

spirv-tools is a set of libraries and some binaries that link to those libraries, so inherit lib_package so that the binaries and the libraries are packaged separately.

The lesspipe script hasn't needed bash since 2018[1], so remove the bash dependency and package the script with the other binaries.

The build type unless specified is Debug, explicitly set RelWithDebInfo.

[1] spirv-tools f70e9e "tools/lesspipe: Allow generic shell (#2255)"

---
 meta/recipes-graphics/spir/spirv-tools_1.4.321.0.bb | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)
meta/recipes-graphics/spir/spirv-tools_1.4.321.0.bb +2 -5
index 30c42e915f9..c3e0d17d87a 100644
@@ -19,11 +19,12 @@ PE = "1"
 # upstream considers a release.
 UPSTREAM_CHECK_GITTAGREGEX = "sdk-(?P<pver>\d+(\.\d+)+)"
 
-inherit cmake
+inherit cmake lib_package
 
 DEPENDS = "spirv-headers"
 
 EXTRA_OECMAKE += "\
+    -DCMAKE_BUILD_TYPE=RelWithDebInfo \
     -DSPIRV-Headers_SOURCE_DIR=${STAGING_EXECPREFIXDIR} \
     -DSPIRV_TOOLS_BUILD_STATIC=OFF \
     -DBUILD_SHARED_LIBS=ON \
@@ -46,8 +47,4 @@ do_install:append:class-target() {
 SOLIBS = ".so"
 FILES_SOLIBSDEV = ""
 
-PACKAGES =+ "${PN}-lesspipe"
-FILES:${PN}-lesspipe = "${base_bindir}/spirv-lesspipe.sh"
-RDEPENDS:${PN}-lesspipe += "${PN} bash"
-
 BBCLASSEXTEND = "native nativesdk"
Signature · 1 line
2.43.0
#2 lore raw

PATCH 3/3 mesa: clean up libopencl-mesa dependencies

In reply to Ross Burton

The libraries in spirv-tools and spirv-llvm-translator are linked to libopencl, so the correct dependencies are generated automatically.

---
 meta/recipes-graphics/mesa/mesa.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-graphics/mesa/mesa.inc +1 -1
index a848a2ad8c7..6b040e9f839 100644
@@ -244,7 +244,7 @@ DEV_PKG_DEPENDENCY = ""
 RPROVIDES:libgles2-mesa += "libgles3-mesa"
 RPROVIDES:libgles2-mesa-dev += "libgles3-mesa-dev"
 
-RDEPENDS:libopencl-mesa += "${@bb.utils.contains('PACKAGECONFIG', 'opencl', 'libclc spirv-tools spirv-llvm-translator', '', d)}"
+RDEPENDS:libopencl-mesa += "${@bb.utils.contains('PACKAGECONFIG', 'opencl', 'libclc', '', d)}"
 
 PACKAGES =+ "libegl-mesa libegl-mesa-dev \
              libgallium \
Signature · 1 line
2.43.0
#3 lore raw
In reply to Ross Burton

what is the effect of

- -DCMAKE_POSITION_INDEPENDENT_CODE=ON \
- -DCMAKE_SKIP_RPATH=ON \

Quoted 50 lines · Ross Burton via lists.openembedded.org

- There is no need for python3native, as this recipe doesn't depend on other python modules.

- Inherit lib_package so the llvm-spirv binary is in a separate package to the libLLVMSPIRVLib.so library.

- Remove obsolete CMake options that no longer appear to be required.

---
 .../spir/spirv-llvm-translator_20.1.4.bb               | 10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)
meta/recipes-graphics/spir/spirv-llvm-translator_20.1.4.bb +1 -10
index 64a73ce55aa..3a090b7b5cb 100644
@@ -15,18 +15,10 @@ UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>\d+(\.\d+)+)"
 
 DEPENDS = "llvm spirv-tools spirv-headers"
 
-inherit cmake pkgconfig python3native
+inherit cmake pkgconfig lib_package
 
-# Specify any options you want to pass to cmake using EXTRA_OECMAKE:
-# for CMAKE_SHARED_LIBS=OFF see https://github.com/KhronosGroup/SPIRV-LLVM-Translator/issues/1868
 EXTRA_OECMAKE = "\
     -DBUILD_SHARED_LIBS=ON \
-    -DCMAKE_BUILD_TYPE=Release \
-    -DCMAKE_POSITION_INDEPENDENT_CODE=ON \
-    -DCMAKE_SKIP_RPATH=ON \
-    -DLLVM_EXTERNAL_LIT=lit \
-    -DLLVM_INCLUDE_TESTS=ON \
-    -Wno-dev \
     -DLLVM_EXTERNAL_SPIRV_HEADERS_SOURCE_DIR=${STAGING_INCDIR}/.. \
 "
 
--

2.43.0

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

#4 lore raw
In reply to Ross Burton
Quoted 10 lines · Ross Burton via lists.openembedded.org

- There is no need for python3native, as this recipe doesn't depend on other python modules.

- Inherit lib_package so the llvm-spirv binary is in a separate package to the libLLVMSPIRVLib.so library.

- Remove obsolete CMake options that no longer appear to be required.

---

Hi Ross,

It looks like we have some reproducibility issues:

AssertionError: The following deb packages are different and not in exclusion list:
/srv/pokybuild/yocto-worker/reproducible/build/build-st/reproducibleB-extended/tmp/deploy/deb/./x86-64-v3/libllvmspirvlib-dbg_20.1.4-r0_amd64.deb /srv/pokybuild/yocto-worker/reproducible/build/build-st/reproducibleB-extended/tmp/deploy/deb/./x86-64-v3/libllvmspirvlib20.1_20.1.4-r0_amd64.deb The following ipk packages are different and not in exclusion list:
/srv/pokybuild/yocto-worker/reproducible/build/build-st/reproducibleB-extended/tmp/deploy/ipk/./x86-64-v3/libllvmspirvlib-dbg_20.1.4-r0_x86-64-v3.ipk /srv/pokybuild/yocto-worker/reproducible/build/build-st/reproducibleB-extended/tmp/deploy/ipk/./x86-64-v3/libllvmspirvlib20.1_20.1.4-r0_x86-64-v3.ipk The following rpm packages are different and not in exclusion list:
/srv/pokybuild/yocto-worker/reproducible/build/build-st/reproducibleB-extended/tmp/deploy/rpm/./x86_64_v3/libllvmspirvlib-dbg-20.1.4-r0.x86_64_v3.rpm /srv/pokybuild/yocto-worker/reproducible/build/build-st/reproducibleB-extended/tmp/deploy/rpm/./x86_64_v3/libllvmspirvlib20.1-20.1.4-r0.x86_64_v3.rpm

https://autobuilder.yoctoproject.org/valkyrie/#/builders/37/builds/2442
https://valkyrie.yocto.io/pub/repro-fail/oe-reproducible-20250908-q5zzw7wr/packages/

Can you have a look?

Thanks,
Mathieu

Signature · 3 lines
Mathieu Dubois-Briand, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com