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

Error in ExpressionDetector.cpp when building #101

Closed
tkoenig1 opened this issue Jan 20, 2023 · 1 comment
Closed

Error in ExpressionDetector.cpp when building #101

tkoenig1 opened this issue Jan 20, 2023 · 1 comment

Comments

@tkoenig1
Copy link

I'm getting an error trying to compile cvise

tkoenig@gcc188:~/cvise-build> make
Consolidate compiler generated dependencies of target clang_delta
[  1%] Building CXX object clang_delta/CMakeFiles/clang_delta.dir/ExpressionDetector.cpp.o
/home/tkoenig/cvise/clang_delta/ExpressionDetector.cpp:65:16: error: ‘virtual void {anonymous}::IncludesPPCallbacks::InclusionDirective(clang::SourceLocation, const clang::Token&, llvm::StringRef, bool, clang::CharSourceRange, llvm::Optional<clang::FileEntryRef>, llvm::StringRef, llvm::StringRef, const clang::Module*, clang::SrcMgr::CharacteristicKind)’ marked ‘override’, but does not override
   virtual void InclusionDirective(SourceLocation HashLoc,
                ^~~~~~~~~~~~~~~~~~
make[2]: *** [clang_delta/CMakeFiles/clang_delta.dir/build.make:216: clang_delta/CMakeFiles/clang_delta.dir/ExpressionDetector.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:262: clang_delta/CMakeFiles/clang_delta.dir/all] Error 2
make: *** [Makefile:146: all] Error 2

CMakeCache.txt

Simply removing the offending override with

--- a/clang_delta/ExpressionDetector.cpp
+++ b/clang_delta/ExpressionDetector.cpp
@@ -75,7 +75,7 @@ public:
 #endif
                           StringRef SearchPath, StringRef RelativePath,
                           const Module *Imported,
-                          SrcMgr::CharacteristicKind FileType) override;
+                          SrcMgr::CharacteristicKind FileType);
 
 private:
   SourceManager &SrcManager;

gets me to

home/tkoenig/cvise/clang_delta/TransformationManager.cpp: In member function ‘bool TransformationManager::initializeCompilerInstance(std::__cxx11::string&)’:
/home/tkoenig/cvise/clang_delta/TransformationManager.cpp:177:18: error: ‘setLangDefaults’ is not a member of ‘clang::LangOptions’
     LangOptions::setLangDefaults(ClangInstance->getLangOpts(), Language::C, T, includes);
                  ^~~~~~~~~~~~~~~
/home/tkoenig/cvise/clang_delta/TransformationManager.cpp:183:18: error: ‘setLangDefaults’ is not a member of ‘clang::LangOptions’
     LangOptions::setLangDefaults(ClangInstance->getLangOpts(), Language::CXX, T, includes, LSTD);
                  ^~~~~~~~~~~~~~~
/home/tkoenig/cvise/clang_delta/TransformationManager.cpp:217:18: error: ‘setLangDefaults’ is not a member of ‘clang::LangOptions’
     LangOptions::setLangDefaults(ClangInstance->getLangOpts(),

where I don't know how to proceed.

If you want to look at my setup, it's on gcc188, in /home/tkoenig , there's nothing secret there.

@marxin
Copy link
Owner

marxin commented Jan 20, 2023

Please use a newer GCC compiler (I know GCC 11 works fine with LLVM 9), GCC 7 is probably too old.

@marxin marxin closed this as completed Jan 20, 2023
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

2 participants