svf-tools / svf-example Goto Github PK
View Code? Open in Web Editor NEWAn external project example using SVF as a library
An external project example using SVF as a library
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?
Hello everyone, I'm new to SVF. I attempted to utilize SVF as an external library in CLion on macOS Monterey
, but encountered a cmake
failure along with the following log:
It appears that the SVF library is currently available for x86_64 architecture but not for arm64. Would it be possible to provide an arm64
version for macOS? Your assistance would be greatly appreciated! Thank you very much!
====================[ 构建 | svf-ex | Release-Clang-14 ]==========================
/Applications/CLion.app/Contents/bin/cmake/mac/bin/cmake --build /Users/xxx/Repositories/git_repos/SVF-example/cmake-build-release-clang-14 --target svf-ex -- -j 6
[ 50%] Linking CXX executable ../bin/svf-ex
ld: warning: ignoring file /Users/xxx/node_modules/svf-lib/SVF-osx/Release-build/svf-llvm/libSvfLLVM.a, building for macOS-arm64 but attempting to link with file built for macOS-x86_64
Undefined symbols for architecture arm64:
"SVF::LLVMModuleSet::getSVFValue(llvm::Value const*)", referenced from:
aliasQuery(SVF::PointerAnalysis*, llvm::Value*, llvm::Value*) in svf-ex.cpp.o
"SVF::LLVMModuleSet::llvmModuleSet", referenced from:
aliasQuery(SVF::PointerAnalysis*, llvm::Value*, llvm::Value*) in svf-ex.cpp.o
"SVF::LLVMModuleSet::LLVMModuleSet()", referenced from:
aliasQuery(SVF::PointerAnalysis*, llvm::Value*, llvm::Value*) in svf-ex.cpp.o
ld: symbol(s) not found for architecture arm64
clang-14: error: linker command failed with exit code 1 (use -v to see invocation)
make[3]: *** [bin/svf-ex] Error 1
make[2]: *** [src/CMakeFiles/svf-ex.dir/all] Error 2
make[1]: *** [src/CMakeFiles/svf-ex.dir/rule] Error 2
make: *** [svf-ex] Error 2
Hi,
I tried to use traverseOnVFG to collect all LLVM values with regard to one specific VFG node.
I kept getting this error "svf-ex: /home/travis/build/SVF-tools/SVF/lib/Graphs/VFG.cpp:868: const SVF::PAGNode* SVF::VFG::getLHSTopLevPtr(const SVF::VFGNode*) const: Assertion `false && "unexpected node kind!"' failed.", I am wondering whether you could provide any hint on it.
Thanks
#56
is this value should be "lib"? On my Ubuntu 20.04 only modifying this make a successful build. or it will not find libz3.a which should be in ${z3_prefix}/lib
I have followed the instructions in the tutorial to configure and build the project. However, when executing ./bin/svf-ex example.ll, I encountered the error message "not an external IR file: /home/runner/work/SVF/SVF/Release-build/svf-llvm/extapi.bc Aborted (core dumped)". The problem is that I don't have a runner user on my local machine, and that path doesn't even exist. So I want to know how can I do something to resolve it, thk.
➜ SVF-example git:(master) ✗ make
[ 50%] Building CXX object src/CMakeFiles/svf-ex.dir/svf-ex.cpp.o
make[2]: *** No rule to make target '/usr/lib/x86_64-linux-gnu/libtinfo.so', needed by 'bin/svf-ex'. Stop.
make[1]: *** [CMakeFiles/Makefile2:178: src/CMakeFiles/svf-ex.dir/all] Error 2
make: *** [Makefile:84: all] Error 2
Without libncurses5-dev, executing the steps described in README would cause a cmake failure:
CMake Error at src/CMakeLists.txt:1 (add_executable):
Target "svf-example" links to target "Terminfo::terminfo" but the target
was not found. Perhaps a find_package() call is missing for an IMPORTED
target, or an ALIAS target is missing?
However, libncurses5-dev is only required in the setup guide of SVF.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.