rust-based-os-comp2022 icon indicating copy to clipboard operation
rust-based-os-comp2022 copied to clipboard

第零章:实验环境配置步骤推荐

Open CelestialMelody opened this issue 2 years ago • 4 comments

推荐的步骤:

  1. Github Classroom方式进行在线OS 环境配置中的:1->2->3->4
  2. Rust 开发环境配置
    • 通过rustc --version你会发现rust应该处于nightly版本,请不要切换为stable版本,否则无法中试运行 rCore-Tutorial中执行LOG=DEBUG make run
    • 若切换为 stable 版本,请使用 rustup override set nightlyrustup default nightly切换回nightly版本
  3. Qemu 模拟器安装
  4. 此时,你的控制台显示的位置应该在/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 自动评分功能。
  5. 继续执行 cd os1LOG=DEBUG make run,试运行 rCore-Tutorial

第0章完成

CelestialMelody avatar Jul 03 '22 05:07 CelestialMelody

实验环境配置步骤推荐

CelestialMelody avatar Jul 03 '22 05:07 CelestialMelody

执行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)

dwr2001 avatar Aug 15 '22 11:08 dwr2001

太棒了 运行LOG=DEBUG make run出问题使用rustup override set nightly之后就解决了!

Rainweic avatar Aug 18 '22 04:08 Rainweic

执行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的时候也遇到了类似的问题。

Klngbob avatar Sep 09 '22 09:09 Klngbob