Facing Issue in waf build
I am trying to build peach fuzzer from source on linux. While executing the waf build I am facing the below mentioned issue.
[ 43/114] | linux_x86_debug | bblocks32 | cxx | ['bblocks.cpp'] | ['bblocks.cpp.1.o'] In file included from /root/Peach/peachfuzz-code/3rdParty/pin/pin-2.13-61206-gcc.4.4.7-linux/source/include/pin/pin.H:41:0, from ../../Peach.Core.Analysis.Pin.BasicBlocks/bblocks.cpp:46: /root/Peach/peachfuzz-code/3rdParty/pin/pin-2.13-61206-gcc.4.4.7-linux/source/include/pin/compiler_version_check2.H:102:2: error: #error The C++ ABI of your compiler does not match the ABI of the pin kit. #error The C++ ABI of your compiler does not match the ABI of the pin kit. ^ /root/Peach/peachfuzz-code/3rdParty/pin/pin-2.13-61206-gcc.4.4.7-linux/source/include/pin/compiler_version_check2.H:117:2: error: #error This kit requires gcc 3.4 or later #error This kit requires gcc 3.4 or later ^ Compilation failed: 1 error(s), 0 warnings error CS8001: Warning as Error: SDK path could not be resolved Waf: Leaving directory /root/Peach/peachfuzz-code/slag/linux_x86_debug'
Build failed
`
When I check for gcc version it shows:
gcc (Ubuntu 5.4.0-6ubuntu1~16.04.11) 5.4.0 20160609
OS : Ubuntu 16.04
hello, I have the same problem, have you solved?
Hey!
It looks like the problem lies in compiling the 3rd party pin library with recent GCC compilers (In my case: Ubuntu 18.04 with gcc-7).
From stackoverflow:
I came across the same problem. GCC 5.1 introduced a new ABI that is no longer compatible with gcc-3.4+.
To solve the above error I installed GCC 4.8, which supports the old ABI, in order to run the waf script
- Install older GCC 4.8 version
sudo apt install gcc-4.8 gcc-4.8-multilib
sudo apt install g++-4.8 g++-4.8-multilib
- Setup update-alternatives
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-7 60 --slave /usr/bin/g++ g++ /usr/bin/g++-7
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.8 40 --slave /usr/bin/g++ g++ /usr/bin/g++-4.8
- Switch between different GCC versions
sudo update-alternatives --config gcc
However, now i am facing a new issue (#2).
Hey! It looks like the problem lies in compiling the 3rd party pin library with recent GCC compilers (In my case: Ubuntu 18.04 with gcc-7). From stackoverflow:
I came across the same problem. GCC 5.1 introduced a new ABI that is no longer compatible with gcc-3.4+.
To solve the above error I installed GCC 4.8, which supports the old ABI, in order to run the waf script
- Install older GCC 4.8 version
sudo apt install gcc-4.8 gcc-4.8-multilib sudo apt install g++-4.8 g++-4.8-multilib
- Setup update-alternatives
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-7 60 --slave /usr/bin/g++ g++ /usr/bin/g++-7 sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.8 40 --slave /usr/bin/g++ g++ /usr/bin/g++-4.8
- Switch between different GCC versions
sudo update-alternatives --config gccHowever, now i am facing a new issue (#2).
Hey! I solved the issue(#1) with your method, but i am facing a new issue(#3)