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

[Add] first barematal os for print. #1

Merged
merged 1 commit into from
Aug 1, 2024
Merged

[Add] first barematal os for print. #1

merged 1 commit into from
Aug 1, 2024

Conversation

JinnanChen1211
Copy link
Owner

@JinnanChen1211 JinnanChen1211 commented Aug 1, 2024

Test steps:

1. cargo install bootimage
2. cargo install cargo-xbuild
3. cargo xbuild --target x86_64-cjn_os.json
4. rustup component add llvm-tools-preview
5. cargo bootimage
6. qemu-system-x86_64 -drive format=raw,file=./target/x86_64-cjn_os/debug/bootimage-cjn-os.bin

image

编译有一个问题:

error[E0464]: multiple candidates for `rmeta` dependency `core` found
 --> /home/rlk/.rustup/toolchains/nightly-2023-06-19-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/rustc-std-workspace-core/lib.rs:4:9
  |
4 | pub use core::*;
  |         ^^^^
  |
  = note: candidate #1: /tmp/cargo-xbuildCn29op/target/x86_64-cjn_os/release/deps/libcore-fa72666d8cd3101a.rmeta
  = note: candidate #2: /tmp/cargo-xbuildCn29op/target/x86_64-cjn_os/release/deps/libcore-4192cf337c736b44.rmeta

For more information about this error, try `rustc --explain E0464`.
error: could not compile `rustc-std-workspace-core` (lib) due to previous error
warning: build failed, waiting for other jobs to finish...

解决办法:

#  you should not add compiler_builtins as dependency yourself. cargo will build it automatically for you.
# https://github.com/rust-lang/compiler-builtins/issues/334
# [unstable]
# build-std = ["core", "compiler_builtins"]
# build-std-features = ["compiler-builtins-mem"]

@JinnanChen1211 JinnanChen1211 merged commit 353d9e0 into main Aug 1, 2024
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

Successfully merging this pull request may close these issues.

1 participant