rustc seems to be broken on the 17.09 channel. Apparently, the breakage was introduced with 0186286433cccbf6faf288c22df03e63e46dd94d as Hydra suggests.
Maybe we can use that as a starting point.
cd nixpkgs
git checkout channels/nixos-17.09
nix-build -A pkgs.rustc
"x86_64-linux"Linux 4.9.77, NixOS, 17.09.git.5225428 (Hummingbird)yesnonix-env (Nix) 1.12pre5788_e3013543"nixos-16.09.1512.6b28bd0"/home/justin/nixpkgsCan confirm, same here.
The glibc update does contains some changes around stack edge cases, and it's out-of-stack test what fails in rustc. Currently it seems that the test is wrong, as newer rustc does pass.
Thanks for that hint. I'm currently trying to compile rustc locally with
diff --git a/src/test/run-pass/out-of-stack.rs b/src/test/run-pass/out-of-stack.rs
index a7748b6d6a..943c89a28e 100644
--- a/src/test/run-pass/out-of-stack.rs
+++ b/src/test/run-pass/out-of-stack.rs
@@ -47,7 +47,7 @@ fn check_status(status: std::process::ExitStatus)
use std::os::unix::process::ExitStatusExt;
assert!(!status.success());
- assert_eq!(status.signal(), Some(libc::SIGABRT));
+ assert_eq!(status.signal(), Some(libc::SIGSEGV));
}
#[cfg(not(unix))]
applied. Will create a PR if that succeeds. Unfortunately I do not understand possible consequences of changing the desired behaviour.
Hmm, one more stack-related patch's got backported to the glibc branch we're using, so it might be that: https://sourceware.org/git/?p=glibc.git;a=commit;h=dcc03e708179
If that glibc patch solves the issue, that might be the cleanest solution. Also building that, but it takes it's time on my desktop...
An hour or four. If it really is due to a glibc bug, we will want to patch glibc sooner or later anyway.
Okay, I can report, that the glibc patch didn't solve the failing rustc test by itself. This is how I applied the patch: fe1f794ad5a679466247274e1cd54c50184a5081
Adapting the test worked; at least rustc build successfully. I just recognized, that my patch to rustc doesn't let much assertions in there. So maybe it wil be smarter to just use the #34205 approach (which disables that test iirc).
Anyway, I wil create a PR, so people can choose.
As long as no fix is merged yet, is there an easy way to reset the channel to a version where it still worked? Or would I have to switch to build from a local git checkout?
@timokau I rebased my changes to nixpkgs ontop of bc66772e76f. That solved the issue, but is without the glibc patch. If you don't have custom changes to nixpkgs, you can do
cd nixpkgs/
git remote update
git checkout bc66772e76f
nixos-rebuild switch -I nixpkgs=/path/to/nixpkgs
There's also sudo nix-channel --rollback
17.09 updated to e79033b572a13a7b78ec7dc428f09e065bf26869 a couple of hours ago.