To bootstrap from binary snapshots, Rust often uses #[cfg(stage0)] and #[cfg(not(stage0))] when breaking changes are approved. When we update snapshots #[cfg(stage0)] code is removed and #[cfg(not(stage0))] code is used in all stages.
If you use git HEAD Rust for bootstrapping after such breaking changes are landed, git HEAD might fail to compile #[cfg(stage0)] code. cf. https://github.com/rust-lang/rust/pull/16859 2014-08-30 10:49 GMT+09:00 Kai Noda <noda...@gmail.com>: > 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 list > Rust-dev@mozilla.org > https://mail.mozilla.org/listinfo/rust-dev > > -- Masanori Ogino <masanori.og...@gmail.com> http://twitter.com/omasanori http://gplus.to/omasanori
_______________________________________________ Rust-dev mailing list Rust-dev@mozilla.org https://mail.mozilla.org/listinfo/rust-dev