japaric / xargo

The sysroot manager that lets you build and customize `std`
Apache License 2.0
1.1k stars 93 forks source link

cargo install xargo failed to comple xargo #210

Open janus opened 6 years ago

janus commented 6 years ago

Failed to install xargo :: cargo install xargo

error[E0432]: unresolved importtoml::Value --> src/cargo.rs:7:5 | 7 | use toml::Value; | ^^^^^^^^^^^ noValue` in the root

error[E0432]: unresolved import toml::Table --> src/sysroot.rs:11:12 | 11 | use toml::{Table, Value}; | ^^^^^ no Table in the root

error[E0432]: unresolved import toml::Value --> src/sysroot.rs:11:19 | 11 | use toml::{Table, Value}; | ^^^^^ no Value in the root

error[E0432]: unresolved import toml::Parser --> src/util.rs:6:12 | 6 | use toml::{Parser, Value}; | ^^^^^^ no Parser in the root

error[E0432]: unresolved import toml::Value --> src/util.rs:6:20 | 6 | use toml::{Parser, Value}; | ^^^^^ no Value in the root

error[E0432]: unresolved import toml::Value --> src/xargo.rs:6:5 | 6 | use toml::Value; | ^^^^^^^^^^^ no Value in the root

error: aborting due to 6 previous errors

For more information about this error, try rustc --explain E0432. error: failed to compile xargo v0.3.11, intermediate artifacts can be found at /tmp/cargo-install.CezrrHXPt3M6

Caused by: Could not compile xargo. `

japaric commented 6 years ago

That's ... weird. cargo install works me. What version of the toml crate is Cargo picking? On what host (Linux, Windows, etc.) are you running this? As per the output below my build is using toml v0.2.1

$ cargo install xargo
    Updating registry `https://github.com/rust-lang/crates.io-index`
  Installing xargo v0.3.11
   Compiling cc v1.0.9
   Compiling libc v0.2.40
   Compiling cfg-if v0.1.2
   Compiling rustc-demangle v0.1.7
   Compiling num-traits v0.2.2
   Compiling dtoa v0.2.2
   Compiling semver v0.1.20
   Compiling same-file v0.1.3
   Compiling itoa v0.1.1
   Compiling serde v0.8.23
   Compiling remove_dir_all v0.5.0
   Compiling rustc-serialize v0.3.24
   Compiling xargo v0.3.11
   Compiling walkdir v1.0.7
   Compiling rand v0.4.2
   Compiling fs2 v0.4.3
   Compiling num-traits v0.1.43
   Compiling rustc_version v0.1.7
   Compiling tempdir v0.3.7
   Compiling serde_json v0.8.6
   Compiling backtrace-sys v0.1.16
   Compiling toml v0.2.1
   Compiling backtrace v0.3.5
   Compiling error-chain v0.7.2
    Finished release [optimized] target(s) in 17.61 secs
  Installing /home/japaric/.cargo/bin/xargo
janus commented 6 years ago

[dependencies.toml] version = "0.2.1"

My box is Ubuntu/Linux

On Tue, Apr 3, 2018, 9:21 AM Jorge Aparicio notifications@github.com wrote:

That's ... weird. cargo install works me. What version of the toml crate is Cargo picking? On what host (Linux, Windows, etc.) are you running this? As per the output below my build is using toml v0.2.1

$ cargo install xargo Updating registry https://github.com/rust-lang/crates.io-index https://github.com/rust-lang/crates.io-index Installing xargo v0.3.11 Compiling cc v1.0.9 Compiling libc v0.2.40 Compiling cfg-if v0.1.2 Compiling rustc-demangle v0.1.7 Compiling num-traits v0.2.2 Compiling dtoa v0.2.2 Compiling semver v0.1.20 Compiling same-file v0.1.3 Compiling itoa v0.1.1 Compiling serde v0.8.23 Compiling remove_dir_all v0.5.0 Compiling rustc-serialize v0.3.24 Compiling xargo v0.3.11 Compiling walkdir v1.0.7 Compiling rand v0.4.2 Compiling fs2 v0.4.3 Compiling num-traits v0.1.43 Compiling rustc_version v0.1.7 Compiling tempdir v0.3.7 Compiling serde_json v0.8.6 Compiling backtrace-sys v0.1.16 Compiling toml v0.2.1 Compiling backtrace v0.3.5 Compiling error-chain v0.7.2 Finished release [optimized] target(s) in 17.61 secs Installing /home/japaric/.cargo/bin/xargo

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/japaric/xargo/issues/210#issuecomment-378168681, or mute the thread https://github.com/notifications/unsubscribe-auth/AAAaRnW1UAM--_OffbEw9ghOEedgkt14ks5tkzEIgaJpZM4TEnsU .

japaric commented 6 years ago

No idea then. The only thing that ocurrs to me is that you may have set a global Cargo [replace] to replace toml v0.2.1 with some other (local) version but that seems unlikely?