-
Notifications
You must be signed in to change notification settings - Fork 107
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to build 0.11.1: warning _FORTIFY_SOURCE #202
Comments
Hi, @kvark. Thanks for the detailed output. It looks like The part that says Do you have the llvm tools installed? In particular, do you have an |
Hmm, I don't have
|
Here is one place where things seem to be going wrong: https://github.com/AFLplusplus/AFLplusplus/blob/9321a24e682b5c8bf6278961bd014cb883b87295/GNUmakefile.llvm#L120 Could you please share the output of the following commands:
If |
That question lead me to the rabbit hole of LLVM and clang configuration on Nix... Sorry to be that user on a strange system! Found https://discourse.nixos.org/t/how-to-correctly-populate-a-clang-and-llvm-development-environment-using-nix-shell/3864, which is fixed in NixOS/nixpkgs#85489, which got... stalled. I'm also seeing that my configuration has
Some other projects facing this issue and solving it by different means, like jacobdufault/cquery#237 At this point, I don't know if it's a purely NixOS issue, or also something to be improved in the AFL build process. |
It should be noted that the LLVM-related messages are non-fatal diagnostics, and do not necessarily indicate that LLVM/libclang won't link just fine; the actual fatal error here is due to something unrelated hitting |
I don't know a lot about Nix. Could you just put a symlink in place to point to the real clang? E.g.,
|
Thanks for your comment, @Ralith. I understand your point that |
The issue could be pursued upstream, and a patched version used in the mean time. |
Actually, the @kvark Is it possible you have |
No, I tried cloning https://github.com/AFLplusplus/AFLplusplus and just building it with
|
Sorry, I can't do this:
Also note that clang is not found by the build regardless of whether I enable clang or not in the shell configuration with this:
|
Sounds like it's trying to bake in the path to the LLVM build and assumes that'll be a suitable prefix for clang, which it isn't. If it just executed |
Could share the log up to that point? Also, afl.rs currently uses commit 9321a24. Could you try with that commit specifically? |
Looks relevant to AFLplusplus/AFLplusplus#316, which is claimed to be fixed. |
https://github.com/NixOS/nixpkgs/blob/master/pkgs/tools/security/aflplusplus/default.nix may also be of interest |
I've sadly run into this as well on NixOS. Has anyone maybe found a working solution in the meantime? |
The problem is that the AFLplusplus makefiles only check whether The clang and llvm issues seem to be entirely separate. To get a clang build on NixOS I put some dirty hacks into https://github.com/vkleen/zorn/blob/3e18f4444c9390eda6b2e0ec5e23285ecfac0a6e/flake.nix Essentially, I'm just merging llvm, clang and lld into a single symlinked path hierarchy. Use at your own risk (I'm only hacking this together for development). |
Full log:
The text was updated successfully, but these errors were encountered: