-
Notifications
You must be signed in to change notification settings - Fork 477
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
error[E0557]: feature has been removed #4
Comments
在 os 目录下新建一个文件 rust-toolchain ,里面写上 |
|
你好,我的环境是Ubuntu20.04,在os中加rust-toolchain这个文件了,但是make run BOARD=k210之后还是会报这样的错误 |
是需要降低 rust 版本吗 ? |
可以把 |
我是Mac。 直接去 |
在 |
遇到相同的问题了,原来有不少
|
同样的问题。版本:
操作系统为 Elementary OS @wangshangming 的方法无效 |
对rcore-os#4, 原因是MapPermission的LSB无效
问题描述使用最新的 rustc 1.57.0-nightly (f03eb6bef 2021-10-02) 编译最新的仓库代码出现许多错误(大概是该参数已被废弃),随后看 issue 使用项目中的指定版本 nightly-2021-01-30 进行编译,仍然存在 3 个错误,信息如下;LimingFang 的方法无效 [kearney@xx rCore-Tutorial-v3]$ cd os/
[kearney@xx os]$ cargo build
Compiling os v0.1.0 (/home/kearney/Documents/code/rust/rCore-Tutorial-v3/os)
error[E0432]: unresolved import `crate::config::CLOCK_FREQ`
--> src/timer.rs:3:5
|
3 | use crate::config::CLOCK_FREQ;
| ^^^^^^^^^^^^^^^^^^^^^^^^^ no `CLOCK_FREQ` in `config`
error[E0432]: unresolved import `crate::config::MMIO`
--> src/mm/memory_set.rs:17:5
|
17 | MMIO,
| ^^^^ no `MMIO` in `config`
error[E0433]: failed to resolve: use of undeclared type `BlockDeviceImpl`
--> src/drivers/block/mod.rs:15:66
|
15 | pub static ref BLOCK_DEVICE: Arc<dyn BlockDevice> = Arc::new(BlockDeviceImpl::new());
| ^^^^^^^^^^^^^^^ use of undeclared type `BlockDeviceImpl`
error: aborting due to 3 previous errors
Some errors have detailed explanations: E0432, E0433.
For more information about an error, try `rustc --explain E0432`.
error: could not compile `os`
To learn more, run the command again with --verbose. 版本信息$ rustup show
Default host: x86_64-unknown-linux-gnu
rustup home: /home/kearney/.rustup
installed toolchains
--------------------
nightly-2021-01-30-x86_64-unknown-linux-gnu (default)
nightly-x86_64-unknown-linux-gnu
installed targets for active toolchain
--------------------------------------
riscv64gc-unknown-none-elf
x86_64-unknown-linux-gnu
active toolchain
----------------
nightly-2021-01-30-x86_64-unknown-linux-gnu (overridden by '/home/kearney/Documents/code/rust/rCore-Tutorial-v3/rust-toolchain')
rustc 1.51.0-nightly (b12290861 2021-01-29) |
@BackMountainDevil 请在 |
很感谢在国庆假期收到回复,跑完回来立马开机试了一下 [kearney@xx rCore-Tutorial-v3]$ cd os/
[kearney@xx os]$ make build
(rustup target list | grep "riscv64gc-unknown-none-elf (installed)") || rustup target add riscv64gc-unknown-none-elf
riscv64gc-unknown-none-elf (installed)
cargo install cargo-binutils --vers ~0.2
Updating `git://mirrors.ustc.edu.cn/crates.io-index` index
Ignored package `cargo-binutils v0.2.0` is already installed, use --force to override
rustup component add rust-src
info: component 'rust-src' is up to date
rustup component add llvm-tools-preview
info: component 'llvm-tools-preview' for target 'x86_64-unknown-linux-gnu' is up to date
Platform: qemu
cp: 无法创建普通文件'src/linker.ld': 权限不够
make: *** [Makefile:59:kernel] 错误 1 权限不足一般加个 sudo,可是根据猜测这里不需要对系统目录做修改的 root 权限吧,我试一下加个 sudo |
加上了 sudo 出现了预想中的问题,东西都装到 root 的用户目录下了 [kearney@xx os]$ sudo make build
(rustup target list | grep "riscv64gc-unknown-none-elf (installed)") || rustup target add riscv64gc-unknown-none-elf
riscv64gc-unknown-none-elf (installed)
cargo install cargo-binutils --vers ~0.2
Updating `git://mirrors.ustc.edu.cn/crates.io-index` index
Ignored package `cargo-binutils v0.2.0` is already installed, use --force to override
rustup component add rust-src
info: component 'rust-src' is up to date
rustup component add llvm-tools-preview
info: component 'llvm-tools-preview' for target 'x86_64-unknown-linux-gnu' is up to date
Platform: qemu
Finished release [optimized] target(s) in 0.01s
make: rust-objcopy: 没有那个文件或目录
make: *** [Makefile:49:target/riscv64gc-unknown-none-elf/release/os.bin] 错误 127 |
@BackMountainDevil 应该全程不需要root权限的。最好使用一个非root用户,将 |
@wyfcyx 确实如此,根据上面的错误信息我再用普通用户去编译就会出现权限问题,把target全删了之后用普通用户在 os 下编译还是出现了上面的错误
我以为是没有生成 os.bin,确实是没有生成,但我在其它工程下(cargo build --release)生成的二进制文件就是叫做 os,然后修改了makefile 的 |
平台:WSL2
操作系统: Ubuntu18.04/Ubuntu20.04
Rust版本:rustc 1.49.0
在每次rCore-Tutorial-v3 os中进行make run时,都会提示:
error[E0557]: feature has been removed
--> src/main.rs:6:12
|
6 | #![feature(const_in_array_repeat_expressions)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ feature has been removed
|
= note: removed due to causing promotable bugs
error: aborting due to previous error
For more information about this error, try
rustc --explain E0557
.error: could not compile
os
The text was updated successfully, but these errors were encountered: