rcore-os / rCore-Tutorial-deploy

Tutorial Doc for rCore OS step by step (3rd edition)
https://rcore-os.github.io/rCore-Tutorial-deploy/
GNU General Public License v3.0
3 stars 1 forks source link

环境部署 · GitBook #21

Open LyricZhao opened 4 years ago

LyricZhao commented 4 years ago

https://rcore-os.github.io/rCore-Tutorial-deploy/docs/pre-lab/env.html

BraveY commented 3 years ago

make run 执行失败

error[E0658]: use of unstable library feature 'renamed_spin_loop'
 --> /home/bravey/.cargo/git/checkouts/virtio-drivers-4fdfaa862bcdc399/2b3c6cf/src/blk.rs:6:5
  |
6 | use core::hint::spin_loop;
  |     ^^^^^^^^^^^^^^^^^^^^^
  |
  = note: see issue #55002 <https://github.com/rust-lang/rust/issues/55002> for more information
  = help: add `#![feature(renamed_spin_loop)]` to the crate attributes to enable

环境

按照文档依序执行 wsl 2

  NAME                  STATE           VERSION
* Ubuntu-18.04          Running         2
bravey@DESKTOP-DE7B2BG:~/rCore-Tutorial/os/src$ rustc --version
rustc 1.46.0-nightly (7750c3d46 2020-06-26)
ghost commented 3 years ago

和BraveY的问题一样

make run
    Finished dev [unoptimized + debuginfo] target(s) in 0.02s
Targets: hello_world notebook
Image resized.
   Compiling virtio-drivers v0.1.0 (https://github.com/rcore-os/virtio-drivers#2b3c6cfd)
error[E0658]: use of unstable library feature 'renamed_spin_loop'
 --> /Users/steve/.cargo/git/checkouts/virtio-drivers-4fdfaa862bcdc399/2b3c6cf/src/blk.rs:5:5
  |
5 | use core::hint::spin_loop;
  |     ^^^^^^^^^^^^^^^^^^^^^
  |
  = note: see issue #55002 <https://github.com/rust-lang/rust/issues/55002> for more information
  = help: add `#![feature(renamed_spin_loop)]` to the crate attributes to enable

error[E0658]: use of unstable library feature 'renamed_spin_loop'
  --> /Users/steve/.cargo/git/checkouts/virtio-drivers-4fdfaa862bcdc399/2b3c6cf/src/blk.rs:65:13
   |
65 |             spin_loop();
   |             ^^^^^^^^^
   |
   = note: see issue #55002 <https://github.com/rust-lang/rust/issues/55002> for more information
   = help: add `#![feature(renamed_spin_loop)]` to the crate attributes to enable

error[E0658]: use of unstable library feature 'renamed_spin_loop'
  --> /Users/steve/.cargo/git/checkouts/virtio-drivers-4fdfaa862bcdc399/2b3c6cf/src/blk.rs:86:13
   |
86 |             spin_loop();
   |             ^^^^^^^^^
   |
   = note: see issue #55002 <https://github.com/rust-lang/rust/issues/55002> for more information
   = help: add `#![feature(renamed_spin_loop)]` to the crate attributes to enable

error[E0658]: use of unstable library feature 'renamed_spin_loop'
 --> /Users/steve/.cargo/git/checkouts/virtio-drivers-4fdfaa862bcdc399/2b3c6cf/src/gpu.rs:4:5
  |
4 | use core::hint::spin_loop;
  |     ^^^^^^^^^^^^^^^^^^^^^
  |
  = note: see issue #55002 <https://github.com/rust-lang/rust/issues/55002> for more information
  = help: add `#![feature(renamed_spin_loop)]` to the crate attributes to enable

error[E0658]: use of unstable library feature 'renamed_spin_loop'
   --> /Users/steve/.cargo/git/checkouts/virtio-drivers-4fdfaa862bcdc399/2b3c6cf/src/gpu.rs:158:13
    |
158 |             spin_loop();
    |             ^^^^^^^^^
    |
    = note: see issue #55002 <https://github.com/rust-lang/rust/issues/55002> for more information
    = help: add `#![feature(renamed_spin_loop)]` to the crate attributes to enable

error[E0658]: use of unstable library feature 'renamed_spin_loop'
 --> /Users/steve/.cargo/git/checkouts/virtio-drivers-4fdfaa862bcdc399/2b3c6cf/src/net.rs:4:5
  |
4 | use core::hint::spin_loop;
  |     ^^^^^^^^^^^^^^^^^^^^^
  |
  = note: see issue #55002 <https://github.com/rust-lang/rust/issues/55002> for more information
  = help: add `#![feature(renamed_spin_loop)]` to the crate attributes to enable

error[E0658]: use of unstable library feature 'renamed_spin_loop'
  --> /Users/steve/.cargo/git/checkouts/virtio-drivers-4fdfaa862bcdc399/2b3c6cf/src/net.rs:77:13
   |
77 |             spin_loop();
   |             ^^^^^^^^^
   |
   = note: see issue #55002 <https://github.com/rust-lang/rust/issues/55002> for more information
   = help: add `#![feature(renamed_spin_loop)]` to the crate attributes to enable

error[E0658]: use of unstable library feature 'renamed_spin_loop'
  --> /Users/steve/.cargo/git/checkouts/virtio-drivers-4fdfaa862bcdc399/2b3c6cf/src/net.rs:91:13
   |
91 |             spin_loop();
   |             ^^^^^^^^^
   |
   = note: see issue #55002 <https://github.com/rust-lang/rust/issues/55002> for more information
   = help: add `#![feature(renamed_spin_loop)]` to the crate attributes to enable

error: aborting due to 8 previous errors

For more information about this error, try `rustc --explain E0658`.
error: could not compile `virtio-drivers`.

To learn more, run the command again with --verbose.
make[1]: *** [kernel] Error 101
make: *** [run] Error 2
Tiptiks commented 3 years ago

@BraveY

make run 执行失败

error[E0658]: use of unstable library feature 'renamed_spin_loop'
 --> /home/bravey/.cargo/git/checkouts/virtio-drivers-4fdfaa862bcdc399/2b3c6cf/src/blk.rs:6:5
  |
6 | use core::hint::spin_loop;
  |     ^^^^^^^^^^^^^^^^^^^^^
  |
  = note: see issue #55002 <https://github.com/rust-lang/rust/issues/55002> for more information
  = help: add `#![feature(renamed_spin_loop)]` to the crate attributes to enable

环境

按照文档依序执行 wsl 2

  NAME                  STATE           VERSION
* Ubuntu-18.04          Running         2
bravey@DESKTOP-DE7B2BG:~/rCore-Tutorial/os/src$ rustc --version
rustc 1.46.0-nightly (7750c3d46 2020-06-26)
vim /Users/steve/.cargo/git/checkouts/virtio-drivers-4fdfaa862bcdc399/2b3c6cf/src/lib.rs

修改这个crate, 在lib.rs里添加 #![feature(renamed_spin_loop)] 就可以了

yang951103 commented 3 years ago

@primeNumberAndMe 和BraveY的问题一样

make run
    Finished dev [unoptimized + debuginfo] target(s) in 0.02s
Targets: hello_world notebook
Image resized.
   Compiling virtio-drivers v0.1.0 (https://github.com/rcore-os/virtio-drivers#2b3c6cfd)
error[E0658]: use of unstable library feature 'renamed_spin_loop'
 --> /Users/steve/.cargo/git/checkouts/virtio-drivers-4fdfaa862bcdc399/2b3c6cf/src/blk.rs:5:5
  |
5 | use core::hint::spin_loop;
  |     ^^^^^^^^^^^^^^^^^^^^^
  |
  = note: see issue #55002 <https://github.com/rust-lang/rust/issues/55002> for more information
  = help: add `#![feature(renamed_spin_loop)]` to the crate attributes to enable

error[E0658]: use of unstable library feature 'renamed_spin_loop'
  --> /Users/steve/.cargo/git/checkouts/virtio-drivers-4fdfaa862bcdc399/2b3c6cf/src/blk.rs:65:13
   |
65 |             spin_loop();
   |             ^^^^^^^^^
   |
   = note: see issue #55002 <https://github.com/rust-lang/rust/issues/55002> for more information
   = help: add `#![feature(renamed_spin_loop)]` to the crate attributes to enable

error[E0658]: use of unstable library feature 'renamed_spin_loop'
  --> /Users/steve/.cargo/git/checkouts/virtio-drivers-4fdfaa862bcdc399/2b3c6cf/src/blk.rs:86:13
   |
86 |             spin_loop();
   |             ^^^^^^^^^
   |
   = note: see issue #55002 <https://github.com/rust-lang/rust/issues/55002> for more information
   = help: add `#![feature(renamed_spin_loop)]` to the crate attributes to enable

error[E0658]: use of unstable library feature 'renamed_spin_loop'
 --> /Users/steve/.cargo/git/checkouts/virtio-drivers-4fdfaa862bcdc399/2b3c6cf/src/gpu.rs:4:5
  |
4 | use core::hint::spin_loop;
  |     ^^^^^^^^^^^^^^^^^^^^^
  |
  = note: see issue #55002 <https://github.com/rust-lang/rust/issues/55002> for more information
  = help: add `#![feature(renamed_spin_loop)]` to the crate attributes to enable

error[E0658]: use of unstable library feature 'renamed_spin_loop'
   --> /Users/steve/.cargo/git/checkouts/virtio-drivers-4fdfaa862bcdc399/2b3c6cf/src/gpu.rs:158:13
    |
158 |             spin_loop();
    |             ^^^^^^^^^
    |
    = note: see issue #55002 <https://github.com/rust-lang/rust/issues/55002> for more information
    = help: add `#![feature(renamed_spin_loop)]` to the crate attributes to enable

error[E0658]: use of unstable library feature 'renamed_spin_loop'
 --> /Users/steve/.cargo/git/checkouts/virtio-drivers-4fdfaa862bcdc399/2b3c6cf/src/net.rs:4:5
  |
4 | use core::hint::spin_loop;
  |     ^^^^^^^^^^^^^^^^^^^^^
  |
  = note: see issue #55002 <https://github.com/rust-lang/rust/issues/55002> for more information
  = help: add `#![feature(renamed_spin_loop)]` to the crate attributes to enable

error[E0658]: use of unstable library feature 'renamed_spin_loop'
  --> /Users/steve/.cargo/git/checkouts/virtio-drivers-4fdfaa862bcdc399/2b3c6cf/src/net.rs:77:13
   |
77 |             spin_loop();
   |             ^^^^^^^^^
   |
   = note: see issue #55002 <https://github.com/rust-lang/rust/issues/55002> for more information
   = help: add `#![feature(renamed_spin_loop)]` to the crate attributes to enable

error[E0658]: use of unstable library feature 'renamed_spin_loop'
  --> /Users/steve/.cargo/git/checkouts/virtio-drivers-4fdfaa862bcdc399/2b3c6cf/src/net.rs:91:13
   |
91 |             spin_loop();
   |             ^^^^^^^^^
   |
   = note: see issue #55002 <https://github.com/rust-lang/rust/issues/55002> for more information
   = help: add `#![feature(renamed_spin_loop)]` to the crate attributes to enable

error: aborting due to 8 previous errors

For more information about this error, try `rustc --explain E0658`.
error: could not compile `virtio-drivers`.

To learn more, run the command again with --verbose.
make[1]: *** [kernel] Error 101
make: *** [run] Error 2

问题解决了么

beinglida commented 3 years ago

在macos上使用github desktop,直接clone,会出现跟BraveY一样的错误;复制终端代理命令(临时), 如下:(不同的代理客户端会有不同的端口号)

export https_proxy=http://127.0.0.1:7890 http_proxy=http://127.0.0.1:7890 all_proxy=socks5://127.0.0.1:7890 , 然后clone到本地后,就可以正常跑了

yang951103 commented 3 years ago

@beinglida 在macos上使用github desktop,直接clone,会出现跟BraveY一样的错误;复制终端代理命令(临时), 如下:(不同的代理客户端会有不同的端口号)

export https_proxy=http://127.0.0.1:7890 http_proxy=http://127.0.0.1:7890 all_proxy=socks5://127.0.0.1:7890 , 然后clone到本地后,就可以正常跑了

执行代码为什么会跟代理有关系。

beinglida commented 3 years ago

@beinglida 在macos上使用github desktop,直接clone,会出现跟BraveY一样的错误;复制终端代理命令(临时), 如下:(不同的代理客户端会有不同的端口号) export https_proxy=http://127.0.0.1:7890 http_proxy=http://127.0.0.1:7890 all_proxy=socks5://127.0.0.1:7890 , 然后clone到本地后,就可以正常跑了

执行代码为什么会跟代理有关系。

可能路径等配置未完善?需要用terminal clone到本地根目录才能跑起来

beinglida commented 3 years ago

@beinglida 在macos上使用github desktop,直接clone,会出现跟BraveY一样的错误;复制终端代理命令(临时), 如下:(不同的代理客户端会有不同的端口号) export https_proxy=http://127.0.0.1:7890 http_proxy=http://127.0.0.1:7890 all_proxy=socks5://127.0.0.1:7890 , 然后clone到本地后,就可以正常跑了

执行代码为什么会跟代理有关系。

或者你在你直接把包放到根目录下试试

EthantLu commented 3 years ago

重启了一下WSL,竟然出现下面的情况: mckinleylu@DESKTOP-MV49E0V:~/OS/rCore-Tutorial$ make run make[1]: Entering directory '/home/mckinleylu/OS/rCore-Tutorial/user' Installing rcore-fs-fuse make[1]: cargo: Command not found make[1]: [Makefile:23: dependency] Error 127 make[1]: Leaving directory '/home/mckinleylu/OS/rCore-Tutorial/user' make: [Makefile:2: run] Error 2 mckinleylu@DESKTOP-MV49E0V:~/OS/rCore-Tutorial$ git checkout master Already on 'master' Your branch is up to date with 'origin/master'. mckinleylu@DESKTOP-MV49E0V:~/OS/rCore-Tutorial$ rustup target add riscv64imac-unknown-none-elf rustup: command not found mckinleylu@DESKTOP-MV49E0V:~/OS/rCore-Tutorial$ cargo install cargo-binutils

Command 'cargo' not found, but can be installed with:

sudo apt install cargo

mckinleylu@DESKTOP-MV49E0V:~/OS/rCore-Tutorial$ rustup component add llvm-tools-preview rustup: command not found

ekonwang commented 3 years ago

Targets: notebook hello_world Image resized. make[1]: Leaving directory '/home/ubuntu/github/rCore-Tutorial/user' make[1]: Entering directory '/home/ubuntu/github/rCore-Tutorial/os' Compiling virtio-drivers v0.1.0 (https://github.com/rcore-os/virtio-drivers#2b3c6cfd) Compiling buddy_system_allocator v0.4.0 Compiling hashbrown v0.8.2 Compiling regex v1.5.4 Compiling bare-metal v0.2.5 Compiling riscv-target v0.1.2 Compiling riscv v0.6.0 (https://github.com/rcore-os/riscv#b6c469f0) Compiling os v0.1.0 (/home/ubuntu/github/rCore-Tutorial/os) Finished dev [unoptimized + debuginfo] target(s) in 15.63s Failed to execute tool: objcopy No such file or directory (os error 2) Makefile:28: recipe for target 'target/riscv64imac-unknown-none-elf/debug/kernel.bin' failed make[1]: [target/riscv64imac-unknown-none-elf/debug/kernel.bin] Error 101 make[1]: Leaving directory '/home/ubuntu/github/rCore-Tutorial/os' Makefile:2: recipe for target 'run' failed make: [run] Error 2