xargo
xargo copied to clipboard
Failed to load source for a dependency on `compiler_builtins`
I believe my xargo is fully updated, and yet while trying to build a small no-std binary it fails. I was trying to build a custom target, but also find that it fails for the builtin host target. From looking through the issues this looks similar to the failures that were fixed by 0.3.13…
Version:
$ xargo --version
xargo 0.3.13
cargo 1.33.0-nightly (2b4a5f1f0 2019-01-12)
Failing case:
$ xargo build --target x86_64-apple-darwin
warning: Patch `rustc-std-workspace-core v1.0.0 (/Users/c/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/src/rust/src/tools/rustc-std-workspace-core)` was not used in the crate graph.
Check that the patched package version and available features are compatible
with the dependency requirements. If the patch has a different version from
what is locked in the Cargo.lock file, run `cargo update` to use the new
version. This may also occur with an optional dependency that is not enabled.
Compiling core v0.0.0 (/Users/c/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/src/rust/src/libcore)
Finished release [optimized] target(s) in 31.54s
error: failed to load source for a dependency on `compiler_builtins`
Caused by:
Unable to update /Users/c/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/src/rust/src/libcompiler_builtins
Caused by:
failed to read `/Users/c/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/src/rust/src/libcompiler_builtins/Cargo.toml`
Caused by:
No such file or directory (os error 2)
error: `"cargo" "build" "--release" "--manifest-path" "/var/folders/6f/l9rcfr1d2s55xy9vd6rtnvv00000gn/T/xargo.9N6Ub5sxQilY/Cargo.toml" "--target" "x86_64-apple-darwin" "-p" "compiler_builtins"` failed with exit code: Some(101)
note: run with `RUST_BACKTRACE=1` for a backtrace
I am hitting the same issue when I am compiling arm-none-eabi
Have you tried switching to cargo-xbuild? Not a bugfix but a workaround, seeing that xargo is in maintenance mode.
I was hit with this issue while compiling a project to a freestanding binary. I fixed it by force updating cargo-xbuild with cargo install cargo-xbuild --force