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 happens when compiling SVF-example #48

Open
for-just-we opened this issue Mar 24, 2022 · 2 comments
Open

Error happens when compiling SVF-example #48

for-just-we opened this issue Mar 24, 2022 · 2 comments

Comments

@for-just-we
Copy link

when I compile SVF-example in CLion, an error occured, The error message is

/home/xxx/xxx/xxx/SVF-2.2/Release-build/lib/libSvf.a(LLVMModule.cpp.o):在函数‘SVF::LLVMModuleSet::loadModules(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&)’中:
LLVMModule.cpp:(.text+0xfbe):对‘llvm::parseIRFile(llvm::StringRef, llvm::SMDiagnostic&, llvm::LLVMContext&, llvm::function_ref<llvm::Optional<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > (llvm::StringRef)>)’未定义的引用

LLVM version I use is 12.0.0
SVF version I use is SVF-2.2
z3 version I use is 4.8.8

How could I fix this?

@guanqin-123
Copy link
Contributor

Please use llvm 13 and try again.

@for-just-we
Copy link
Author

It actually did not work, is it because I build SVF-2.2 on top of llvm 12.0.0?

Some part of error message is

/home/xxx/xxx/xxx/SVF-2.2/include/Graphs/GraphPrinter.h:63:74: error: no member named 'F_None' in namespace 'llvm::sys::fs'
        llvm::ToolOutputFile F(Filename.c_str(), ErrInfo, llvm::sys::fs::F_None);
                                                          ~~~~~~~~~~~~~~~^
/home/xxx/xxx/xxx/SVF-2.2/include/Graphs/GraphPrinter.h:89:23: error: no template named 'GraphTraits' in namespace 'llvm'
        typedef llvm::GraphTraits<GraphType> GTraits;
                ~~~~~~^
/home/xxx/xxx/xxx/SVF-2.2/include/Graphs/GraphPrinter.h:91:26: error: 'GTraits' (aka 'int') is not a class, namespace, or enumeration
        typedef typename GTraits::NodeRef NodeRef;

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