brson/multirust

make qemu fails after following instructions in Redox book, because of deprecated feature

zacharyhamm opened this issue · 0 comments

Building redox failed for me with the nightly rust. The error is as follows:

zsh@nucky:~/Hacking/redox$ make qemu
mkdir -p build/i386-unknown-redox/debug
RUST_BACKTRACE=1 rustc --target=i386-unknown-redox.json -L build/i386-unknown-redox/debug -C no-prepopulate-passes -C no-stack-check -C opt-level=2 -Z no-landing-pads -A dead_code -o build/i386-unknown-redox/debug/libcore.rlib rust/src/libcore/lib.rs
RUST_BACKTRACE=1 rustc --target=i386-unknown-redox.json -L build/i386-unknown-redox/debug -C no-prepopulate-passes -C no-stack-check -C opt-level=2 -Z no-landing-pads -A dead_code -o build/i386-unknown-redox/debug/libio.rlib crates/io/lib.rs
RUST_BACKTRACE=1 rustc --target=i386-unknown-redox.json -L build/i386-unknown-redox/debug -C no-prepopulate-passes -C no-stack-check -C opt-level=2 -Z no-landing-pads -A dead_code -o build/i386-unknown-redox/debug/liballoc_system.rlib liballoc_system/lib.rs
RUST_BACKTRACE=1 rustc --target=i386-unknown-redox.json -L build/i386-unknown-redox/debug -C no-prepopulate-passes -C no-stack-check -C opt-level=2 -Z no-landing-pads -A dead_code -o build/i386-unknown-redox/debug/liballoc.rlib rust/src/liballoc/lib.rs
RUST_BACKTRACE=1 rustc --target=i386-unknown-redox.json -L build/i386-unknown-redox/debug -C no-prepopulate-passes -C no-stack-check -C opt-level=2 -Z no-landing-pads -A dead_code -o build/i386-unknown-redox/debug/librustc_unicode.rlib rust/src/librustc_unicode/lib.rs
RUST_BACKTRACE=1 rustc --target=i386-unknown-redox.json -L build/i386-unknown-redox/debug -C no-prepopulate-passes -C no-stack-check -C opt-level=2 -Z no-landing-pads -A dead_code -o build/i386-unknown-redox/debug/libcollections.rlib rust/src/libcollections/lib.rs
RUST_BACKTRACE=1 rustc --target=i386-unknown-redox.json -L build/i386-unknown-redox/debug -C no-prepopulate-passes -C no-stack-check -C opt-level=2 -Z no-landing-pads -A dead_code -o build/i386-unknown-redox/debug/librand.rlib rust/src/librand/lib.rs
RUST_BACKTRACE=1 rustc --target=i386-unknown-redox.json -L build/i386-unknown-redox/debug -C no-prepopulate-passes -C no-stack-check -C opt-level=2 -Z no-landing-pads -A dead_code -o build/i386-unknown-redox/debug/libsystem.rlib crates/system/lib.rs
RUST_BACKTRACE=1 rustc --target=i386-unknown-redox.json -L build/i386-unknown-redox/debug -C no-prepopulate-passes -C no-stack-check -C opt-level=2 -Z no-landing-pads -A dead_code -o build/i386-unknown-redox/debug/libstd.rlib libstd/src/lib.rs -L native=libc/lib/
libstd/src/num/f32.rs:1024:13: 1024:25 error: floating point constants cannot be used in patterns
libstd/src/num/f32.rs:1024             NEG_INFINITY => NEG_INFINITY,
                                       ^~~~~~~~~~~~
libstd/src/num/f32.rs:1024:13: 1024:25 warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
libstd/src/num/f32.rs:1024:13: 1024:25 note: for more information, see RFC 1445 <https://github.com/rust-lang/rfcs/pull/1445>
libstd/src/lib.rs:48:9: 48:17 note: lint level defined here
libstd/src/lib.rs:48 #![deny(warnings)]
                             ^~~~~~~~
libstd/src/num/f64.rs:956:13: 956:25 error: floating point constants cannot be used in patterns
libstd/src/num/f64.rs:956             NEG_INFINITY => NEG_INFINITY,
                                      ^~~~~~~~~~~~
libstd/src/num/f64.rs:956:13: 956:25 warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
libstd/src/num/f64.rs:956:13: 956:25 note: for more information, see RFC 1445 <https://github.com/rust-lang/rfcs/pull/1445>
libstd/src/lib.rs:48:9: 48:17 note: lint level defined here
libstd/src/lib.rs:48 #![deny(warnings)]
                             ^~~~~~~~
error: aborting due to 2 previous errors
Makefile:465: recipe for target 'build/i386-unknown-redox/debug/libstd.rlib' failed
make: *** [build/i386-unknown-redox/debug/libstd.rlib] Error 101

This appears to be related to rust-lang/rfcs#1445

I'm pretty new to Rust, so I didn't try any workaround (like turning off deny(warnings)) but I assume that will get it to build.

My rustc version is: rustc 1.9.0-nightly (d5a91e695 2016-03-26)

I got this by following the multirust instructions in the book and running multirust override nightly