Hi Ogino-san and Huon, Thanks a lot for your quick but detailed answers! Now I have a better understanding of the build process. So if I use the terminology defined in the below (a bit outdated) wiki page, it's like you removed "stage0" and then split "stage1" into two sub-stages (with and without #[cfg] clauses.)
https://github.com/rust-lang/rust/wiki/Note-compiler-snapshots (~_~).oO(It seems to me that stage2 and 3 are identical now...) Anyways, I get to understand that living only with the Git repo is practically impossible since there's no official way to know what version #[cfg(stage0)] clauses expect and thus there's no other way than to download the nightly build frequently enough. Kai 2014-08-30 10:15 GMT+08:00 Huon Wilson <dbau...@gmail.com>: > Yes, the first stage of bootstrapping uses a binary snapshot of some > older commit (you need a Rust compiler to build Rust, so we need to do > this). There's no particular guarantee that the snapshot has the same > behaviour as the version being compiled, and in general it doesn't, as you > see. > > The libraries have to phase themselves, using #[cfg(stage0)] to specify > the code that is compiled with the snapshot, and #[cfg(not(stage0))] for > the code that should be compiled with the non-snapshot stages (i.e. the > newer compiler with all the latest features). e.g. the error you see there > has these markings > https://github.com/rust-lang/rust/blob/5419b2ca2c27b4745fa1f2773719350420542c76/src/libcore/cell.rs#L325-L341 > . This means using a compiler inappropriate for stage0 as the snapshot > (like HEAD, which needs to be using the not(stage0) code) will try to > compile code that is broken for it. > > The fact that it works with nightly is essentially just a coincidence that > the versions match closely enough (the Rust nightly is 12 hours behind HEAD > on average, and so may be missing the breaking commits). > > > In summary: local-rust failing is not a bug, it's just a consequence of us > bootstrapping while changing the language. > > > Huon > > > On 30/08/14 11:49, Kai Noda wrote: > > Hi Rustlers, > > When I build Rust Git HEAD with the binary package from rust-lang.org in > this way, > > $ CC=gcc47 CXX=g++47 ./configure --prefix=$HOME/local/rust > --enable-valgrind --enable-local-rust > --local-rust-root=$HOME/local/rust-nightly-x86_64-unknown-linux-gnu/ > $ make -j8 install > > it (usually) works fine. However, whey I try to use the above > installation of Rust to build the same Git HEAD itself like this way, > > CC=gcc47 CXX=g++47 ./configure --prefix=$HOME/local/rust > --enable-valgrind --enable-local-rust --local-rust-root=$HOME/local/rust > $ make > > I've never been successful (as of today, I get errors quoted at the end > of this mail.) > > Is this normal (do all developers usually use the binary package?) or > should I file bug reports to Github whenever I see them? I was a bit > surprised to see them because I thought (platform-triple)/stage[0-3] were > bootstrapping phases. Of course I'm well aware that Rust is in a very > early stage of development... > > Regards, > Kai > > 野田 開 <noda...@gmail.com> > > > rustc: > x86_64-unknown-linux-gnu/stage0/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcore > /home/nodakai/src/rust-HEAD/src/libcore/lib.rs:61:37: 61:57 warning: > feature has added to rust, directive not necessary > /home/nodakai/src/rust-HEAD/src/libcore/lib.rs:61 #![feature(simd, > unsafe_destructor, issue_5723_bootstrap)] > > ^~~~~~~~~~~~~~~~~~~~ > /home/nodakai/src/rust-HEAD/src/libcore/cell.rs:337:1: 341:2 error: the > parameter type `T` may not live long enough; consider adding an explicit > lifetime bound `T:'b`... > /home/nodakai/src/rust-HEAD/src/libcore/cell.rs:337 pub struct Ref<'b, T> > { > /home/nodakai/src/rust-HEAD/src/libcore/cell.rs:338 // FIXME #12808: > strange name to try to avoid interfering with > /home/nodakai/src/rust-HEAD/src/libcore/cell.rs:339 // field accesses > of the contained type via Deref > /home/nodakai/src/rust-HEAD/src/libcore/cell.rs:340 _parent: &'b > RefCell<T> > /home/nodakai/src/rust-HEAD/src/libcore/cell.rs:341 } > /home/nodakai/src/rust-HEAD/src/libcore/cell.rs:337:1: 341:2 note: ...so > that the reference type `&'b cell::RefCell<T>` does not outlive the data it > points at > /home/nodakai/src/rust-HEAD/src/libcore/cell.rs:337 pub struct Ref<'b, T> > { > /home/nodakai/src/rust-HEAD/src/libcore/cell.rs:338 // FIXME #12808: > strange name to try to avoid interfering with > /home/nodakai/src/rust-HEAD/src/libcore/cell.rs:339 // field accesses > of the contained type via Deref > /home/nodakai/src/rust-HEAD/src/libcore/cell.rs:340 _parent: &'b > RefCell<T> > /home/nodakai/src/rust-HEAD/src/libcore/cell.rs:341 } > /home/nodakai/src/rust-HEAD/src/libcore/cell.rs:392:1: 396:2 error: the > parameter type `T` may not live long enough; consider adding an explicit > lifetime bound `T:'b`... > /home/nodakai/src/rust-HEAD/src/libcore/cell.rs:392 pub struct RefMut<'b, > T> { > /home/nodakai/src/rust-HEAD/src/libcore/cell.rs:393 // FIXME #12808: > strange name to try to avoid interfering with > /home/nodakai/src/rust-HEAD/src/libcore/cell.rs:394 // field accesses > of the contained type via Deref > /home/nodakai/src/rust-HEAD/src/libcore/cell.rs:395 _parent: &'b > RefCell<T> > /home/nodakai/src/rust-HEAD/src/libcore/cell.rs:396 } > /home/nodakai/src/rust-HEAD/src/libcore/cell.rs:392:1: 396:2 note: ...so > that the reference type `&'b cell::RefCell<T>` does not outlive the data it > points at > /home/nodakai/src/rust-HEAD/src/libcore/cell.rs:392 pub struct RefMut<'b, > T> { > /home/nodakai/src/rust-HEAD/src/libcore/cell.rs:393 // FIXME #12808: > strange name to try to avoid interfering with > /home/nodakai/src/rust-HEAD/src/libcore/cell.rs:394 // field accesses > of the contained type via Deref > /home/nodakai/src/rust-HEAD/src/libcore/cell.rs:395 _parent: &'b > RefCell<T> > /home/nodakai/src/rust-HEAD/src/libcore/cell.rs:396 } > /home/nodakai/src/rust-HEAD/src/libcore/finally.rs:112:1: 115:2 error: > the parameter type `A` may not live long enough; consider adding an > explicit lifetime bound `A:'a`... > /home/nodakai/src/rust-HEAD/src/libcore/finally.rs:112 struct > Finallyalizer<'a,A> { > /home/nodakai/src/rust-HEAD/src/libcore/finally.rs:113 mutate: &'a > mut A, > /home/nodakai/src/rust-HEAD/src/libcore/finally.rs:114 dtor: |&mut > A|: 'a > /home/nodakai/src/rust-HEAD/src/libcore/finally.rs:115 } > /home/nodakai/src/rust-HEAD/src/libcore/finally.rs:112:1: 115:2 note: > ...so that the reference type `&'a mut A` does not outlive the data it > points at > /home/nodakai/src/rust-HEAD/src/libcore/finally.rs:112 struct > Finallyalizer<'a,A> { > /home/nodakai/src/rust-HEAD/src/libcore/finally.rs:113 mutate: &'a > mut A, > /home/nodakai/src/rust-HEAD/src/libcore/finally.rs:114 dtor: |&mut > A|: 'a > /home/nodakai/src/rust-HEAD/src/libcore/finally.rs:115 } > /home/nodakai/src/rust-HEAD/src/libcore/iter.rs:788:1: 790:2 error: the > parameter type `T` may not live long enough; consider adding an explicit > lifetime bound `T:'a`... > /home/nodakai/src/rust-HEAD/src/libcore/iter.rs:788 pub struct ByRef<'a, > T> { > /home/nodakai/src/rust-HEAD/src/libcore/iter.rs:789 iter: &'a mut T > /home/nodakai/src/rust-HEAD/src/libcore/iter.rs:790 } > /home/nodakai/src/rust-HEAD/src/libcore/iter.rs:788:1: 790:2 note: ...so > that the reference type `&'a mut T` does not outlive the data it points at > /home/nodakai/src/rust-HEAD/src/libcore/iter.rs:788 pub struct ByRef<'a, > T> { > /home/nodakai/src/rust-HEAD/src/libcore/iter.rs:789 iter: &'a mut T > /home/nodakai/src/rust-HEAD/src/libcore/iter.rs:790 } > /home/nodakai/src/rust-HEAD/src/libcore/slice.rs:1138:1: 1142:2 error: > the parameter type `T` may not live long enough; consider adding an > explicit lifetime bound `T:'a`... > /home/nodakai/src/rust-HEAD/src/libcore/slice.rs:1138 pub struct > Splits<'a, T> { > /home/nodakai/src/rust-HEAD/src/libcore/slice.rs:1139 v: &'a [T], > /home/nodakai/src/rust-HEAD/src/libcore/slice.rs:1140 pred: |t: &T|: > 'a -> bool, > /home/nodakai/src/rust-HEAD/src/libcore/slice.rs:1141 finished: bool > /home/nodakai/src/rust-HEAD/src/libcore/slice.rs:1142 } > /home/nodakai/src/rust-HEAD/src/libcore/slice.rs:1138:1: 1142:2 note: > ...so that the reference type `&'a [T]` does not outlive the data it points > at > /home/nodakai/src/rust-HEAD/src/libcore/slice.rs:1138 pub struct > Splits<'a, T> { > /home/nodakai/src/rust-HEAD/src/libcore/slice.rs:1139 v: &'a [T], > /home/nodakai/src/rust-HEAD/src/libcore/slice.rs:1140 pred: |t: &T|: > 'a -> bool, > /home/nodakai/src/rust-HEAD/src/libcore/slice.rs:1141 finished: bool > /home/nodakai/src/rust-HEAD/src/libcore/slice.rs:1142 } > /home/nodakai/src/rust-HEAD/src/libcore/slice.rs:1205:1: 1209:2 error: > the parameter type `T` may not live long enough; consider adding an > explicit lifetime bound `T:'a`... > /home/nodakai/src/rust-HEAD/src/libcore/slice.rs:1205 pub struct > MutSplits<'a, T> { > /home/nodakai/src/rust-HEAD/src/libcore/slice.rs:1206 v: &'a mut [T], > /home/nodakai/src/rust-HEAD/src/libcore/slice.rs:1207 pred: |t: &T|: > 'a -> bool, > /home/nodakai/src/rust-HEAD/src/libcore/slice.rs:1208 finished: bool > /home/nodakai/src/rust-HEAD/src/libcore/slice.rs:1209 } > /home/nodakai/src/rust-HEAD/src/libcore/slice.rs:1205:1: 1209:2 note: > ...so that the reference type `&'a mut [T]` does not outlive the data it > points at > /home/nodakai/src/rust-HEAD/src/libcore/slice.rs:1205 pub struct > MutSplits<'a, T> { > /home/nodakai/src/rust-HEAD/src/libcore/slice.rs:1206 v: &'a mut [T], > /home/nodakai/src/rust-HEAD/src/libcore/slice.rs:1207 pred: |t: &T|: > 'a -> bool, > /home/nodakai/src/rust-HEAD/src/libcore/slice.rs:1208 finished: bool > /home/nodakai/src/rust-HEAD/src/libcore/slice.rs:1209 } > /home/nodakai/src/rust-HEAD/src/libcore/slice.rs:1321:1: 1324:2 error: > the parameter type `T` may not live long enough; consider adding an > explicit lifetime bound `T:'a`... > /home/nodakai/src/rust-HEAD/src/libcore/slice.rs:1321 pub struct > Windows<'a, T> { > /home/nodakai/src/rust-HEAD/src/libcore/slice.rs:1322 v: &'a [T], > /home/nodakai/src/rust-HEAD/src/libcore/slice.rs:1323 size: uint > /home/nodakai/src/rust-HEAD/src/libcore/slice.rs:1324 } > /home/nodakai/src/rust-HEAD/src/libcore/slice.rs:1321:1: 1324:2 note: > ...so that the reference type `&'a [T]` does not outlive the data it points > at > /home/nodakai/src/rust-HEAD/src/libcore/slice.rs:1321 pub struct > Windows<'a, T> { > /home/nodakai/src/rust-HEAD/src/libcore/slice.rs:1322 v: &'a [T], > /home/nodakai/src/rust-HEAD/src/libcore/slice.rs:1323 size: uint > /home/nodakai/src/rust-HEAD/src/libcore/slice.rs:1324 } > /home/nodakai/src/rust-HEAD/src/libcore/slice.rs:1367:1: 1370:2 error: > the parameter type `T` may not live long enough; consider adding an > explicit lifetime bound `T:'a`... > /home/nodakai/src/rust-HEAD/src/libcore/slice.rs:1367 pub struct > Chunks<'a, T> { > /home/nodakai/src/rust-HEAD/src/libcore/slice.rs:1368 v: &'a [T], > /home/nodakai/src/rust-HEAD/src/libcore/slice.rs:1369 size: uint > /home/nodakai/src/rust-HEAD/src/libcore/slice.rs:1370 } > /home/nodakai/src/rust-HEAD/src/libcore/slice.rs:1367:1: 1370:2 note: > ...so that the reference type `&'a [T]` does not outlive the data it points > at > /home/nodakai/src/rust-HEAD/src/libcore/slice.rs:1367 pub struct > Chunks<'a, T> { > /home/nodakai/src/rust-HEAD/src/libcore/slice.rs:1368 v: &'a [T], > /home/nodakai/src/rust-HEAD/src/libcore/slice.rs:1369 size: uint > /home/nodakai/src/rust-HEAD/src/libcore/slice.rs:1370 } > /home/nodakai/src/rust-HEAD/src/libcore/slice.rs:1459:1: 1462:2 error: > the parameter type `T` may not live long enough; consider adding an > explicit lifetime bound `T:'a`... > /home/nodakai/src/rust-HEAD/src/libcore/slice.rs:1459 pub struct > MutChunks<'a, T> { > /home/nodakai/src/rust-HEAD/src/libcore/slice.rs:1460 v: &'a mut [T], > /home/nodakai/src/rust-HEAD/src/libcore/slice.rs:1461 chunk_size: uint > /home/nodakai/src/rust-HEAD/src/libcore/slice.rs:1462 } > /home/nodakai/src/rust-HEAD/src/libcore/slice.rs:1459:1: 1462:2 note: > ...so that the reference type `&'a mut [T]` does not outlive the data it > points at > /home/nodakai/src/rust-HEAD/src/libcore/slice.rs:1459 pub struct > MutChunks<'a, T> { > /home/nodakai/src/rust-HEAD/src/libcore/slice.rs:1460 v: &'a mut [T], > /home/nodakai/src/rust-HEAD/src/libcore/slice.rs:1461 chunk_size: uint > /home/nodakai/src/rust-HEAD/src/libcore/slice.rs:1462 } > error: aborting due to 9 previous errors > make: *** > [x86_64-unknown-linux-gnu/stage0/lib/rustlib/x86_64-unknown-linux-gnu/lib/stamp.core] > Error 101 > > > _______________________________________________ > Rust-dev mailing > listRust-dev@mozilla.orghttps://mail.mozilla.org/listinfo/rust-dev > > > > _______________________________________________ > Rust-dev mailing list > Rust-dev@mozilla.org > https://mail.mozilla.org/listinfo/rust-dev > >
_______________________________________________ Rust-dev mailing list Rust-dev@mozilla.org https://mail.mozilla.org/listinfo/rust-dev