반응형
Fucking
ch4rli3kop@ubuntu: /home/ch4rli3kop/AFL/llvm_mode git:(master)
➜ make
[*] Checking for working 'llvm-config'...
[-] Oops, can't find 'llvm-config'. Install clang or set $LLVM_CONFIG or $PATH beforehand.
(Sometimes, the binary will be named llvm-config-3.5 or something like that.)
make: *** [Makefile:69: test_deps] Error 1
Solution
[+추가] llvm의 버전은 나의 경우 10으로 진행했다. /usr/bin 경로를 확인하거나 설치된 llvm 버전을 확인해서 뒤 숫자를 수정하면 된다. llvm-config-${Version you can check in /usr/bin}
Case1
ch4rli3kop@ubuntu: /home/ch4rli3kop/AFL/llvm_mode git:(master)
➜ which llvm-config-10
/usr/bin/llvm-config-10
ch4rli3kop@ubuntu: /home/ch4rli3kop/AFL/llvm_mode git:(master)
➜ export $LLVM_CONFIG=/usr/bin/llvm-config-10
Case2
ch4rli3kop@ubuntu: /home/ch4rli3kop/AFL/llvm_mode git:(master)
➜ ls /usr/bin/llvm-config-10 -al
lrwxrwxrwx 1 root root 30 Apr 19 2020 /usr/bin/llvm-config-10 -> ../lib/llvm-10/bin/llvm-config
ch4rli3kop@ubuntu: /home/ch4rli3kop/AFL/llvm_mode git:(master)
➜ export PATH=/usr/lib/llvm-10/bin:$PATH
둘 중 하나의 방식으로 하면 됨.
Result
빌드 잘됨 ㅅㅅ
ch4rli3kop@ubuntu: /home/ch4rli3kop/AFL/llvm_mode git:(master)
➜ make
[*] Checking for working 'llvm-config'...
[*] Checking for working 'clang'...
[*] Checking for '../afl-showmap'...
[+] All set and ready to build.
clang -O3 -funroll-loops -Wall -D_FORTIFY_SOURCE=2 -g -Wno-pointer-sign -DAFL_PATH=\"/usr/local/lib/afl\" -DBIN_PATH=\"/usr/local/bin\" -DVERSION=\"2.57b\" afl-clang-fast.c -o ../afl-clang-fast
ln -sf afl-clang-fast ../afl-clang-fast++
clang++ `llvm-config --cxxflags` -Wl,-znodelete -fno-rtti -fpic -O3 -funroll-loops -Wall -D_FORTIFY_SOURCE=2 -g -Wno-pointer-sign -DVERSION=\"2.57b\" -Wno-variadic-macros -shared afl-llvm-pass.so.cc -o ../afl-llvm-pass.so `llvm-config --ldflags`
clang -O3 -funroll-loops -Wall -D_FORTIFY_SOURCE=2 -g -Wno-pointer-sign -DAFL_PATH=\"/usr/local/lib/afl\" -DBIN_PATH=\"/usr/local/bin\" -DVERSION=\"2.57b\" -fPIC -c afl-llvm-rt.o.c -o ../afl-llvm-rt.o
[*] Building 32-bit variant of the runtime (-m32)... success!
[*] Building 64-bit variant of the runtime (-m64)... success!
[*] Testing the CC wrapper and instrumentation output...
unset AFL_USE_ASAN AFL_USE_MSAN AFL_INST_RATIO; AFL_QUIET=1 AFL_PATH=. AFL_CC=clang ../afl-clang-fast -O3 -funroll-loops -Wall -D_FORTIFY_SOURCE=2 -g -Wno-pointer-sign -DAFL_PATH=\"/usr/local/lib/afl\" -DBIN_PATH=\"/usr/local/bin\" -DVERSION=\"2.57b\" ../test-instr.c -o test-instr
../afl-showmap -m none -q -o .test-instr0 ./test-instr < /dev/null
echo 1 | ../afl-showmap -m none -q -o .test-instr1 ./test-instr
[+] All right, the instrumentation seems to be working!
[+] All done! You can now use '../afl-clang-fast' to compile programs.
반응형
'Information* > Troubleshoot' 카테고리의 다른 글
wslregisterdistribution failed with error: 0x80370102 (0) | 2021.10.05 |
---|---|
WinAFL build error (0) | 2021.09.30 |
frida Failed to spawn (0) | 2020.09.13 |
OSS Fuzzer Error (0) | 2020.07.19 |
git pull error (0) | 2020.06.17 |