Issue while compiling the code #1260
-
|
Hello Everyone, I cloned the repository and followed the developer environment setup steps outlined in the README to build Clad. The build was successful, but when I tried to compile my code, I encountered an error: "unable to load plugin clang: undefined symbol." I've attempted various troubleshooting methods, but nothing has worked so far. I'm using Ubuntu 24.04.2, Clang and LLVM version 18.1.8, and CMake version 3.28.3. Any guidance or suggestions would be greatly appreciated. Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 10 replies
-
|
Can you paste the symbol error and the path to the clang compiler? The compiler binary should be the one you built clad against. |
Beta Was this translation helpful? Give feedback.
-
|
same error |
Beta Was this translation helpful? Give feedback.
Hello @vgvassilev Sir,
Thank you very much! I successfully compiled the source code using Clad and Clang. However, I wasn't able to build Clad following the steps in the README (developer environment). The command mkdir build && cd build cmake -DLLVM_ENABLE_PROJECTS="clang" -DLLVM_EXTERNAL_PROJECTS=clad -DLLVM_EXTERNAL_CLAD_SOURCE_DIR=../../clad -DCMAKE_BUILD_TYPE="Debug" -DLLVM_TARGETS_TO_BUILD=host -DLLVM_INSTALL_UTILS=ON ../llvm would build Clad, but not Clang.
Later, using the Clad documentation, I built Clang and LLVM separately with the Ninja and Gold linker configuration provided in the Clad docs: cmake -G Ninja /path/to/llvm-project/llvm -DLLVM_USE_LINKER=gold -DCMAKE_BUILD_TYPE=D…