AFLplusplus / AFLplusplus

The fuzzer afl++ is afl with community patches, qemu 5.1 upgrade, collision-free coverage, enhanced laf-intel & redqueen, AFLfast++ power schedules, MOpt mutators, unicorn_mode, and a lot more!

Home Page:https://aflplus.plus

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Setting `AFL_PATH` seems required on macOS, but not mentioned in INSTALL.md

seanm opened this issue · comments

Describe the bug
After building & installing on macOS, it seems that setting AFL_PATH is required, but this is not documented in INSTALL.md.

To Reproduce
Steps to reproduce the behavior:

  1. on macOS, build afl++ from dev branch, per INSTALL.md instructions
  2. run cd ~
  3. run afl-cc --version

Expected behavior
For it to report its version.

Screen output/Screenshots
It gives this error:

% afl-cc --version

[-] PROGRAM ABORT : Unable to find 'afl-compiler-rt.o'. Please set the AFL_PATH environment variable.
         Location : find_built_deps(), src/afl-cc.c:577

If I add to my ~/.zprofile file export AFL_PATH=/Users/afl/AFLplusplus then it apparently finds afl-compiler-rt.o because it then outputs:

% afl-cc --version
afl-cc++4.10c by Michal Zalewski, Laszlo Szekeres, Marc Heuse - mode: LLVM-PCGUARD
Homebrew clang version 17.0.6
Target: x86_64-apple-darwin20.6.0
Thread model: posix
InstalledDir: /usr/local/Cellar/llvm/17.0.6_1/bin

Is all this expected? It seems either:

  1. INSTALL.md is missing this information and should be updated
  2. There's a bug
  3. I built it wrong somehow.

Thanks.

the INSTALL.md says to do sudo gmake install at the end. this installs the files at the necessary locations so afl can find them. you apparently did not, and then, yes, you have to set AFL_PATH. but that is not the good solution, installing is the right move.

Fixed with document changes: #2001