Skip to contentSkip to conversation

spirv-llvm-translator: small recipe cleanup

PATCH In review Ross Burton 3 participants 8 messages Aug 20, 2025 – Aug 21, 2025

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 319b25b7f43..5242473e6bc 100644
@@ -18,11 +18,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 \
@@ -45,8 +46,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
Quoted 20 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 +0 -0
index 64a73ce55aa..3a090b7b5cb 100644
@@ -15,18 +15,10 @@ UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>\d+(\.\d+)+)"
 

meta/recipes-graphics/spir/spirv-llvm-translator_20.1.4.bb UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>\d+(\.\d+)+)" · line 24

Quoted 10 lines
meta/recipes-graphics/spir/spirv-llvm-translator_20.1.4.bb +1 -4
 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 \

Is Release already the default ? Usually this option reduces the debug info size, which may not matter
for this but would be good to know.

Other changes look fine.

Quoted 20 lines
meta/recipes-graphics/spir/spirv-llvm-translator_20.1.4.bb +0 -6
-    -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 (#222179): https://lists.openembedded.org/g/openembedded-core/message/222179
Mute This Topic: https://lists.openembedded.org/mt/114799103/1997914
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

#4 lore raw
Quoted 28 lines · Khem Raj
Quoted 25 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 +0 -0
index 64a73ce55aa..3a090b7b5cb 100644
@@ -15,18 +15,10 @@ UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>\d+(\.\d+)+)"
 

DEPENDS = "llvm spirv-tools spirv-headers"

meta/recipes-graphics/spir/spirv-llvm-translator_20.1.4.bb +1 -1
-inherit cmake pkgconfig python3native
+inherit cmake pkgconfig lib_package
Quoted 9 lines
Quoted 5 lines
meta/recipes-graphics/spir/spirv-llvm-translator_20.1.4.bb +0 -2
-# 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 \

Is Release already the default ? Usually this option reduces the debug info size, which may not matter
for this but would be good to know.

The upstream cmakelists don’t set it either way, and changing this doesn’t change the output.

(I also need to finish off the branch which makes our class pass RelWithDebInfo by default)

Ross

#5 lore raw
Quoted 38 lines · Ross Burton
Quoted 10 lines · Khem Raj
Quoted 7 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.

Quoted 8 lines

Review

Quoted 8 lines

- 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(-)
(quoted diff) +0 -0

b/meta/recipes-graphics/spir/spirv-llvm-translator_20.1.4.bb

Quoted 4 lines

meta/recipes-graphics/spir/spirv-llvm-translator_20.1.4.bb UPSTREAM_CHECK_GITTAGREGEX =

Quoted 4 lines

index 64a73ce55aa..3a090b7b5cb 100644

meta/recipes-graphics/spir/spirv-llvm-translator_20.1.4.bb +0 -0
@@ -15,18 +15,10 @@ UPSTREAM_CHECK_GITTAGREGEX =

"v(?P<pver>\d+(\.\d+)+)"

Quoted 8 lines

meta/recipes-graphics/spir/spirv-llvm-translator_20.1.4.bb UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>\d+(\.\d+)+)"

Quoted 8 lines

DEPENDS = "llvm spirv-tools spirv-headers"

meta/recipes-graphics/spir/spirv-llvm-translator_20.1.4.bb +1 -3
-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

Quoted 4 lines
Quoted 3 lines
EXTRA_OECMAKE = "\
    -DBUILD_SHARED_LIBS=ON \

- -DCMAKE_BUILD_TYPE=Release \

Quoted 7 lines
Quoted 3 lines

Is Release already the default ? Usually this option reduces the debug info size, which may not matter
for this but would be good to know.

The upstream cmakelists don’t set it either way, and changing this doesn’t change the output.

Ok

Quoted 4 lines

(I also need to finish off the branch which makes our class pass RelWithDebInfo by default)

Ross

#6 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 a reproducibility issue:

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

http://valkyrie.yocto.io/pub/repro-fail/oe-reproducible-20250821-1clwvk91/packages/diff-html/
https://autobuilder.yoctoproject.org/valkyrie/#/builders/37/builds/2325

Best regards,
Mathieu

Signature · 3 lines
Mathieu Dubois-Briand, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#7 lore raw
Quoted 30 lines · Mathieu Dubois-Briand via lists.openembedded.org
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 a reproducibility issue:

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:

Quoted 8 lines

/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

http://valkyrie.yocto.io/pub/repro-fail/oe-reproducible-20250821-1clwvk91/packages/diff-html/
https://autobuilder.yoctoproject.org/valkyrie/#/builders/37/builds/2325

I think we still need RPATH_SKIP option

Quoted 21 lines

Best regards,
Mathieu

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

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