Closed Hankappa closed 2 years ago
What command did you run that gave you that error message? What did you do to set up the environment?
sorry I see it now.
You need to remove the is_builtin
field from the aarch64-unknown-none.json
target spec file. That field is no longer allowed to be set (https://github.com/rust-lang/rust/pull/86062), so it needs to be removed if you are building the spec from --print target-spec-json
.
Closing as this isn't related to cargo. If you have further issues with getting started with some bare metal development, I suggest trying one of the user forums or chat platforms like discord.
Okay~~Many thanks for your help.
I encountered this when I tried to wasm_bindgen
a struct. It comes with this note: note: rust-lld: error: unknown file type: exp.o
Problem
Hi I following the https://lowenware.com/blog/osdev/aarch64-bare-metal-program-in-rust/ try to test aarch64 bare-metal under QEMU. Seems meet error and I can't find how to solution. (I've try a lot way from google search....)
~/.cargo/bin/aarch64-bare-metal$ rustup target add aarch64-unknown-none info: component 'rust-std' for target 'aarch64-unknown-none' is up to date ~/.cargo/bin/aarch64-bare-metal$ cargo -v xbuild --target=aarch64-unknown-none.json error: failed to run
rustc
to learn about target-specific informationCaused by: process didn't exit successfully:
rustc - --crate-name ___ --print=file-names -Cembed-bitcode=yes --target /home/hank/.cargo/bin/aarch64-bare-metal/aarch64-unknown-none.json --crate-type bin --crate-type rlib --crate-type dylib --crate-type cdylib --crate-type staticlib --crate-type proc-macro --print=sysroot --print=cfg
(exit status: 1) --- stderr error: Error loading target specification: may not set is_builtin for targets not built-in. Runrustc --print target-list
for a list of built-in targetserror:
"/home/hank/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin/cargo" "rustc" "-p" "alloc" "--release" "--manifest-path" "/tmp/cargo-xbuildsuBC5o/Cargo.toml" "--target" "aarch64-unknown-none.json" "--" "-Z" "force-unstable-if-unmarked"
failed with exit code: Some(101)Steps
No response
Possible Solution(s)
No response
Notes
No response
Version