-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
error[E0463]: can't find crate for core
when cargo bootimage
#1033
Comments
Have you enabled [unstable]
build-std-features = ["compiler-builtins-mem"]
build-std = ["core", "compiler_builtins"] |
oh, my dear friend. Thank you for you advics. I follow your advics so # enabled build-std in .cargo/config.toml
$ cargo clean
$ cargo build --target x86_64-blog_os.json
warning: unused manifest key: unstable
Compiling bootloader v0.9.18
error[E0463]: can't find crate for `core`
|
= note: the `x86_64-blog_os-9626546152685556648` target may not be installed
= help: consider downloading the target with `rustup target add x86_64-blog_os-9626546152685556648`
= help: consider building the standard library from source with `cargo build -Zbuild-std`
error: aborting due to previous error
error: could not compile `bootloader`
$ cargo install cargo-xbuild
Updating `https://mirrors.tuna.tsinghua.edu.cn/git/crates.io-index.git` index
Ignored package `cargo-xbuild v0.6.5` is already installed, use --force to override
$ cargo xbuild --target x86_64-blog_os.json
Compiling core v0.0.0 (/home/kearney/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core)
Compiling compiler_builtins v0.1.46
Compiling rustc-std-workspace-core v1.99.0 (/home/kearney/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/rustc-std-workspace-core)
Compiling alloc v0.0.0 (/tmp/cargo-xbuildz13f2t)
Finished release [optimized] target(s) in 11.13s
warning: unused manifest key: unstable
Compiling bootloader v0.9.18
Compiling os v0.1.0 (/home/kearney/Documents/code/rust/os-rust/os)
Finished dev [unoptimized + debuginfo] target(s) in 0.52s
$ cargo bootimage
WARNING: `CARGO_MANIFEST_DIR` env variable not set
Building kernel
warning: unused manifest key: unstable
Compiling bootloader v0.9.18
error[E0463]: can't find crate for `core`
|
= note: the `x86_64-blog_os-9626546152685556648` target may not be installed
= help: consider downloading the target with `rustup target add x86_64-blog_os-9626546152685556648`
= help: consider building the standard library from source with `cargo build -Zbuild-std`
error: aborting due to previous error
For more information about this error, try `rustc --explain E0463`.
error: could not compile `bootloader`
To learn more, run the command again with --verbose.
Error: Kernel build failed.
Stderr: try build -Zbuild-std but failed$ cargo build -Zbuild-std
$ cargo clean
$ cargo xbuild
Finished release [optimized] target(s) in 11.39s
warning: unused manifest key: unstable
Compiling bootloader v0.9.18
Finished dev [unoptimized + debuginfo] target(s) in 0.95s
$ cargo bootimage
WARNING: `CARGO_MANIFEST_DIR` env variable not set
Building kernel
warning: unused manifest key: unstable
Compiling bootloader v0.9.18
error[E0463]: can't find crate for `core`
|
= note: the `x86_64-blog_os-9626546152685556648` target may not be installed
= help: consider downloading the target with `rustup target add x86_64-blog_os-9626546152685556648`
= help: consider building the standard library from source with `cargo build -Zbuild-std`
error: aborting due to previous error
For more information about this error, try `rustc --explain E0463`.
error: could not compile `bootloader` Then I try reinstall bootimage from home directory but got the same error. |
I will fix this someday in the future. But not now |
You have to build it with nightly channel
and then run
Done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What happened?
It got error when I run
cargo bootimage
to get an image.core
env
How that happen
I follow your blog in Chinese version.
fine
This error is the same as the blog. So it is fine
Now everyhing is ok until next step.
wrong situation
If below step work. it should not get error. So I can continue to
qemu-system-x86_64 -drive format=raw,file=bootimage-blog_os.bin
..Some solution
reinstall bootimage from your home directory
#853
turn to project dir. Not work..
emm confused
#837
#835
Does that mean use build? but belows tells it not. So I turn to the English version web. The steps is same as the Chinese version...
The text was updated successfully, but these errors were encountered: