Skip to content

Commit ba9c71b

Browse files
committedJun 15, 2017
rustc.bootstrap: 1.17.0 -> 1.16.0
bootstrapping rust requires the prior version of rust according to #rust-internals they theorize this could be causing the build problems on i686
1 parent 517d65e commit ba9c71b

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed
 

‎pkgs/development/compilers/rust/bootstrap.nix

+9-6
Original file line numberDiff line numberDiff line change
@@ -12,24 +12,27 @@ let
1212
then "x86_64-apple-darwin"
1313
else throw "missing bootstrap url for platform ${stdenv.system}";
1414

15-
# fetch hashes by running `print-hashes.sh 1.17.0`
15+
# fetch hashes by patching print-hashes.sh to not use the "$DATE" variable
16+
# then running `print-hashes.sh 1.16.0`
1617
bootstrapHash =
1718
if stdenv.system == "i686-linux"
18-
then "39d16ce0f618ba37ee1024b83e4822a2d38e6ba9f341ff2020d34df94c7a6beb"
19+
then "b5859161ebb182d3b75fa14a5741e5de87b088146fb0ef4a30f3b2439c6179c5"
1920
else if stdenv.system == "x86_64-linux"
20-
then "bbb0e249a7a3e8143b569706c7d2e7e5f51932c753b7fd26c58ccd2015b02c6b"
21+
then "48621912c242753ba37cad5145df375eeba41c81079df46f93ffb4896542e8fd"
2122
else if stdenv.system == "i686-darwin"
22-
then "308132b33d4002f95a725c2d31b975ff37905e3644894ed86e614b03ded70265"
23+
then "26356b14164354725bd0351e8084f9b164abab134fb05cddb7758af35aad2065"
2324
else if stdenv.system == "x86_64-darwin"
24-
then "1689060c07ec727e9756f19c9373045668471ab56fd8f53e92701150bbe2032b"
25+
then "2d08259ee038d3a2c77a93f1a31fc59e7a1d6d1bbfcba3dba3c8213b2e5d1926"
2526
else throw "missing bootstrap hash for platform ${stdenv.system}";
2627

2728
src = fetchurl {
2829
url = "https://static.rust-lang.org/dist/rust-${version}-${platform}.tar.gz";
2930
sha256 = bootstrapHash;
3031
};
3132

32-
version = "1.17.0";
33+
# Note: the version MUST be one version prior to the version we're
34+
# building
35+
version = "1.16.0";
3336
in import ./binaryBuild.nix
3437
{ inherit stdenv fetchurl makeWrapper cacert zlib curl;
3538
buildRustPackage = null;

4 commit comments

Comments
 (4)

vcunat commented on Jun 16, 2017

@vcunat
Member

This seems to break rust: https://hydra.nixos.org/build/54556546

grahamc commented on Jun 16, 2017

@grahamc
MemberAuthor

Rustc was already broken, and it isn't valid to compile rust 1.N with 1.N, it must be compiled with rust 1.(N - 1). Using a version to compile itself is apparently undefined behavior, according to #rust-internals, and is likely the cause of our prior problems.

Indeed the change that used 1.17 for bootstrapping included the reverse of this patch: 72ff321 however using the correct bootstrap compiler resolved the problem.

I've been baby-sitting rustc changes through hydra and have a hopefully-good build on its way in evaluation 1367830.

grahamc commented on Jun 16, 2017

@grahamc
MemberAuthor

x86_64 passed

grahamc commented on Jun 16, 2017

@grahamc
MemberAuthor

i686 passed for the first time since the upgrade, too. I think we're good now. Now for that ova failure 😭

Please sign in to comment.