Bug#1012286: RFS: zig/0.9.1-1 [ITP] -- Programming language
Hi Bastian,
* Bastian Germann <bage@debian.org> [221219 06:22]:
> A quick note before I forget it: llvm-toolchain-13 is on its way out of Debian.
> Can we make this package use the unversioned (default, currently v14)
> llvm packages or v15?
The cmake setup is quite specific about needing v13 so changing it to
greater than v13 would be significant work. Instead I changed it from
v13 to v14. I was able to get it to configure, but the build failed.
make[3]: Leaving directory '/build/zig-0.9.1/obj-x86_64-linux-gnu'
[ 82%] Built target embedded_softfloat
/build/zig-0.9.1/src/zig_llvm-ar.cpp:139:1: error: 'LLVM_ATTRIBUTE_NORETURN' does not name a type; did you mean 'LLVM_ATTRIBUTE_NODEBUG'?
139 | LLVM_ATTRIBUTE_NORETURN static void badUsage(Twine Error) {
| ^~~~~~~~~~~~~~~~~~~~~~~
| LLVM_ATTRIBUTE_NODEBUG
/build/zig-0.9.1/src/zig_llvm-ar.cpp:146:1: error: 'LLVM_ATTRIBUTE_NORETURN' does not name a type; did you mean 'LLVM_ATTRIBUTE_NODEBUG'?
146 | LLVM_ATTRIBUTE_NORETURN static void fail(Twine Error) {
| ^~~~~~~~~~~~~~~~~~~~~~~
| LLVM_ATTRIBUTE_NODEBUG
I changed these LLVM_ATTRIBUTE_NORETURN to "[[ noreturn ]]" and then the
build failed soon after at:
make[3]: Leaving directory '/build/zig-0.9.1/obj-x86_64-linux-gnu'
[ 82%] Built target embedded_softfloat
/build/zig-0.9.1/src/zig_clang.cpp: In function 'void ZigClang_detect_enum_TypeClass(clang::Type::TypeClass)':
/build/zig-0.9.1/src/zig_clang.cpp:297:27: error: 'DependentExtInt' is not a member of 'clang::Type'
297 | case clang::Type::DependentExtInt:
| ^~~~~~~~~~~~~~~
/build/zig-0.9.1/src/zig_clang.cpp:318:27: error: 'ExtInt' is not a member of 'clang::Type'
318 | case clang::Type::ExtInt:
| ^~~~~~
So I think the short answer is: no, we can't use LLVM 14 or 15. I guess
it may be possible by patching the source but if that level of effort is
to be spent I think would be better spending it on getting Zig 0.10.0
(which depends on LLVM 15) to build. See
https://github.com/ziglang/zig/issues/13915
Cheers,
Nick.
Reply to: