rust-based-os-comp2022
rust-based-os-comp2022 copied to clipboard
第零章:实验环境配置步骤推荐
推荐的步骤:
- Github Classroom方式进行在线OS 环境配置中的:1->2->3->4
-
Rust 开发环境配置
- 通过
rustc --version
你会发现rust应该处于nightly版本,请不要切换为stable版本,否则无法中试运行 rCore-Tutorial中执行LOG=DEBUG make run
- 若切换为 stable 版本,请使用
rustup override set nightly
与rustup default nightly
切换回nightly版本
- 通过
- Qemu 模拟器安装
- 此时,你的控制台显示的位置应该在
/workspaces/lab0-0-setup-env-run-os1-你的github名
- 如果你是使用github的 codespace,请不要执行试运行 rCore-Tutorial中的
git clone https://github.com/LearningOS/rust-based-os-comp2022.git
,因为你已经clone到codeplace环境 - 可以直接执行
make setupclassroom_testX
(该命令仅执行一次,X的范围为 1-8)配置githubclassroom 自动评分功能。
- 如果你是使用github的 codespace,请不要执行试运行 rCore-Tutorial中的
- 继续执行
cd os1
与LOG=DEBUG make run
,试运行 rCore-Tutorial
第0章完成
实验环境配置步骤推荐
执行cargo install cargo-binutils --vers ~0.2
时报错,报错信息显示
= note: see issue #64926 <https://github.com/rust-lang/rust/issues/64926> for more information
= help: add `#![feature(const_extern_fn)]` to the crate attributes to enable
= note: this error originates in the macro `safe_f` (in Nightly builds, run with -Z macro-backtrace for more info)
For more information about this error, try `rustc --explain E0658`.
error: could not compile `libc` due to 2 previous errors
warning: build failed, waiting for other jobs to finish...
error: failed to compile `cargo-binutils v0.2.0`, intermediate artifacts can be found at `/tmp/cargo-install3FQXyF`
make[1]: *** [Makefile:26: env] Error 101
make[1]: Leaving directory '/workspaces/lab0-0-setup-env-run-os1-dwr2001/os1'
似乎是库出现冲突么?rust版本为rustc 1.62.0-nightly (1f7fb6413 2022-04-10)
太棒了 运行LOG=DEBUG make run
出问题使用rustup override set nightly
之后就解决了!
执行
cargo install cargo-binutils --vers ~0.2
时报错,报错信息显示= note: see issue #64926 <https://github.com/rust-lang/rust/issues/64926> for more information = help: add `#![feature(const_extern_fn)]` to the crate attributes to enable = note: this error originates in the macro `safe_f` (in Nightly builds, run with -Z macro-backtrace for more info) For more information about this error, try `rustc --explain E0658`. error: could not compile `libc` due to 2 previous errors warning: build failed, waiting for other jobs to finish... error: failed to compile `cargo-binutils v0.2.0`, intermediate artifacts can be found at `/tmp/cargo-install3FQXyF` make[1]: *** [Makefile:26: env] Error 101 make[1]: Leaving directory '/workspaces/lab0-0-setup-env-run-os1-dwr2001/os1'
似乎是库出现冲突么?rust版本为
rustc 1.62.0-nightly (1f7fb6413 2022-04-10)
请问这个问题你解决了吗,我执行LOG=DEBUG make run的时候也遇到了类似的问题。