Skip to content

rustbuild: found crate * compiled by an incompatible version of rustc #35687

Closed
@TimNN

Description

@TimNN

I regularly invoke rustbuild using python ../../rust/src/bootstrap/bootstrap.py --step check --stage 2 and often get the following (or similar) error:

error[E0514]: found crate `matches` compiled by an incompatible version of rustc
  --> /home/logic/.cargo/registry/src/github.com-1ecc6299db9ec823/idna-0.1.0/src/lib.rs:35:14
   |
35 | #[macro_use] extern crate matches;
   |              ^^^^^^^^^^^^^^^^^^^^^
   |
   = help: please recompile that crate using this compiler (rustc 1.12.0-dev (c0c9967c8 2016-08-15))
   = note: crate `matches` path #1: /home/logic/build/rust-out/dev-build/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/libmatches-5d5580ffd528031c.rlib compiled by "rustc 1.12.0-dev (bcee2edc5 2016-08-14)"

error: aborting due to previous error

error: Could not compile `idna`.

To learn more, run the command again with --verbose.


command did not execute successfully: "/home/logic/build/rust-out/dev-build/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "build" "-j" "8" "--target" "x86_64-unknown-linux-gnu" "--release" "--manifest-path" "/home/logic/build/rust/src/tools/linkchecker/Cargo.toml"
expected success, got: exit code: 101

This can easily be fixed by removing the offending deps directory but is nevertheless annoying, there's probably some cleanup not happening.

This sometimes manifest itself differently, I believe something like found multiple versions of crate log`` (I don't have the exact error at the moment, but I believe it's the same issue).

Metadata

Metadata

Assignees

No one assigned

    Labels

    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