Open 1inguini opened 5 years ago
It seems that the point is that I can't compile the core.
This is a duplicate of #128
It does not look like a duplicate. I can compile core crate after the patches in #128. But the build does not continue since it cannot find compiler_builtins:
> rustup run avr-toolchain xargo build --target avr-atmega328p --release --verbose
+ "rustc" "--print" "sysroot"
+ "rustc" "--print" "target-list"
+ RUSTFLAGS="--sysroot /home/peter/.xargo -Z force-unstable-if-unmarked"
+ "cargo" "build" "--release" "--manifest-path" "/tmp/xargo.hFrKDxzhtuuu/Cargo.toml" "--target" "avr-atmega328p" "-v" "-p" "core"
Compiling core v0.0.0 (/home/peter/rust/rust/src/libcore)
Running `rustc --crate-name core /home/peter/rust/rust/src/libcore/lib.rs --color never --crate-type lib --emit=dep-info,link -C opt-level=3 -C metadata=f7a2b86276dfcf90 -C extra-filename=-f7a2b86276dfcf90 --out-dir /tmp/xargo.hFrKDxzhtuuu/target/avr-atmega328p/release/deps --target avr-atmega328p -L dependency=/tmp/xargo.hFrKDxzhtuuu/target/avr-atmega328p/release/deps -L dependency=/tmp/xargo.hFrKDxzhtuuu/target/release/deps --sysroot /home/peter/.xargo -Z force-unstable-if-unmarked`
Finished release [optimized] target(s) in 26.38s
+ RUSTFLAGS="--sysroot /home/peter/.xargo -Z force-unstable-if-unmarked"
+ "cargo" "build" "--release" "--manifest-path" "/tmp/xargo.QQRqXfptYN1G/Cargo.toml" "--target" "avr-atmega328p" "-v" "-p" "compiler_builtins"
error: failed to load source for a dependency on `compiler_builtins`
Caused by:
Unable to update /home/peter/rust/rust/src/libcompiler_builtins
Caused by:
failed to read `/home/peter/rust/rust/src/libcompiler_builtins/Cargo.toml`
Caused by:
No such file or directory (os error 2)
error: `"cargo" "build" "--release" "--manifest-path" "/tmp/xargo.QQRqXfptYN1G/Cargo.toml" "--target" "avr-atmega328p" "-v" "-p" "compiler_builtins"` failed with exit code: Some(101)
note: run with `RUST_BACKTRACE=1` for a backtrace
When I try to compile compiler_builtins from https://github.com/rust-lang-nursery/compiler-builtins then it failes because of std crate:
> rustup run avr-toolchain cargo xbuild --target avr-atmega328p --release --verbose
+ "rustc" "--print" "sysroot"
+ "rustc" "--print" "target-list"
+ "/home/peter/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/cargo" "rustc" "-p" "alloc" "--release" "--manifest-path" "/tmp/xargo.jZbhk82SGOoA/Cargo.toml" "--target" "avr-atmega328p" "-v" "--" "-Z" "force-unstable-if-unmarked"
Updating crates.io index
Compiling compiler_builtins v0.1.10
Compiling core v0.0.0 (/home/peter/rust/rust/src/libcore)
Running `rustc --crate-name build_script_build /home/peter/.cargo/registry/src/github.com-1ecc6299db9ec823/compiler_builtins-0.1.10/build.rs --color never --crate-type bin --emit=dep-info,link -C opt-level=3 --cfg 'feature="compiler-builtins"' --cfg 'feature="core"' --cfg 'feature="default"' --cfg 'feature="mem"' -C metadata=33773de8e1bd096a -C extra-filename=-33773de8e1bd096a --out-dir /tmp/xargo.jZbhk82SGOoA/target/release/build/compiler_builtins-33773de8e1bd096a -L dependency=/tmp/xargo.jZbhk82SGOoA/target/release/deps --cap-lints allow`
Running `rustc --crate-name core /home/peter/rust/rust/src/libcore/lib.rs --color never --crate-type lib --emit=dep-info,link -C opt-level=3 -C panic=abort -C metadata=93e18af0685e765c -C extra-filename=-93e18af0685e765c --out-dir /tmp/xargo.jZbhk82SGOoA/target/avr-atmega328p/release/deps --target avr-atmega328p -L dependency=/tmp/xargo.jZbhk82SGOoA/target/avr-atmega328p/release/deps -L dependency=/tmp/xargo.jZbhk82SGOoA/target/release/deps`
error[E0463]: can't find crate for `std`
error: aborting due to previous error
For more information about this error, try `rustc --explain E0463`.
error: Could not compile `compiler_builtins`.
Caused by:
process didn't exit successfully: `rustc --crate-name build_script_build /home/peter/.cargo/registry/src/github.com-1ecc6299db9ec823/compiler_builtins-0.1.10/build.rs --color never --crate-type bin --emit=dep-info,link -C opt-level=3 --cfg 'feature="compiler-builtins"' --cfg 'feature="core"' --cfg 'feature="default"' --cfg 'feature="mem"' -C metadata=33773de8e1bd096a -C extra-filename=-33773de8e1bd096a --out-dir /tmp/xargo.jZbhk82SGOoA/target/release/build/compiler_builtins-33773de8e1bd096a -L dependency=/tmp/xargo.jZbhk82SGOoA/target/release/deps --cap-lints allow` (exit code: 1)
warning: build failed, waiting for other jobs to finish...
error: build failed
error: `"/home/peter/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/cargo" "rustc" "-p" "alloc" "--release" "--manifest-path" "/tmp/xargo.jZbhk82SGOoA/Cargo.toml" "--target" "avr-atmega328p" "-v" "--" "-Z" "force-unstable-if-unmarked"` failed with exit code: Some(101)
note: run with `RUST_BACKTRACE=1` for a backtrace
What is the point that some kind of compiler_builtins (which is supposed some kind of very low level stuff to avoid dependency on C runtime) depends on std crate? And what is the correct way to build blink at all?
the shell I am using is
fish, version 3.0.1
, the directory I installed avr-rust is$HOME/.avr-rust/
. versions of rustup and xargo are:I tried to build blink, only to get this error.
When I use cargo xbuild instead of
xargo build
, the error changes to this: