Package Details: lib32-spirv-tools 2023.2-1

Git Clone URL: (read-only, click to copy)
Package Base: lib32-spirv-tools
Description: API and commands for processing SPIR-V modules
Upstream URL:
Licenses: Apache
Conflicts: lib32-spirv-tools
Provides: lib32-spirv-tools
Submitter: sl1pkn07
Maintainer: Alberto_OS
Last Packager: Alberto_OS
Votes: 8
Popularity: 0.23
First Submitted: 2018-10-02 13:37 (UTC)
Last Updated: 2023-03-31 18:34 (UTC)

Latest Comments

1 2 Next › Last »

melvyn2 commented on 2022-04-24 17:31 (UTC)

Updated version, and changed to better match upstream PKGBUILD

diff --git a/PKGBUILD b/PKGBUILD
index 4fd35fc..95537de 100644
@@ -5,54 +5,52 @@

 pkgdesc="API and commands for processing SPIR-V modules"
-arch=('i686' 'x86_64' 'armv6h' 'armv7h' 'aarch64')
+             'ninja'
+             'spirv-headers'
-        "git+${_headers_version}"
-            'SKIP'

 build() {
+  cd SPIRV-Tools
   export CC="gcc -m32"
   export CXX="g++ -m32"
   export PKG_CONFIG_PATH="/usr/lib32/pkgconfig"

-  mkdir -p build
-  cd build
-  cmake ../SPIRV-Tools \
+  cmake \
+      -Bbuild \
+      -GNinja \
-      -DSPIRV-Headers_SOURCE_DIR="${srcdir}/SPIRV-Headers"
-  make
+      -DCMAKE_BUILD_TYPE=Release \
+      -DSPIRV_WERROR=Off \
+      -DSPIRV-Headers_SOURCE_DIR="/usr"
+  ninja -C build

 package() {
-  make -C build DESTDIR="${pkgdir}" install
+  cd SPIRV-Tools
+  DESTDIR="${pkgdir}" ninja -C build install

   # remove files
   rm -fr "${pkgdir}/usr/include"
   rm -fr "${pkgdir}/usr/share"

-  install -Dm644 SPIRV-Tools/LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+  install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"

   cd "${pkgdir}/usr/bin"
   for i in $(find . -type f); do mv ${i} ${i}-32; done

Alberto_OS commented on 2022-01-30 19:45 (UTC)

Sure Mars, you're welcome! =) I've returned the source repos to use .git in the URL. Thank you for your observations about it.

MarsSeed commented on 2022-01-30 19:00 (UTC) (edited on 2022-01-30 19:02 (UTC) by MarsSeed)

Thanks for update, your work is appreciated! :)

I've made one mistaken recommendation though.

I suggested to eliminate the '.git' suffix from GitHub repo URLs.

I've since came to learn that using the '.git' suffix is still preferred. That is the canonical form (de-facto standard) for all Git hosters. (Even GitHub uses it on its website when you click on Clone.)

GitHub's behavior in accepting commandline URLs without the '.git' suffix and not redirecting to a suffixed one is unusual, AFAIK undocumented, and actually can lead to problems with makepkg source caching.

(If makepkg is set up to use a common source cache, it will not know that an already existing local repo cloned from GitHub with the '.git' suffix is the same repo as the one without it, and will error out in such cases).

So I'd like to ask you to change the source URLs back to using '.git':


Some other AUR packages use SPIRV sources from GitHub, and they also use the preferred ".git" ending. Sticking to that will ensure that makepkg can smartly manage the common source cache and use the same local clone for different PKGBUILDs.

Alberto_OS commented on 2021-08-06 14:52 (UTC)

I had missed the previous comments, just tried oxalin's patch with fixed SPIRV-Headers revision and it works for both versions 2021.1 and 2021.2, so package is updated and currently building with no errors.

Liquorice commented on 2021-08-06 05:48 (UTC)

This Package is still broken, could you try oxalin's patch please?

oxalin commented on 2021-07-04 18:08 (UTC) (edited on 2021-07-04 18:33 (UTC) by oxalin)

To be able to build against 2021.1, could you apply the following patch to PKGBUILD? I think this should also fix build againt 2021.2.

From e4ec3521431ea38a299fa2995cbf566cf7a1fc34 Mon Sep 17 00:00:00 2001
From: Alexandre Demers <>
Date: Sun, 4 Jul 2021 14:05:12 -0400
Subject: [PATCH] Fix 2021.1 build with the right SPIRV-Headers revision

Specify release type at the same time.

Signed-off-by: Alexandre Demers <>
 PKGBUILD | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/PKGBUILD b/PKGBUILD
index 656b4f2..a408c5e 100644
@@ -28,6 +28,9 @@ prepare() {
   mkdir -p build

   alias widl=
+  cd "${srcdir}/SPIRV-Headers"
+  git reset --hard cf00fad5b4374c1ee10b46659d2766797769a658

 build() {
@@ -40,7 +43,7 @@ build() {
   cmake ../SPIRV-Tools \
-      -DCMAKE_BUILD_TYPE=None \


oxalin commented on 2021-07-04 16:59 (UTC)

Nothing to do with GCC, the problem comes from SPIRV-Headers which doesn't contain either enum.

SPIRV-Tools' code ( points to However, searching through latest SPIRV-Headers' code, neither 'SPV_OPERAND_TYPE_QUANTIZATION_MODES' nor 'SPV_OPERAND_TYPE_OVERFLOW_MODES' can be found.

This is not the first time that someone f***ed SPIRV dependencies. I'm reporting the issue upstream.

andrfgs commented on 2021-07-04 05:14 (UTC) (edited on 2021-07-04 05:15 (UTC) by andrfgs)

Package is broken as @CraigRat says. If I remember, GCC has "recently" received an update (well not recently but I only got the update on arch recently). Might it be the new version of GCC? I am using GCC 11.1 and I had yesterday another bug as well because of this new version with Google Test.

CraigRat commented on 2021-06-14 03:12 (UTC) (edited on 2021-06-14 03:15 (UTC) by CraigRat)

Hello, I'm getting this with 2021.1:

/home/<redacted>/lib32-spirv-tools/src/build/ error: ‘SPV_OPERAND_TYPE_QUANTIZATION_MODES’ was not declared in this scope; did you mean ‘SPV_OPERAND_TYPE_FPOPERATION_MODE’?
1271 |   {SPV_OPERAND_TYPE_QUANTIZATION_MODES, ARRAY_SIZE(pygen_variable_QuantizationModesEntries), pygen_variable_QuantizationModesEntries},
      |    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/<redacted>/lib32-spirv-tools/src/build/ error: ‘SPV_OPERAND_TYPE_OVERFLOW_MODES’ was not declared in this scope; did you mean ‘SPV_OPERAND_TYPE_MEMORY_MODEL’?
1273 |   {SPV_OPERAND_TYPE_OVERFLOW_MODES, ARRAY_SIZE(pygen_variable_OverflowModesEntries), pygen_variable_OverflowModesEntries},
      |    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
make[2]: *** [source/CMakeFiles/SPIRV-Tools-shared.dir/build.make:263: source/CMakeFiles/SPIRV-Tools-shared.dir/operand.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:679: source/CMakeFiles/SPIRV-Tools-shared.dir/all] Error 2
make: *** [Makefile:146: all] Error 2