LibAFL
LibAFL copied to clipboard
`libafl_libfuzzer_runtime` does not compile with Apple's clang on macOS
Describe the bug
I'm using the stock Clang on macOS (likely the cause of this issue).
Compiling libafl_libfuzzer_runtime on macOS fails in the final rust-lld step with:
Finished `release` profile [optimized + debuginfo] target(s) in 0.16s
rust-lld: error: target/release/libafl_libfuzzer_runtime.a(afl_libfuzzer_runtime-f4e5a11aa5da33a2.afl_libfuzzer_runtime.e93c846f93848154-cgu.0.rcgu.o): not an ELF file
To Reproduce Steps to reproduce the behavior:
- cd LibAFL/libafl_libfuzzer/libafl_libfuzzer_runtime
- ./build.sh
Expected behavior The build should succeed with Apple's clang.
Additional context I'm investigating further if it works with e.g. Nix Clang. I think LibAFL is not supporting Apple's Clang so we might just close this and the issue would serve as documentation for further users :)
same issue for now with Clang 14 from Nix. I don't use homebrew so ideally someone could try to reproduce in their environment.
Same error for me on homebrew clang... @sameer did the MacOS integration IIRC
Took a quick look, build.sh is still Linux-only unfortunately. But it should be possible to mirror what I did in #1711 into this script to make it work for macOS.
@jasikpark is fixing this. Please do not release 0.13 until we fix this.
There are new problems on macOS as well -- namely, libafl_main and LLVMFuzzerCustom{Mutator,Crossover} do not appear. @maxammann, are you aware of how to fix this issue? It does not seem to resolve it as expected (these symbols do not even appear in the produced .a files...).
There are new problems on macOS as well -- namely,
libafl_mainandLLVMFuzzerCustom{Mutator,Crossover}do not appear. @maxammann, are you aware of how to fix this issue? It does not seem to resolve it as expected (these symbols do not even appear in the produced .a files...).
Not really, sorry!
If it's helpful, I can try to do what I did in #1711 for this build script. Though I won't be able to get to it until Monday/Tuesday if the release is being blocked by this issue.
@domenukk if you would be willing to release a point release a couple weeks after 0.13.0, please feel free to skip this issue for the .0 release. We'll release a .1 with the fix.