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:
- on macOS, build afl++ from
dev
branch, per INSTALL.md instructions - run
cd ~
- 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:
- INSTALL.md is missing this information and should be updated
- There's a bug
- 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