You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The translator can be built as a regular LLVM subproject. To do that you need to clone it into the llvm/projects or llvm/tools directory.
git clone https://github.com/llvm/llvm-project.git
cd llvm-project/llvm/projects
git clone https://github.com/KhronosGroup/SPIRV-LLVM-Translator.git
Run (or re-run) cmake as usual for LLVM. After that you should have llvm-spirv and check-llvm-spirv targets available.
Running CMake as usual for LLVM, for me, means including -DLLVM_BUILD_LLVM_DYLIB=ON -DLLVM_LINK_LLVM_DYLIB=ON.
Following these instructions, and installing LLVM, results in:
harald@noble:~/llvm-project/main/install/aarch64-linux$ bin/llvm-spirv --helpbin/llvm-spirv: error while loading shared libraries: libLLVM.so.20.0git: cannot open shared object file: No such file or directory
# llvm_setup_rpath messes with the rpath making llvm-spirv not executable from the build directory
NO_INSTALL_RPATH
setting NO_INSTALL_RPATH. But in this LLVM configuration, setting the rpath is required to make things work, and if I comment out the NO_INSTALL_RPATH, things do work.
Would it be possible to only set NO_INSTALL_RPATH in those cases where it is necessary (I do not know which cases), or if that is not possible, to provide an option so that users can choose whether or not to set the rpath depending on what is best for their situation?
The text was updated successfully, but these errors were encountered:
Would it be possible to only set NO_INSTALL_RPATH in those cases where it is necessary (I do not know which cases)
Looking at PR #3, I suspect NO_INSTALL_RPATH was added for supporting out-of-tree builds. Perhaps we should make this conditional on LLVM_SPIRV_BUILD_EXTERNAL then?
Looking at PR #3, I suspect NO_INSTALL_RPATH was added for supporting out-of-tree builds. Perhaps we should make this conditional on LLVM_SPIRV_BUILD_EXTERNAL then?
That would work for me, and it sounds like a trivial change to make. I will try to get a PR up for it, thanks.
hvdijk
added a commit
to hvdijk/SPIRV-LLVM-Translator
that referenced
this issue
Dec 16, 2024
The README states:
Running CMake as usual for LLVM, for me, means including
-DLLVM_BUILD_LLVM_DYLIB=ON -DLLVM_LINK_LLVM_DYLIB=ON
.Following these instructions, and installing LLVM, results in:
This is because of
SPIRV-LLVM-Translator/tools/llvm-spirv/CMakeLists.txt
Lines 19 to 20 in c1828a9
NO_INSTALL_RPATH
. But in this LLVM configuration, setting the rpath is required to make things work, and if I comment out theNO_INSTALL_RPATH
, things do work.Would it be possible to only set
NO_INSTALL_RPATH
in those cases where it is necessary (I do not know which cases), or if that is not possible, to provide an option so that users can choose whether or not to set the rpath depending on what is best for their situation?The text was updated successfully, but these errors were encountered: