-
Notifications
You must be signed in to change notification settings - Fork 269
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is the installation instruction up-to-date? #531
Comments
I found the issue as well, and digged out there's missing the clang target in the build instruction, cmake --build . --target clang After the clang is built, |
@z1gc i'm a newbie to cmake and c++, would you be willing to briefly mention the steps you took to figure out the problem/solution? i'm trying to develop my cmake troubleshooting skills. i went back and tried to guess how you figured it out but am missing a gap in my knowledge. it seems like |
Just follow the original build instruction, and add one command to build the clang target: # follow the README.md
git clone https://github.com/root-project/llvm-project.git
cd llvm-project
git checkout cling-latest
cd ..
git clone https://github.com/root-project/cling.git
mkdir cling-build && cd cling-build
cmake -DLLVM_EXTERNAL_PROJECTS=cling -DLLVM_EXTERNAL_CLING_SOURCE_DIR=../cling/ -DLLVM_ENABLE_PROJECTS="clang" -DLLVM_TARGETS_TO_BUILD="host;NVPTX" -DCMAKE_BUILD_TYPE=Release ../llvm-project/llvm
# should build the clang
cmake --build . --target clang
# then the cling
cmake --build . --target cling Hmmm, the solution is found by "guessing" however😂, yes the hint is truly the "lib/clang/16 not found", and as I thought this project is heavily based on LLVM which they forked one in https://github.com/root-project/llvm-project.git, and the LLVM itself is a monorepo contains everything includes clang, and this main cling repo doesn't contains any And the build command by the instructions show that as well, you're going to run the cmake with the LLVM's directory ( |
Thanks to @z1gc for the tip! With Visual Studio 2022, clang compiles OK but cling fails. The errors start with: |
Today I managed to build cling with Visual Studio 2022, even without specifying a separate clang build. I organized the structure as shown here. But the speed of interpreter is very slow, However, for those who still want to try, here are my commands in Visual Studio Developer Command Prompt (Visual Studio\Common7\Tools\LaunchDevCmd.bat): git clone --branch=cling-latest --depth=1 https://github.com/root-project/llvm-project.git
git clone --depth=1 https://github.com/root-project/cling.git
mkdir cling-win && cd cling-win
cmake -DLLVM_EXTERNAL_PROJECTS=cling -DLLVM_EXTERNAL_CLING_SOURCE_DIR=../cling/ -DLLVM_ENABLE_PROJECTS="clang" -DLLVM_TARGETS_TO_BUILD="host;NVPTX" -DCMAKE_BUILD_TYPE=Release ../llvm-project/llvm
cmake --build . --target cling Then copy headers of |
Describe the bug
I followed the instructions but encountered an error.
Is there anything else I need to install as a prerequisite?
I got the following error:
Expected behavior
it prints "Hello World!"
To Reproduce
Setup
1.1~dev
CentOS Stream 9
Follow the instruction
Additional context
The text was updated successfully, but these errors were encountered: