【Error】error: unable to load plugin '../afl-llvm-pass.so': '../afl-llvm-pass.so: undefined

编译afl-clang-fast时,由于ubuntu18.04上默认的clang和llvm版本是6.0,最低是3.9,编译时会遇到如下错误,解决办法是换3.8即可。ubuntu18.04默认没有3.8的,自己下源码编译或者直接用官网中ubuntu16.04版的llvm3.8 binary也可以。

http://releases.llvm.org/download.html#3.8.0

mkdir -p -m 755 ${DESTDIR}/usr/local/bin ${DESTDIR}/usr/local/lib/afl ${DESTDIR}/usr/local/share/doc/afl ${DESTDIR}/usr/local/share/afl
rm -f ${DESTDIR}/usr/local/bin/afl-plot.sh
install -m 755 afl-gcc afl-fuzz afl-showmap afl-tmin afl-gotcpu afl-analyze afl-plot afl-cmin afl-whatsup ${DESTDIR}/usr/local/bin
rm -f ${DESTDIR}/usr/local/bin/afl-as
if [ -f afl-qemu-trace ]; then install -m 755 afl-qemu-trace ${DESTDIR}/usr/local/bin; fi
if [ -f afl-clang-fast -a -f afl-llvm-pass.so -a -f afl-llvm-rt.o ]; then set -e; install -m 755 afl-clang-fast ${DESTDIR}/usr/local/bin; ln -sf afl-clang-fast ${DESTDIR}/usr/local/bin/afl-clang-fast++; install -m 755 afl-llvm-pass.so afl-llvm-rt.o ${DESTDIR}/usr/local/lib/afl; fi
if [ -f afl-llvm-rt-32.o ]; then set -e; install -m 755 afl-llvm-rt-32.o ${DESTDIR}/usr/local/lib/afl; fi
if [ -f afl-llvm-rt-64.o ]; then set -e; install -m 755 afl-llvm-rt-64.o ${DESTDIR}/usr/local/lib/afl; fi
set -e; for i in afl-g++ afl-clang afl-clang++; do ln -sf afl-gcc ${DESTDIR}/usr/local/bin/$i; done
install -m 755 afl-as ${DESTDIR}/usr/local/lib/afl
ln -sf afl-as ${DESTDIR}/usr/local/lib/afl/as
install -m 644 docs/README docs/ChangeLog docs/*.txt ${DESTDIR}/usr/local/share/doc/afl
cp -r testcases/ ${DESTDIR}/usr/local/share/afl
cp -r dictionaries/ ${DESTDIR}/usr/local/share/afl
Reading package lists... Done
Building dependency tree
Reading state information... Done
llvm-6.0 is already the newest version (1:6.0-1ubuntu2).
llvm-6.0-dev is already the newest version (1:6.0-1ubuntu2).
llvm-6.0-runtime is already the newest version (1:6.0-1ubuntu2).
clang-6.0 is already the newest version (1:6.0-1ubuntu2).
The following packages were automatically installed and are no longer required:
  golang-docker-credential-helpers llvm-runtime python-backports.ssl-match-hostname python-cached-property python-certifi python-docker python-dockerpty
  python-dockerpycreds python-docopt python-funcsigs python-functools32 python-jsonschema python-mock python-openssl python-pbr python-requests python-texttable
  python-urllib3 python-websocket python-yaml
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
[*] Checking for working 'llvm-config'...
[*] Checking for working 'clang'...
[*] Checking for '../afl-showmap'...
[+] All set and ready to build.
[*] 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.52b\"  ../test-instr.c -o test-instr
error: unable to load plugin '../afl-llvm-pass.so': '../afl-llvm-pass.so: undefined symbol:
      _ZN4llvm18PassManagerBuilder18addGlobalExtensionENS0_16ExtensionPointTyEPFvRKS0_RNS_6legacy15PassManagerBaseEE'
Makefile:97: recipe for target 'test_build' failed
make: *** [test_build] Error 1

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值