Closed jansol closed 2 months ago
however now there are several build-time errors as various tools proceed to ignore the found binary (/usr/bin/llvm-spirv-17 as I was building with llvm-config-17) and try to invoke the non-versioned one anyway.
Unfortunately, the clang is hard-coded to use non-versioned llvm-spirv
. There is a patch that could change it to pick up llvm-spirv-XX
matching the LLVM version the compiler is built against (https://github.com/llvm/llvm-project/pull/77897).
Thank you for bring this to our attention. I setup a new Ubuntu system and tried to install and run chipStar from scratch and ran into a lot of issues actually.
@jansol draft PR addressing some of these issues https://github.com/CHIP-SPV/chipStar/pull/825
Ubuntu packages LLVM in their official repos with version-suffixed binaries that are just symlinks to a LLVM version-specific location with non-suffixed binaries. They also provide a non-versioned package that simply symlinks to the version-specific location of the ~latest versioned LLVM package (which the unversioned package depends on).
However llvm-spirv is not part of the LLVM package and does not get installed in the same version-specific location:
There are several versioned packages for llvm-spirv with version-suffixed binaries, but no non-versioned package. This means that
cmake/FindLLVM.cmake
will not find any llvm-spirv automatically. That is easily fixed by addingllvm-spirv-${LLVM_VERSION_MAJOR}
to theNAMES
infind_program
, however now there are several build-time errors as various tools proceed to ignore the found binary (/usr/bin/llvm-spirv-17
as I was building withllvm-config-17
) and try to invoke the non-versioned one anyway: