Skip to content

configure: Give a better error when the local rustc version is too old #47872

@paulmenzel

Description

@paulmenzel
$ wget https://static.rust-lang.org/dist/rustc-1.23.0-src.tar.gz fetching https://static.rust-lang.org/dist/rustc-1.23.0-src.tar.gz --2018-01-30 11:12:15-- https://static.rust-lang.org/dist/rustc-1.23.0-src.tar.gz Resolving static.rust-lang.org... 52.222.253.135, 52.222.253.206, 52.222.253.85, ... Connecting to static.rust-lang.org|52.222.253.135|:443... connected. HTTP request sent, awaiting response... 200 OK Length: 60010149 (57M) [application/x-tar] Saving to: ‘/dev/shm/bee-root/rustc/files/rustc-1.23.0-src.tar.gz’ /dev/shm/bee-root/rustc/fil 100%[=========================================>] 57.23M 4.64MB/s in 15s 2018-01-30 11:12:30 (3.93 MB/s) - ‘/dev/shm/bee-root/rustc/files/rustc-1.23.0-src.tar.gz’ saved [60010149/60010149] -rw-r--r-- 1 root system 60010149 Jan 4 17:02 /dev/shm/bee-root/rustc/files/rustc-1.23.0-src.tar.gz $ # extract and change directory $ ./configure --prefix=${PREFIX} \ --mandir=${MANDIR} \ --libdir=${LIBDIR} \ --enable-local-rust \ --disable-rpath \ --enable-extended \ --disable-codegen-tests configure: processing command line configure: configure: build.extended := True configure: rust.rpath := False configure: install.libdir := /usr/lib configure: rust.codegen-tests := False configure: install.prefix := /usr configure: build.rustc := /usr/bin/rustc configure: build.cargo := /usr/bin/cargo configure: install.mandir := /usr/share/man configure: build.configure-args := ['--prefix=/usr', '--mandir=/usr/share/man', ' ... configure: configure: writing `config.toml` in current directory configure: configure: run `python /dev/shm/bee-root/rustc/rustc-1.23.0-0/source/x.py --help` configure: $ make -j63 info: looks like you are running this command under `sudo` and so in order to preserve your $HOME this will now use vendored sources by default. Note that if this does not work you should run a normal build first before running a command like `sudo make install` Compiling serde v1.0.21 Compiling itoa v0.3.4 Compiling getopts v0.2.15 Compiling unicode-xid v0.0.4 Compiling lazy_static v0.2.11 Compiling dtoa v0.4.2 Compiling quote v0.3.15 Compiling cc v1.0.3 Compiling num-traits v0.1.40 Compiling cfg-if v0.1.2 Compiling libc v0.2.33 Compiling synom v0.11.3 Compiling syn v0.11.11 Compiling filetime v0.1.14 Compiling num_cpus v1.7.0 Compiling build_helper v0.1.0 (file:///dev/shm/bee-root/rustc/rustc-1.23.0-0/source/src/build_helper) Compiling cmake v0.1.28 Compiling serde_derive_internals v0.17.0 Compiling serde_derive v1.0.21 Compiling serde_json v1.0.6 Compiling toml v0.4.5 Compiling bootstrap v0.0.0 (file:///dev/shm/bee-root/rustc/rustc-1.23.0-0/source/src/bootstrap) Finished dev [unoptimized] target(s) in 36.55 secs Building stage0 std artifacts (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu) Compiling cfg-if v0.1.2 Compiling unwind v0.0.0 (file:///dev/shm/bee-root/rustc/rustc-1.23.0-0/source/src/libunwind) Compiling libc v0.2.33 Compiling core v0.0.0 (file:///dev/shm/bee-root/rustc/rustc-1.23.0-0/source/src/libcore) Compiling cc v1.0.3 error: expected one of `)` or `,`, found `=` --> /dev/shm/bee-root/rustc/rustc-1.23.0-0/source/src/libcore/slice/mod.rs:1049:13 | 1049 | (0..=self.end).get(slice) | ^ expected one of `)` or `,` here error: expected one of `)` or `,`, found `=` --> /dev/shm/bee-root/rustc/rustc-1.23.0-0/source/src/libcore/slice/mod.rs:1054:13 | 1054 | (0..=self.end).get_mut(slice) | ^ expected one of `)` or `,` here error: expected one of `)` or `,`, found `=` --> /dev/shm/bee-root/rustc/rustc-1.23.0-0/source/src/libcore/slice/mod.rs:1059:13 | 1059 | (0..=self.end).get_unchecked(slice) | ^ expected one of `)` or `,` here error: expected one of `)` or `,`, found `=` --> /dev/shm/bee-root/rustc/rustc-1.23.0-0/source/src/libcore/slice/mod.rs:1064:13 | 1064 | (0..=self.end).get_unchecked_mut(slice) | ^ expected one of `)` or `,` here error: expected one of `)` or `,`, found `=` --> /dev/shm/bee-root/rustc/rustc-1.23.0-0/source/src/libcore/slice/mod.rs:1069:13 | 1069 | (0..=self.end).index(slice) | ^ expected one of `)` or `,` here error: expected one of `)` or `,`, found `=` --> /dev/shm/bee-root/rustc/rustc-1.23.0-0/source/src/libcore/slice/mod.rs:1074:13 | 1074 | (0..=self.end).index_mut(slice) | ^ expected one of `)` or `,` here Compiling filetime v0.1.14 Compiling build_helper v0.1.0 (file:///dev/shm/bee-root/rustc/rustc-1.23.0-0/source/src/build_helper) error[E0522]: definition of an unknown language item: `generator`. --> /dev/shm/bee-root/rustc/rustc-1.23.0-0/source/src/libcore/ops/generator.rs:76:1 | 76 | / pub trait Generator { 77 | | /// The type of value this generator yields. 78 | | /// 79 | | /// This associated type corresponds to the `yield` expression and the ... | 119 | | fn resume(&mut self) -> GeneratorState<Self::Yield, Self::Return>; 120 | | } | |_^ error[E0522]: definition of an unknown language item: `generator_state`. --> /dev/shm/bee-root/rustc/rustc-1.23.0-0/source/src/libcore/ops/generator.rs:19:1 | 19 | / pub enum GeneratorState<Y, R> { 20 | | /// The generator suspended with a value. 21 | | /// 22 | | /// This state indicates that a generator has been suspended, and typically ... | 33 | | Complete(R), 34 | | } | |_^ error: aborting due to 8 previous errors Compiling std v0.0.0 (file:///dev/shm/bee-root/rustc/rustc-1.23.0-0/source/src/libstd) error: Could not compile `core`. Caused by: process didn't exit successfully: `/dev/shm/bee-root/rustc/rustc-1.23.0-0/build/build/bootstrap/debug/rustc --crate-name core /dev/shm/bee-root/rustc/rustc-1.23.0-0/source/src/libcore/lib.rs --error-format json --crate-type lib --emit=dep-info,link -C opt-level=2 -C metadata=4474a6595f5a1cf9 -C extra-filename=-4474a6595f5a1cf9 --out-dir /dev/shm/bee-root/rustc/rustc-1.23.0-0/build/build/x86_64-unknown-linux-gnu/stage0-std/x86_64-unknown-linux-gnu/release/deps --target x86_64-unknown-linux-gnu -L dependency=/dev/shm/bee-root/rustc/rustc-1.23.0-0/build/build/x86_64-unknown-linux-gnu/stage0-std/x86_64-unknown-linux-gnu/release/deps -L dependency=/dev/shm/bee-root/rustc/rustc-1.23.0-0/build/build/x86_64-unknown-linux-gnu/stage0-std/release/deps` (exit code: 101) warning: build failed, waiting for other jobs to finish... error: build failed thread 'main' panicked at 'command did not execute successfully: "/usr/bin/cargo" "build" "--target" "x86_64-unknown-linux-gnu" "--release" "--frozen" "--features" "panic-unwind jemalloc backtrace" "--manifest-path" "/dev/shm/bee-root/rustc/rustc-1.23.0-0/source/src/libstd/Cargo.toml" "--message-format" "json" expected success, got: exit code: 101', /dev/shm/bee-root/rustc/rustc-1.23.0-0/source/src/bootstrap/compile.rs:882:8 stack backtrace: 0: std::sys::imp::backtrace::tracing::imp::unwind_backtrace at /scratch/local/bee-root/rustc/rustc-1.21.0-2/source/src/libstd/sys/unix/backtrace/tracing/gcc_s.rs:49 1: std::sys_common::backtrace::_print at /scratch/local/bee-root/rustc/rustc-1.21.0-2/source/src/libstd/sys_common/backtrace.rs:71 2: std::panicking::default_hook::{{closure}} at /scratch/local/bee-root/rustc/rustc-1.21.0-2/source/src/libstd/sys_common/backtrace.rs:60 at /scratch/local/bee-root/rustc/rustc-1.21.0-2/source/src/libstd/panicking.rs:381 3: std::panicking::default_hook at /scratch/local/bee-root/rustc/rustc-1.21.0-2/source/src/libstd/panicking.rs:397 4: std::panicking::rust_panic_with_hook at /scratch/local/bee-root/rustc/rustc-1.21.0-2/source/src/libstd/panicking.rs:611 5: std::panicking::begin_panic at /scratch/local/bee-root/rustc/rustc-1.21.0-2/source/src/libstd/panicking.rs:572 6: std::panicking::begin_panic_fmt at /scratch/local/bee-root/rustc/rustc-1.21.0-2/source/src/libstd/panicking.rs:522 7: bootstrap::compile::run_cargo 8: <bootstrap::compile::Std as bootstrap::builder::Step>::run 9: bootstrap::builder::Builder::ensure 10: <bootstrap::compile::Test as bootstrap::builder::Step>::run 11: bootstrap::builder::Builder::ensure 12: <bootstrap::compile::Rustc as bootstrap::builder::Step>::run 13: bootstrap::builder::Builder::ensure 14: <bootstrap::compile::Assemble as bootstrap::builder::Step>::run 15: bootstrap::builder::Builder::ensure 16: bootstrap::builder::Builder::compiler 17: <bootstrap::compile::Assemble as bootstrap::builder::Step>::run 18: bootstrap::builder::Builder::ensure 19: bootstrap::builder::Builder::compiler 20: <bootstrap::compile::Std as bootstrap::builder::Step>::make_run 21: bootstrap::builder::StepDescription::maybe_run 22: bootstrap::builder::StepDescription::run 23: bootstrap::builder::Builder::run 24: bootstrap::Build::build 25: bootstrap::main 26: __rust_maybe_catch_panic at /scratch/local/bee-root/rustc/rustc-1.21.0-2/source/src/libpanic_unwind/lib.rs:99 27: std::rt::lang_start at /scratch/local/bee-root/rustc/rustc-1.21.0-2/source/src/libstd/panicking.rs:459 at /scratch/local/bee-root/rustc/rustc-1.21.0-2/source/src/libstd/panic.rs:361 at /scratch/local/bee-root/rustc/rustc-1.21.0-2/source/src/libstd/rt.rs:61 28: main 29: __libc_start_main at ../csu/libc-start.c:295 30: _start at ../sysdeps/x86_64/start.S:120 failed to run: /dev/shm/bee-root/rustc/rustc-1.23.0-0/build/build/bootstrap/debug/bootstrap build Build completed unsuccessfully in 0:00:43 Makefile:22: recipe for target 'all' failed make: *** [all] Error 1 

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-enhancementCategory: An issue proposing an enhancement or a PR with one.E-mediumCall for participation: Medium difficulty. Experience needed to fix: Intermediate.E-mentorCall for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.T-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions