Skip to content
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

How to install cpp insights #502

Closed
Sharath8598 opened this issue Sep 1, 2022 · 6 comments
Closed

How to install cpp insights #502

Sharath8598 opened this issue Sep 1, 2022 · 6 comments

Comments

@Sharath8598
Copy link

Can i know how to install cpp insights in ubuntu. I tried with this command but ninja command through error.

@Sharath8598
Copy link
Author

I had install cevelop after installation it is throughing linked library file error.

@andreasfertig
Copy link
Owner

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: #498 (comment).

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

@Sharath8598
Copy link
Author

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,
ninja 2
ninja3

@andreasfertig
Copy link
Owner

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

@yanminhui
Copy link

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

@andreasfertig
Copy link
Owner

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants