-
Notifications
You must be signed in to change notification settings - Fork 439
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
Failed to build debug version of SVF #180
Comments
I used the following command to build the debug version and it works for me.
|
Dear @nisarg-ujjainkar wpa: ~/SVF/lib/MemoryModel/PAGBuilder.cpp:900: virtual void PAGBuilder::handleExtCall(CallSite, const Function*): Assertion `fields.size() >= 4 && "_Rb_tree_node_base should have at least 4 fields.\n"' failed. Program received signal SIGABRT, Aborted. In the call stack from 5-14, it should show some function name. |
I solved this problem (although I don't know the reason. Maybe it is related to compiler issue).
Then, it starts to be compiled. I may need to use -O1 while I hope -O1 does not increase in debugging difficulty. PS. My GCC is 5.4. |
Will this pull request solve your problem? #186 |
@yuleisui Unfortunately, no.... [ 98%] Linking CXX static library libLLVMSvf.a |
Would this be a GCC bug? what about compiling SVF using clang? cmake -DCMAKE_CXX_COMPILER=your_path_to_clang/clang++ -DLLVM_DIR=$LLVM_HOME |
@yuleisui It works with clang. For your reference, I used the following options for cmake. cmake -D CMAKE_BUILD_TYPE:STRING=Debug -DCMAKE_CXX_COMPILER=/path_to_clang/clang++ -DLLVM_DIR=/path_to_llvm/llvm-9.0.0 ../ Then, with a high possibility, it could be ... GCC bug.? Note: Ubuntu 16.04 with GCC 5.4. I am also using LLVM 9.0 for Ubuntu 16.04. |
Hello
I try to compile the most recent version of SVF.
I followed the instructions in the following link
https://github.com/SVF-tools/SVF/wiki/Setup-Guide-in-Local-Physical-Machine
Only difference is I use LLVM + Clang 9.0 for Ubuntu 16.04 instead of 18.04 since my Ubuntu version is 16.04.
I tried to compile it with the "Debug" option. But, I got the following error messages.
[ 98%] Linking CXX executable ../../bin/wpa
[ 98%] Building CXX object lib/CMakeFiles/Svf.dir/WPA/AndersenWaveDiff.cpp.o
[ 98%] Linking CXX executable ../../bin/saber
../../lib/libLLVMSvf.a(SVFGBuilder.cpp.o): In function
llvm::ForwardDominanceFrontierBase<llvm::BasicBlock>::ForwardDominanceFrontierBase()': ~/llvm/llvm-9.0.0/include/llvm/Analysis/DominanceFrontier.h:122: undefined reference to
llvm::DominanceFrontierBase<llvm::BasicBlock, false>::DominanceFrontierBase()'collect2: error: ld returned 1 exit status
tools/SABER/CMakeFiles/saber.dir/build.make:117: recipe for target 'bin/saber' failed
make[2]: *** [bin/saber] Error 1
CMakeFiles/Makefile2:598: recipe for target 'tools/SABER/CMakeFiles/saber.dir/all' failed
make[1]: *** [tools/SABER/CMakeFiles/saber.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 98%] Building CXX object lib/CMakeFiles/Svf.dir/WPA/CSC.cpp.o
[ 99%] Building CXX object lib/CMakeFiles/Svf.dir/WPA/AndersenWaveDiffWithType.cpp.o
../../lib/libLLVMSvf.a(SVFGBuilder.cpp.o): In function
llvm::ForwardDominanceFrontierBase<llvm::BasicBlock>::ForwardDominanceFrontierBase()': ~/llvm/llvm-9.0.0/include/llvm/Analysis/DominanceFrontier.h:122: undefined reference to
llvm::DominanceFrontierBase<llvm::BasicBlock, false>::DominanceFrontierBase()'collect2: error: ld returned 1 exit status
tools/WPA/CMakeFiles/wpa.dir/build.make:117: recipe for target 'bin/wpa' failed
make[2]: *** [bin/wpa] Error 1
CMakeFiles/Makefile2:654: recipe for target 'tools/WPA/CMakeFiles/wpa.dir/all' failed
make[1]: *** [tools/WPA/CMakeFiles/wpa.dir/all] Error 2
On the other hand, I succeeded in compiling "Release" version.
However, I want to use "Debug" version if possible.
Could you help me?
Note: cmake version: 3.13.3 which worked with SVF 1.7 stable version.
The text was updated successfully, but these errors were encountered: