I'm building 1.6 from the source tarball on the website. There are no prior rustc or rust/crate artifacts on the system (and on top of that, it is being built in a chroot). I am bootstrapping using rust-stage0-2015-08-11-1af31d4-linux-x86_64-*.tar.bz2
, which the latest snapshot listed in src/snapshots.txt
. The build ultimately fails when rustc
attempts to compile src/liblibc/src/lib.rs
saying:
src/liblibc/src/lib.rs:1:1: 1:1 error: the crate `core` has been compiled with an old version of rustc, which is incompatible with this version of rustc [E0514]
How could this be the case if I'm building from source using the appropriate bootstrap compiler? Am I missing something really obvious here? I see earlier in the log it successfully builds libcore
and touches stage1/lib/stamp.core
. It was built using the same stage0
rustc
being used later when the error occurs.
edit:
I think I found the root cause. I need to pass --sysroot
to stage 0 because of being in a chroot jail with no /proc
. I do this by passing it in RUSTFLAGS
. It then gets carried over to each subsequent stage, which results in the stage 0 sysroot
being passed to the stage 1 rustc
.
Now I just need to figure out how to pass a different sysroot
for each stage N of the build...