-
Notifications
You must be signed in to change notification settings - Fork 677
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
Nix doesn't compile anymore on rust nightly-2016-03-30 due to an LLVM error #339
Comments
After bisecting rustc locally, you can build the current master (4ca407d) with 2016-03-18 but not with 2016-03-20. That matches the results stored on Travis:
|
Did you report a bug against rust as well? I am pretty sure that triggering an assertion in llvm is a bug in the compiler itself. |
@JohanLorenzo thanks for the issue and the investigation! |
I haven't yet. I'm trying to narrow down the code so the bug will be actionable by the rustc devs. @pnkfelix helped to get suitable debug traces.
np! 😃 |
Here is some information that may or may not be useful for fixing this issue, but I thought was worth noting since it may be a sign of problems elsewhere. While investigating this I determined that the gettid code in
pub fn gettid() -> pid_t {
unsafe { libc::syscall(libc::SYS_gettid) as pid_t }
} This function is weird in the context of the The (relatively few) other functions in the Also worth noting: the type signatures for Finally, if I replace the current body of (Despite the above observations, I have not managed to figure out enough of the problem to make a small isolated test case...) |
@pnkfelix thanks for the observations! Not relevant to the compiler error, but the Looking at |
I'm stashing the state of my attempt to narrow the problem down in the following gist: https://gist.github.com/pnkfelix/727d5533e16f40b5f55068fec4a8e17b (I've gotten the test case down to a single 4.7K line file. It is a semi-mechanical process to continue removing unused code, i.e. replacing function bodies with |
eddyb says that rust-lang/rust#32742 will fix this once it lands (see discussion in rust-lang/rust#32740) |
yay! |
The latest nightly contains rust-lang/rust#32742. I confirm you can compile nix again with it! Closing the issue. |
Thanks for this library!
When you compile nix on nightly-2016-03-30, you get the failure on the way to be fixed by #337.
Once this small nit is fixed, you get a more serious error:
I got this failure locally, and I also noticed it appears in #337, see this line.
I believe this is a bug in the rust compiler. But I'd prefer starting to document the failure here, it case it remains in the compiler.
The text was updated successfully, but these errors were encountered: