Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bootimage instalation failure #853

Closed
VladLazar opened this issue Aug 29, 2020 · 3 comments
Closed

Bootimage instalation failure #853

VladLazar opened this issue Aug 29, 2020 · 3 comments

Comments

@VladLazar
Copy link

cargo install bootimage fails on a clean clone of the master/post-02 branch. The output is as following:

$ cargo install bootimage
Updating crates.io index
Installing bootimage v0.10.1
error: failed to compile `bootimage v0.10.1`, intermediate artifacts can be found at `/tmp/cargo-installof2Q54`

Caused by:
  -Zbuild-std requires --target

I also tried specifying the target as the error message indicates, but ran into the following issue:

$ cargo install bootimage --target x86_64-blog_os.json
   Updating crates.io index
   Installing bootimage v0.10.1
   Compiling compiler_builtins v0.1.32
   Compiling core v0.0.0 (/home/vlad/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core)
   Compiling proc-macro2 v1.0.19
   Compiling unicode-xid v0.2.1
   Compiling syn v1.0.39
   Compiling serde v1.0.115
   Compiling ryu v1.0.5
   Compiling serde_json v1.0.57
   Compiling serde_derive v1.0.115
   Compiling anyhow v1.0.32
   Compiling quote v1.0.7
   Compiling thiserror-impl v1.0.20
   Compiling rustc-std-workspace-core v1.99.0 (/home/vlad/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/rustc-std-workspace-core)
error[E0463]: can't find crate for `std`
  |
  = note: the `x86_64-blog_os-5410378892556654767` target may not be installed

error: aborting due to previous error

For more information about this error, try `rustc --explain E0463`.
error: could not compile `serde`.

To learn more, run the command again with --verbose.
warning: build failed, waiting for other jobs to finish...
error: failed to compile `bootimage v0.10.1`, intermediate artifacts can be found at `/tmp/cargo-installX2gBHB`

Caused by:
  build failed

Output of rustc -V: rustc 1.47.0-nightly (f44c6e4e2 2020-08-24).

@bjorn3
Copy link
Contributor

bjorn3 commented Aug 29, 2020

Try running cargo install bootimage from your home directory instead of the project directory.

@VladLazar
Copy link
Author

VladLazar commented Aug 29, 2020

Yep. That worked. In hindsight it makes sense to build bootimage with the native toolchain. Thanks for the help.

@phil-opp
Copy link
Owner

This is a known bug in cargo. Normally .cargo/config.toml values should be ignored for cargo install, but the [unstable] table is currently not ignored. I opened rust-lang/cargo#8656 to fix this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants