Open LyricZhao opened 4 years ago
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)
和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
@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)]
就可以了
@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
问题解决了么
在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 在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 在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 在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到本地后,就可以正常跑了
执行代码为什么会跟代理有关系。
或者你在你直接把包放到根目录下试试
重启了一下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
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
https://rcore-os.github.io/rCore-Tutorial-deploy/docs/pre-lab/env.html