Version
HEAD
What behaviour are you expecting?
Hello,
Just FYI anyone else would hit that. If I notice what's wrong there, will let you know.
There seems to be some issue with parallel installs of llvm from llvm ppa.
Was looking into spirv-ll and was building that part and was trying build only spirv-ll and spirv-ll-tool by ninja backend.
What actual behaviour are you seeing?
I have minor change to avoid liblld so might be cause, but unlikely, installed version 20 that wasn't detected, and since it is not dependency of this targets disabled compiler-utils-riscv target.
cmake correctly picked up one of versions I've had installed in parallel (19.1.7)
oneAPI Construction Kit using LLVM 19.1.7
Code was compiled against 19.1.7 headers.
[61/64] /usr/bin/c++ -DCA_RUNTIME_COMPILER_ENABLED -D__CA_BUILTINS_DOUBLE_SUPPORT -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS -I/home/piotr.rak/data/oneapi-construction-kit/modules/compiler/spirv-ll/include -I/home/piotr.rak/data/oneapi-construction-kit/modules/compiler/spirv-ll/source -I/home/piotr.rak/data/oneapi-construction-kit/modules/cargo/include -I/home/piotr.rak/data/oneapi-construction-kit/modules/compiler/multi_llvm/include -I/home/piotr.rak/data/oneapi-construction-kit/modules/compiler/compiler_pipeline/include -isystem /usr/lib/llvm-19/include -isystem /home/piotr.rak/data/oneapi-construction-kit/build/_deps/spirv-headers-src/include -O3 -DNDEBUG -DNDEBUG -std=c++17 -fcolor-diagnostics -Wno-error=deprecated-declarations -Wno-error=array-bounds -Wno-error=uninitialized -pedantic -Wall -Wextra -Wcast-qual -Wformat -Wno-unused-parameter -fPIC -ffunction-sections -fdata-sections -fno-rtti -fno-exceptions -Wno-return-type-c-linkage -Wthread-safety -Werror -MD -MT modules/compiler/spirv-ll/CMakeFiles/spirv-ll.dir/source/builder_core.cpp.o -MF modules/compiler/spirv-ll/CMakeFiles/spirv-ll.dir/source/builder_core.cpp.o.d -o modules/compiler/spirv-ll/CMakeFiles/spirv-ll.dir/source/builder_core.cpp.o -c /home/piotr.rak/data/oneapi-construction-kit/modules/compiler/spirv-ll/source/builder_core.cpp
While linker was trying to link to llvm-18-dev:
/usr/bin/c++ -O3 -DNDEBUG -DNDEBUG -Wl,-znoexecstack -Wl,-ztext -Wl,-znoexecstack -Wl,-ztext modules/compiler/spirv-ll/tools/CMakeFiles/spirv-ll-tool.dir/spirv-ll.cpp.o -o bin/spirv-ll-tool -Wl,-rpath,":\$ORIGIN/../lib" lib/libspirv-ll.a lib/libcargo.a lib/libcompiler-pipeline.a /usr/lib/llvm-18/lib/libLLVMPasses.a /usr/lib/llvm-18/lib/libLLVMCFGuard.a /usr/lib/llvm-18/lib/libLLVMCodeGen.a /usr/lib/llvm-18/lib/libLLVMCodeGenTypes.a /usr/lib/llvm-18/lib/libLLVMCoroutines.a /usr/lib/llvm-18/lib/libLLVMHipStdPar.a /usr/lib/llvm-18/lib/libLLVMipo.a /usr/lib/llvm-18/lib/libLLVMFrontendOpenMP.a /usr/lib/llvm-18/lib/libLLVMFrontendOffloading.a /usr/lib/llvm-18/lib/libLLVMLinker.a /usr/lib/llvm-18/lib/libLLVMIRPrinter.a /usr/lib/llvm-18/lib/libLLVMObjCARCOpts.a /usr/lib/llvm-18/lib/libLLVMScalarOpts.a /usr/lib/llvm-18/lib/libLLVMAggressiveInstCombine.a /usr/lib/llvm-18/lib/libLLVMInstCombine.a /usr/lib/llvm-18/lib/libLLVMTarget.a /usr/lib/llvm-18/lib/libLLVMVectorize.a /usr/lib/llvm-18/lib/libLLVMInstrumentation.a /usr/lib/llvm-18/lib/libLLVMTransformUtils.a /usr/lib/llvm-18/lib/libLLVMBitWriter.a /usr/lib/llvm-18/lib/libLLVMAnalysis.a /usr/lib/llvm-18/lib/libLLVMProfileData.a /usr/lib/llvm-18/lib/libLLVMSymbolize.a /usr/lib/llvm-18/lib/libLLVMDebugInfoPDB.a /usr/lib/llvm-18/lib/libLLVMDebugInfoMSF.a /usr/lib/llvm-18/lib/libLLVMDebugInfoBTF.a /usr/lib/llvm-18/lib/libLLVMDebugInfoDWARF.a /usr/lib/llvm-18/lib/libLLVMObject.a /usr/lib/llvm-18/lib/libLLVMIRReader.a /usr/lib/llvm-18/lib/libLLVMBitReader.a /usr/lib/llvm-18/lib/libLLVMAsmParser.a /usr/lib/llvm-18/lib/libLLVMCore.a /usr/lib/llvm-18/lib/libLLVMRemarks.a /usr/lib/llvm-18/lib/libLLVMBitstreamReader.a /usr/lib/llvm-18/lib/libLLVMMCParser.a /usr/lib/llvm-18/lib/libLLVMMC.a /usr/lib/llvm-18/lib/libLLVMDebugInfoCodeView.a /usr/lib/llvm-18/lib/libLLVMTextAPI.a /usr/lib/llvm-18/lib/libLLVMBinaryFormat.a /usr/lib/llvm-18/lib/libLLVMTargetParser.a /usr/lib/llvm-18/lib/libLLVMSupport.a /usr/lib/llvm-18/lib/libLLVMDemangle.a -lrt -ldl -lm /usr/lib/x86_64-linux-gnu/libz.so /usr/lib/x86_64-linux-gnu/libzstd.so /usr/lib/x86_64-linux-gnu/libtinfo.so && :
/usr/bin/ld: lib/libspirv-ll.a(builder.cpp.o): in function `spirv_ll::Builder::replaceBuiltinGlobals()':
builder.cpp:(.text._ZN8spirv_ll7Builder21replaceBuiltinGlobalsEv+0x453): undefined reference to `llvm::BranchInst::BranchInst(llvm::BasicBlock*, llvm::InsertPosition)'
...
...
Uninstalling llvm-18-* packages helped as quick workaround.
What steps are required to reproduce the bug?
install llvm-18 and llvm-19 from llvm ppa.
cmake -GNinja -B build -S.; ninja -C build spirv-ll; spirv-ll-tool
Please note I had such diff on the tree since I didn't have lld-18 lld-19 only 20 21 and 22 and was strugling with noticing why it was not picked up.
So maybe my fault but really unlikely.
diff --git a/modules/compiler/riscv/CMakeLists.txt b/modules/compiler/riscv/CMakeLists.txt
index 707caee8b..b7c6252e0 100644
--- a/modules/compiler/riscv/CMakeLists.txt
+++ b/modules/compiler/riscv/CMakeLists.txt
@@ -19,6 +19,8 @@
find_library(LLVMRISCVCODEGEN LLVMRISCVCodeGen PATHS
"${LLVM_INSTALL_PREFIX}/lib" NO_DEFAULT_PATH)
+return()
+
if (LLVMRISCVCODEGEN)
if(CA_RUNTIME_COMPILER_ENABLED)
set(RISCV_SOURCES
Minimal test case
No response
Anything else we should know?
No response
Version
HEAD
What behaviour are you expecting?
Hello,
Just FYI anyone else would hit that. If I notice what's wrong there, will let you know.
There seems to be some issue with parallel installs of llvm from llvm ppa.
Was looking into
spirv-lland was building that part and was trying build onlyspirv-llandspirv-ll-toolby ninja backend.What actual behaviour are you seeing?
I have minor change to avoid
liblldso might be cause, but unlikely, installed version 20 that wasn't detected, and since it is not dependency of this targets disabledcompiler-utils-riscvtarget.cmake correctly picked up one of versions I've had installed in parallel (19.1.7)
oneAPI Construction Kit using LLVM 19.1.7Code was compiled against 19.1.7 headers.
While linker was trying to link to llvm-18-dev:
Uninstalling
llvm-18-*packages helped as quick workaround.What steps are required to reproduce the bug?
install llvm-18 and llvm-19 from llvm ppa.
cmake -GNinja -B build -S.; ninja -C build spirv-ll; spirv-ll-toolPlease note I had such diff on the tree since I didn't have lld-18 lld-19 only 20 21 and 22 and was strugling with noticing why it was not picked up.
So maybe my fault but really unlikely.
Minimal test case
No response
Anything else we should know?
No response