From 97d1a037085abdc516190b234c77df6f47b9f8e9 Mon Sep 17 00:00:00 2001 From: Paul Menzel Date: Mon, 7 Sep 2026 23:21:39 +0200 Subject: [PATCH 1/4] spirv-tools: Order the libraries in SPIRV-Tools.pc for static linking CMakeLists.txt:380 hardcodes the pkg-config libraries as Libs: -L${libdir} -lSPIRV-Tools-opt -lSPIRV-Tools -lSPIRV-Tools-link which is upside down. libSPIRV-Tools-link needs symbols from libSPIRV-Tools-opt and from the core library, as its NEEDED entries show in the shared build: $ objdump -p /usr/lib/libSPIRV-Tools-link.so | grep NEEDED NEEDED libSPIRV-Tools-opt.so NEEDED libSPIRV-Tools.so For shared libraries the order is irrelevant, but ld searches an archive only at the place where it is named, so a static build leaves every symbol that -link alone pulls in undefined. Name the archives the other way round. Assisted-by: Claude Opus 5 --- spirv-tools.be0 | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/spirv-tools.be0 b/spirv-tools.be0 index 1a6c26b7e..b7fbc4425 100755 --- a/spirv-tools.be0 +++ b/spirv-tools.be0 @@ -35,6 +35,12 @@ mee_configure() { # bee_install #} -#mee_install_post() { -# exit -#} +mee_install_post() { + # SPIRV-Tools.pc hardcodes the libraries as + # -lSPIRV-Tools-opt -lSPIRV-Tools -lSPIRV-Tools-link + # which is upside down for archives: libSPIRV-Tools-link.a needs symbols + # from libSPIRV-Tools-opt.a and libSPIRV-Tools.a, but is named after both, + # and ld searches an archive only where it is specified. + start_cmd sed -ri 's/^Libs: .*/Libs: -L${libdir} -lSPIRV-Tools-link -lSPIRV-Tools-opt -lSPIRV-Tools/' \ + ${D}${LIBDIR}/pkgconfig/SPIRV-Tools.pc +} From 0437200203c7da516845b01041ed15b682a694a0 Mon Sep 17 00:00:00 2001 From: Paul Menzel Date: Mon, 7 Sep 2026 23:21:54 +0200 Subject: [PATCH 2/4] spirv-tools: Link the C++ interface statically SPIRV-Tools sets SOVERSION on none of its libraries, and with BUILD_SHARED_LIBS=ON the plain libSPIRV-Tools.so target is the full-visibility one, which exports the whole C++ interface that upstream explicitly gives no stability guarantee for (CMakeLists.txt:163): $ objdump -p /usr/lib/libSPIRV-Tools.so | grep SONAME SONAME libSPIRV-Tools.so $ grep -rn SOVERSION SPIRV-Tools-vulkan-sdk-1.4.350.1/ $ Every update therefore rebinds the consumers to a different C++ ABI, and without a soname nothing gates it: the mismatch surfaces as an undefined symbol at load time, or silently not at all. Build the C++ libraries static instead and leave only libSPIRV-Tools-shared.so, the C API with hidden visibility, shared. That is upstream's default and intended configuration (SPIRV_TOOLS_BUILD_STATIC defaults to ON, BUILD_SHARED_LIBS to OFF), and it removes the mismatch by removing the object that can mismatch. The cost is small: code and rodata of the three libraries the consumers use come to 3.6 MB together, the rest of the 183 MB libSPIRV-Tools-opt.so is debug info. CMake does not imply position independent code for static targets, so ask for it explicitly: both consumers link the archives into shared objects. Assisted-by: Claude Opus 5 --- spirv-tools.be0 | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/spirv-tools.be0 b/spirv-tools.be0 index b7fbc4425..51ce45245 100755 --- a/spirv-tools.be0 +++ b/spirv-tools.be0 @@ -1,6 +1,6 @@ #!/usr/bin/env beesh -# BEE_VERSION spirv-tools-1.4.357.0-0 +# BEE_VERSION spirv-tools-1.4.357.0-1 #SRCURL[0]="https://github.com/KhronosGroup/SPIRV-Tools/archive/vulkan-sdk-${PKGVERSION}/SPIRV-Tools-${PKGVERSION}.tar.gz" SRCURL[0]="https://beehive.molgen.mpg.de/c357eec1e33bc95e650aa4c8efdd3b13/SPIRV-Tools-1.4.357.0.tar.gz" @@ -19,11 +19,21 @@ SRCURL[0]="https://beehive.molgen.mpg.de/c357eec1e33bc95e650aa4c8efdd3b13/SPIRV- # bee_patch "${@}" #} +# SPIRV-Tools versions none of its libraries, and libSPIRV-Tools.so is the +# full-visibility target that exports the C++ interface upstream explicitly +# gives no stability guarantee for. Shared, that makes every version bump +# rebind its consumers to a different C++ ABI without a soname to catch it, +# so build the C++ libraries static -- upstream's default and intended +# configuration -- and leave only libSPIRV-Tools-shared.so, the C API, shared. +# +# Consumers of the C++ libraries need a new revision along with every update +# here: glslang and mesalib. mee_configure() { bee_configure \ -D SPIRV_WERROR=OFF \ - -D BUILD_SHARED_LIBS=ON \ - -D SPIRV_TOOLS_BUILD_STATIC=OFF \ + -D BUILD_SHARED_LIBS=OFF \ + -D SPIRV_TOOLS_BUILD_STATIC=ON \ + -D CMAKE_POSITION_INDEPENDENT_CODE=ON \ -D SPIRV-Headers_SOURCE_DIR=${PREFIX} } From 2f4e10931bd542fb68b6f68d11f968720c1ad6e6 Mon Sep 17 00:00:00 2001 From: Paul Menzel Date: Mon, 7 Sep 2026 23:22:06 +0200 Subject: [PATCH 3/4] glslang: Rebuild to link SPIRV-Tools statically glslang is built with ALLOW_EXTERNAL_SPIRV_TOOLS=ON and binds the unversioned C++ libraries of spirv-tools: $ objdump -p /usr/lib/libglslang.so | grep NEEDED NEEDED libSPIRV-Tools-opt.so NEEDED libSPIRV-Tools.so spirv-tools 1.4.357.0-1 ships those as archives, so pick up the new revision. The libraries are found through the CMake config packages, which carry the dependencies between them, so no configure change is needed here. Increment revision to 1. Assisted-by: Claude Opus 5 --- glslang.be0 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/glslang.be0 b/glslang.be0 index c52e973da..1ce93ac75 100755 --- a/glslang.be0 +++ b/glslang.be0 @@ -1,6 +1,6 @@ #!/usr/bin/env beesh -# BEE_VERSION glslang-16.5.0-0 +# BEE_VERSION glslang-16.5.0-1 #SRCURL[0]="https://github.com/KhronosGroup/glslang/archive/${PKGVERSION}/glslang-${PKGVERSION}.tar.gz" SRCURL[0]="https://beehive.molgen.mpg.de/79e949d6d50cc167e7d5307afb04c41a/glslang-16.5.0.tar.gz" From 75adf77860229388f462cd097c20149c606b6297 Mon Sep 17 00:00:00 2001 From: Paul Menzel Date: Mon, 7 Sep 2026 23:27:07 +0200 Subject: [PATCH 4/4] mesalib: Update version from 26.2.1 to 26.2.2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Mesa 26.2.2 is a bug fix release on the 26.2 branch, released on 2026-09-02. Among the fixes are Navi 10 NGG culling GPU hangs, radeonsi no longer loading for GCN1 / Pitcairn with the radeon driver, RADV ignoring an indirect draw count of zero and the armhf build failure. Building the package is also going to fix the issue below: $ eglinfo EGL client extensions string: EGL_EXT_client_extensions, EGL_EXT_device_base, EGL_EXT_explicit_device, EGL_EXT_platform_base, EGL_EXT_platform_device, EGL_EXT_platform_wayland, EGL_EXT_platform_x11, EGL_EXT_platform_xcb, EGL_KHR_client_get_all_proc_addresses, EGL_KHR_debug, EGL_KHR_platform_gbm, EGL_KHR_platform_wayland, EGL_KHR_platform_x11, EGL_MESA_platform_gbm, EGL_MESA_platform_surfaceless MESA-LOADER: failed to open dri: libSPIRV-Tools.so: cannot open shared object file: No such file or directory (search paths /usr/lib/gbm, suffix _gbm) GBM platform: eglinfo: eglInitialize failed Wayland platform: eglinfo: eglInitialize failed `libSPIRV-Tools.so` has no SOVERSION, and it exports the unstable C++ API. Upstream’s guidance is to link the C++ interface statically and keep `SPIRV-Tools-shared.so` for the C API. As it stands, any spirv-tools bump silently rebinds Mesa to a different C++ ABI with no version gate — exactly the class of breakage that happened, when the package *spirv-tools* was not correctly upgraded. Nine objects of the package bind the unversioned C++ libraries of spirv-tools, the Vulkan drivers and the VA-API drivers the core library, rusticl additionally the optimizer and the linker: $ objdump -p /usr/lib/libRusticlOpenCL.so.1 | grep NEEDED NEEDED libSPIRV-Tools-opt.so NEEDED libSPIRV-Tools.so NEEDED libSPIRV-Tools-link.so Mesa needs the C++ interface – `src/compiler/clc/meson.build:86` probes for spvtools::LinkerOptions::SetAllowPtrTypeMismatch – and cannot be pointed at libSPIRV-Tools-shared.so, which exports the C API only. With spirv-tools 1.4.357.0-1 it links the archives that dependency('SPIRV-Tools') now resolves to. Assisted-by: Claude Opus 5 --- mesalib.be0 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mesalib.be0 b/mesalib.be0 index a35242d84..47f562876 100755 --- a/mesalib.be0 +++ b/mesalib.be0 @@ -1,6 +1,6 @@ #!/usr/bin/env beesh -# BEE_VERSION mesalib-26.2.1-0 +# BEE_VERSION mesalib-26.2.2-0 ## this file was created by bee init and should be executed to build a ## bee-package. (Additional hints are located at the end of this file.) @@ -10,7 +10,7 @@ ## downloaded. Version variables may be used to simplify reuse of this bee-file. #SRCURL[0]="https://archive.mesa3d.org/mesa-${PKGVERSION}.tar.xz" -SRCURL[0]="https://beehive.molgen.mpg.de/0afe395a93eeb0307c7f906fc31e3ef6/mesa-26.2.1.tar.xz" +SRCURL[0]="https://beehive.molgen.mpg.de/4f9e0c96c913cdd9e8998453e248714e/mesa-26.2.2.tar.xz" ############################################################################### ## Add URLs/pathes to patch files to the PATCHURL array.