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
<http://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 <mailto: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 <http://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
<http://cell.rs:337> pub struct Ref<'b, T> {
/home/nodakai/src/rust-HEAD/src/libcore/cell.rs:338
<http://cell.rs:338> // FIXME #12808: strange name to try to avoid
interfering with
/home/nodakai/src/rust-HEAD/src/libcore/cell.rs:339
<http://cell.rs:339> // field accesses of the contained type via Deref
/home/nodakai/src/rust-HEAD/src/libcore/cell.rs:340
<http://cell.rs:340> _parent: &'b RefCell<T>
/home/nodakai/src/rust-HEAD/src/libcore/cell.rs:341 <http://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
<http://cell.rs:337> pub struct Ref<'b, T> {
/home/nodakai/src/rust-HEAD/src/libcore/cell.rs:338
<http://cell.rs:338> // FIXME #12808: strange name to try to avoid
interfering with
/home/nodakai/src/rust-HEAD/src/libcore/cell.rs:339
<http://cell.rs:339> // field accesses of the contained type via Deref
/home/nodakai/src/rust-HEAD/src/libcore/cell.rs:340
<http://cell.rs:340> _parent: &'b RefCell<T>
/home/nodakai/src/rust-HEAD/src/libcore/cell.rs:341 <http://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
<http://cell.rs:392> pub struct RefMut<'b, T> {
/home/nodakai/src/rust-HEAD/src/libcore/cell.rs:393
<http://cell.rs:393> // FIXME #12808: strange name to try to avoid
interfering with
/home/nodakai/src/rust-HEAD/src/libcore/cell.rs:394
<http://cell.rs:394> // field accesses of the contained type via Deref
/home/nodakai/src/rust-HEAD/src/libcore/cell.rs:395
<http://cell.rs:395> _parent: &'b RefCell<T>
/home/nodakai/src/rust-HEAD/src/libcore/cell.rs:396 <http://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
<http://cell.rs:392> pub struct RefMut<'b, T> {
/home/nodakai/src/rust-HEAD/src/libcore/cell.rs:393
<http://cell.rs:393> // FIXME #12808: strange name to try to avoid
interfering with
/home/nodakai/src/rust-HEAD/src/libcore/cell.rs:394
<http://cell.rs:394> // field accesses of the contained type via Deref
/home/nodakai/src/rust-HEAD/src/libcore/cell.rs:395
<http://cell.rs:395> _parent: &'b RefCell<T>
/home/nodakai/src/rust-HEAD/src/libcore/cell.rs:396 <http://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
<http://finally.rs:112> struct Finallyalizer<'a,A> {
/home/nodakai/src/rust-HEAD/src/libcore/finally.rs:113
<http://finally.rs:113> mutate: &'a mut A,
/home/nodakai/src/rust-HEAD/src/libcore/finally.rs:114
<http://finally.rs:114> dtor: |&mut A|: 'a
/home/nodakai/src/rust-HEAD/src/libcore/finally.rs:115
<http://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
<http://finally.rs:112> struct Finallyalizer<'a,A> {
/home/nodakai/src/rust-HEAD/src/libcore/finally.rs:113
<http://finally.rs:113> mutate: &'a mut A,
/home/nodakai/src/rust-HEAD/src/libcore/finally.rs:114
<http://finally.rs:114> dtor: |&mut A|: 'a
/home/nodakai/src/rust-HEAD/src/libcore/finally.rs:115
<http://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
<http://iter.rs:788> pub struct ByRef<'a, T> {
/home/nodakai/src/rust-HEAD/src/libcore/iter.rs:789
<http://iter.rs:789> iter: &'a mut T
/home/nodakai/src/rust-HEAD/src/libcore/iter.rs:790 <http://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
<http://iter.rs:788> pub struct ByRef<'a, T> {
/home/nodakai/src/rust-HEAD/src/libcore/iter.rs:789
<http://iter.rs:789> iter: &'a mut T
/home/nodakai/src/rust-HEAD/src/libcore/iter.rs:790 <http://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
<http://slice.rs:1138> pub struct Splits<'a, T> {
/home/nodakai/src/rust-HEAD/src/libcore/slice.rs:1139
<http://slice.rs:1139> v: &'a [T],
/home/nodakai/src/rust-HEAD/src/libcore/slice.rs:1140
<http://slice.rs:1140> pred: |t: &T|: 'a -> bool,
/home/nodakai/src/rust-HEAD/src/libcore/slice.rs:1141
<http://slice.rs:1141> finished: bool
/home/nodakai/src/rust-HEAD/src/libcore/slice.rs:1142
<http://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
<http://slice.rs:1138> pub struct Splits<'a, T> {
/home/nodakai/src/rust-HEAD/src/libcore/slice.rs:1139
<http://slice.rs:1139> v: &'a [T],
/home/nodakai/src/rust-HEAD/src/libcore/slice.rs:1140
<http://slice.rs:1140> pred: |t: &T|: 'a -> bool,
/home/nodakai/src/rust-HEAD/src/libcore/slice.rs:1141
<http://slice.rs:1141> finished: bool
/home/nodakai/src/rust-HEAD/src/libcore/slice.rs:1142
<http://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
<http://slice.rs:1205> pub struct MutSplits<'a, T> {
/home/nodakai/src/rust-HEAD/src/libcore/slice.rs:1206
<http://slice.rs:1206> v: &'a mut [T],
/home/nodakai/src/rust-HEAD/src/libcore/slice.rs:1207
<http://slice.rs:1207> pred: |t: &T|: 'a -> bool,
/home/nodakai/src/rust-HEAD/src/libcore/slice.rs:1208
<http://slice.rs:1208> finished: bool
/home/nodakai/src/rust-HEAD/src/libcore/slice.rs:1209
<http://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
<http://slice.rs:1205> pub struct MutSplits<'a, T> {
/home/nodakai/src/rust-HEAD/src/libcore/slice.rs:1206
<http://slice.rs:1206> v: &'a mut [T],
/home/nodakai/src/rust-HEAD/src/libcore/slice.rs:1207
<http://slice.rs:1207> pred: |t: &T|: 'a -> bool,
/home/nodakai/src/rust-HEAD/src/libcore/slice.rs:1208
<http://slice.rs:1208> finished: bool
/home/nodakai/src/rust-HEAD/src/libcore/slice.rs:1209
<http://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
<http://slice.rs:1321> pub struct Windows<'a, T> {
/home/nodakai/src/rust-HEAD/src/libcore/slice.rs:1322
<http://slice.rs:1322> v: &'a [T],
/home/nodakai/src/rust-HEAD/src/libcore/slice.rs:1323
<http://slice.rs:1323> size: uint
/home/nodakai/src/rust-HEAD/src/libcore/slice.rs:1324
<http://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
<http://slice.rs:1321> pub struct Windows<'a, T> {
/home/nodakai/src/rust-HEAD/src/libcore/slice.rs:1322
<http://slice.rs:1322> v: &'a [T],
/home/nodakai/src/rust-HEAD/src/libcore/slice.rs:1323
<http://slice.rs:1323> size: uint
/home/nodakai/src/rust-HEAD/src/libcore/slice.rs:1324
<http://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
<http://slice.rs:1367> pub struct Chunks<'a, T> {
/home/nodakai/src/rust-HEAD/src/libcore/slice.rs:1368
<http://slice.rs:1368> v: &'a [T],
/home/nodakai/src/rust-HEAD/src/libcore/slice.rs:1369
<http://slice.rs:1369> size: uint
/home/nodakai/src/rust-HEAD/src/libcore/slice.rs:1370
<http://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
<http://slice.rs:1367> pub struct Chunks<'a, T> {
/home/nodakai/src/rust-HEAD/src/libcore/slice.rs:1368
<http://slice.rs:1368> v: &'a [T],
/home/nodakai/src/rust-HEAD/src/libcore/slice.rs:1369
<http://slice.rs:1369> size: uint
/home/nodakai/src/rust-HEAD/src/libcore/slice.rs:1370
<http://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
<http://slice.rs:1459> pub struct MutChunks<'a, T> {
/home/nodakai/src/rust-HEAD/src/libcore/slice.rs:1460
<http://slice.rs:1460> v: &'a mut [T],
/home/nodakai/src/rust-HEAD/src/libcore/slice.rs:1461
<http://slice.rs:1461> chunk_size: uint
/home/nodakai/src/rust-HEAD/src/libcore/slice.rs:1462
<http://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
<http://slice.rs:1459> pub struct MutChunks<'a, T> {
/home/nodakai/src/rust-HEAD/src/libcore/slice.rs:1460
<http://slice.rs:1460> v: &'a mut [T],
/home/nodakai/src/rust-HEAD/src/libcore/slice.rs:1461
<http://slice.rs:1461> chunk_size: uint
/home/nodakai/src/rust-HEAD/src/libcore/slice.rs:1462
<http://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
_______________________________________________
Rust-dev mailing list
Rust-dev@mozilla.org
https://mail.mozilla.org/listinfo/rust-dev