cppinsights
cppinsights copied to clipboard
How to install cpp insights
Can i know how to install cpp insights in ubuntu. I tried with this command but ninja command through error.
I had install cevelop after installation it is throughing linked library file error.
Hello @Sharath8598,
sorry that compiling C++ Insights causes you trouble.
I would appreciate it if you kept this in one issue instead of opening multiple issues with practically the same content. Your approach makes it hard for me to keep track of whether you managed to get a step further. Please close the issues related to this one, and let's keep the conversation to one single issue. Thank you!
As I said, I'm lost at which problem you are looking for due to the multiple issues with slightly different statements. It might also be a good point to point out that I'm developing C++ Insights. Both CMake and ninja are built tools that I don't develop. Reading error messages from these tools without context is, for me, as hard as for you.
There is also an issue that might be what you're looking for: https://github.com/andreasfertig/cppinsights/issues/498#issuecomment-1214946541.
If this does not help you, please provide more information like:
- do you have g++/clang++ installed?
- do you have LLVM installed in the dev version?
- do you have ninja installed?
- what are the exact steps you did before reaching an error?
Andreas
g++ (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0 . I have LLVM-10 ninja is also installed
I had run these commads: git clone https://github.com/andreasfertig/cppinsights.git
mkdir build && cd build
cmake -G"Ninja" ../cppinsights
ninja
But after running the ninja command it througth multiple erros,
Hello @Sharath8598,
the minimum LLVM and Clang version required for C++ Insights is 14. It appears that the CMake file is missing a proper check for that. Anyway, the compilers are checked but outdated. Thanks for finding this!
Your g++ version is probably too old as well. The CI uses g++-11.
Andreas
Hi, @andreasfertig
insights can't be built on llvm@15.
clang version 15.0.0 (https://github.com/llvm/llvm-project.git 80b4a25d7a215d42552b7ad0e2e05fbcc17e07b6)
Target: arm64-apple-darwin21.6.0
Thread model: posix
InstalledDir: /opt/llvm/bin
Consolidate compiler generated dependencies of target insights
[ 7%] Building CXX object CMakeFiles/insights.dir/CodeGenerator.cpp.o
/Users/admin/repos/cppinsights/CodeGenerator.cpp:320:9: error: too few arguments to function call, expected 5, have 4; did you mean 'NestedNameSpecifier::Create'?
CompoundStmt::Create(ctx, innerScopeStmtsRef, rangeForStmt->getBeginLoc(), rangeForStmt->getEndLoc());
^~~~~~~~~~~~
NestedNameSpecifier::Create
Hello @yanminhui,
correct. LLVM 15 isn't released at this point. They're shortly before the release. I did not spend time looking into what has changed. However, feel free to open a dedicate issue about the missing LLVM 15 support.
Andreas