-
Notifications
You must be signed in to change notification settings - Fork 67
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
build.rs
panics due to _FORTIFY_SOURCE
warnings
#108
Comments
We don't enable warnings_into_errors flag, and according to https://docs.rs/cc/latest/cc/struct.Build.html#method.warnings_into_errors, it's disabled by default. Can you compile github.com/jemalloc/jemalloc successfully? |
interesting, thank you @BusyJay. i'll close this issue, pardon the trouble! it sounds like the |
https://github.com/tikv/jemallocator/blob/main/jemalloc-sys/configure/configure#L3811-L3819 it looks like this leads me to see these CFLAGS in my build output:
jemalloc builds successfully if i pin myself to an older LLVM/clang version. that will work for me in the short term, i provide these extra notes in case they're of use to someone else someday. 🙂 |
I came here to report the same issue.
fixes it. I was not aware it is caused by Anyway, this is definitely a problem, possibly in newer versions of LLVM, and it affects all our downstream users, and explaining to them they should add that line to their |
i'll reopen this on behalf of @dpc, since this is affecting others as well. |
Huh... I found some time to do more investigation, and it seems the actual failure was:
clang 16, on Linux, the I verified again that forcing |
Can someone provide full build logs? Especially the file in |
I can't reproduce it on an alpine image that has clang 19. I notice that all provided logs in the issue are related to nix. However, I have never used nix before. I suspects there is some misconfiguration during compilation.
however, the function somehow returns |
It isn't impossible it is a NixOS issue. It seems it doesn't happen with clang14 provided by NixOS, but it does with clang16 (would need to confirm it again). It's unlikely the c toolchain got switched during building of a single cargo crate, but it could be something internally that goes wrong / confuses autoconf? |
I don't mean header is switched. configure only checks |
I have the same problem on NixOS with gcc 14.2.1. Downgrading to gcc13 fixed the issue for me. Very peculiar, and most definitely related to Nix. |
I guess it makes sense to report to nixpkgs then: NixOS/nixpkgs#370494 |
first, thanks for maintaining this crate. it is a very useful piece of software.
i have found that the
build.rs
panics when i attempt to build this package using clang 17, due to warnings related a missing optimization flag:the panic looks like:
and i see warnings (promoted to errors) that look like this:
these are observed with the following clang/llvm toolchain:
however, i do not see this panic if i revert to an older version of clang,
The text was updated successfully, but these errors were encountered: