#1145340 spirv-llvm-translator-22: FTBFS: error: line 67: NonSemantic.Shader.DebugInfo.200 DebugTypeBasic: expected operand Flags must be a result id of 32-bit unsigned OpConstant

Package:
src:spirv-llvm-translator-22
Source:
src:spirv-llvm-translator-22
Submitter:
Santiago Vila
Date:
2026-10-22 14:59:03 UTC
Severity:
normal
Tags:
#1145340#5
Date:
2026-08-24 09:50:03 UTC
From:
To:
Dear maintainer:

During a rebuild of all packages in unstable, this package failed to build.

Below you will find the last part of the build log (probably the most
relevant part, but not necessarily). If required, the full build log
is available here:

https://people.debian.org/~sanvila/build-logs/202608/

About the archive rebuild: The build was made on virtual machines from AWS,
using sbuild and a reduced chroot with only build-essential packages.

If you cannot reproduce the bug please contact me privately, as I
am willing to provide ssh access to a virtual machine where the bug is
fully reproducible.

If this is really a bug in one of the build-depends, please use
reassign and add an affects on src:spirv-llvm-translator-22, so that this is still
visible in the BTS web page for this package.

Thanks.
--------------------------------------------------------------------------------
[...]
[100%] Running the LLVM-SPIRV regression tests
cd /<<PKGBUILDDIR>>/build/test && /usr/lib/llvm-22/bin/lit --verbose -sv /<<PKGBUILDDIR>>/build/test
lit: /usr/lib/llvm-22/utils/lit/lit/llvm/config.py:561: note: using clang: /usr/lib/llvm-22/bin/clang
-- Testing: 990 tests, 2 workers --
Testing: 0  2  4  6
FAIL: LLVM_SPIRV :: DebugInfo/NonSemantic/Shader200/DebugLineOnlyOnce.ll (99 of 990)
******************** TEST 'LLVM_SPIRV :: DebugInfo/NonSemantic/Shader200/DebugLineOnlyOnce.ll' FAILED ********************
Exit Code: 1

Command Output (stderr):
--
/usr/lib/llvm-22/bin/llvm-as /<<PKGBUILDDIR>>/test/DebugInfo/NonSemantic/Shader200/DebugLineOnlyOnce.ll -o /<<PKGBUILDDIR>>/build/test/test_output/DebugInfo/NonSemantic/Shader200/Output/DebugLineOnlyOnce.ll.tmp.bc # RUN: at line 3
+ /usr/lib/llvm-22/bin/llvm-as /<<PKGBUILDDIR>>/test/DebugInfo/NonSemantic/Shader200/DebugLineOnlyOnce.ll -o /<<PKGBUILDDIR>>/build/test/test_output/DebugInfo/NonSemantic/Shader200/Output/DebugLineOnlyOnce.ll.tmp.bc
/<<PKGBUILDDIR>>/build/tools/llvm-spirv/llvm-spirv /<<PKGBUILDDIR>>/build/test/test_output/DebugInfo/NonSemantic/Shader200/Output/DebugLineOnlyOnce.ll.tmp.bc -o /<<PKGBUILDDIR>>/build/test/test_output/DebugInfo/NonSemantic/Shader200/Output/DebugLineOnlyOnce.ll.tmp.spv --spirv-debug-info-version=nonsemantic-shader-200 # RUN: at line 4
+ /<<PKGBUILDDIR>>/build/tools/llvm-spirv/llvm-spirv /<<PKGBUILDDIR>>/build/test/test_output/DebugInfo/NonSemantic/Shader200/Output/DebugLineOnlyOnce.ll.tmp.bc -o /<<PKGBUILDDIR>>/build/test/test_output/DebugInfo/NonSemantic/Shader200/Output/DebugLineOnlyOnce.ll.tmp.spv --spirv-debug-info-version=nonsemantic-shader-200
/usr/bin/spirv-val /<<PKGBUILDDIR>>/build/test/test_output/DebugInfo/NonSemantic/Shader200/Output/DebugLineOnlyOnce.ll.tmp.spv # RUN: at line 5
+ /usr/bin/spirv-val /<<PKGBUILDDIR>>/build/test/test_output/DebugInfo/NonSemantic/Shader200/Output/DebugLineOnlyOnce.ll.tmp.spv
error: line 67: NonSemantic.Shader.DebugInfo.200 DebugTypeBasic: expected operand Flags must be a result id of 32-bit unsigned OpConstant
  %43 = OpExtInst %void %2 DebugTypeBasic %40 %uint_64 %uint_4 %16

#1145340#10
Date:
2026-10-22 11:37:56 UTC
From:
To:
Control: tag -1 upstream, fixed-upstream, patch
22.1.7. It's very likely I didn't do it as expected by this package, but
I made it work. That resulted in 1 less failing test:

LLVM_SPIRV :: llvm-intrinsics/constrained-arithmetic.ll

But I noticed that upstream had various backported commits in their
llvm_release_220 branch *after* the 22.1.7 tag, so I grabbed that and added
that to ``debian/patches``. One of them was a(n officially) backported patch
of upstream PR 3568, so I updated/replaced ``3568.patch`` with that one.

When I build that, the build succeeded \o/.
Lintian did report an error wrt symbols:
  E: libllvmspirvlib22.1: symbols-file-contains-current-version-with-debian-revision on symbol \
  _ZN4llvm16getSpecConstInfoERSiRKN5SPIRV14TranslatorOptsERSt6vectorINS_15SpecConstInfoTyESaIS6_EE@Base \
  and 13 others (libLLVMSPIRVLib.so.22.1) [symbols]

I'll attach all the patches I've used; I'm sure one of the maintainers
can build a proper package from that ;-)

Cheers,
  Diederik

#1145340#19
Date:
2026-10-22 14:56:00 UTC
From:
To: