oscourse-tsinghua / rcore_plus

Rust version of THU uCore OS. Linux compatible.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

user: compiling error

chyyuu opened this issue · comments

in rcore_plus/user
'RUST_BACKTRACE=1 make sfsimg arch=x86_64'
got error:

make[1]: Leaving directory '/media/chyyuu/chydata/thecode/rust-related/mytest/rcore_plus/user/biscuit/build'
mksfs zip build/x86_64 build/x86_64.img
thread 'main' panicked at 'no space', src/libcore/option.rs:1008:5
stack backtrace:
   0: std::sys::unix::backtrace::tracing::imp::unwind_backtrace
             at src/libstd/sys/unix/backtrace/tracing/gcc_s.rs:49
   1: std::sys_common::backtrace::_print
             at src/libstd/sys_common/backtrace.rs:71
   2: std::panicking::default_hook::{{closure}}
             at src/libstd/sys_common/backtrace.rs:59
             at src/libstd/panicking.rs:211
   3: std::panicking::default_hook
             at src/libstd/panicking.rs:227
   4: std::panicking::rust_panic_with_hook
             at src/libstd/panicking.rs:491
   5: std::panicking::continue_panic_fmt
             at src/libstd/panicking.rs:398
   6: rust_begin_unwind
             at src/libstd/panicking.rs:325
   7: core::panicking::panic_fmt
             at src/libcore/panicking.rs:95
   8: core::option::expect_failed
             at src/libcore/option.rs:1008
   9: simple_filesystem::sfs::INodeImpl::_resize
  10: mksfs::zip_dir
  11: mksfs::zip_dir
  12: mksfs::main
  ...
  19: _start
Makefile:60: recipe for target 'build/x86_64.img' failed
make: *** [build/x86_64.img] Error 101

and I found the error was from mksfs.

mksfs zip build/x86_64 build/x86_64.img

How to fix it?

ANSWER: update mksfs

git clone https://github.com/wangrunji0408/rcore-fs.git
cd rcore-fs/
cargo build --bin mksfs --features=std
cp target/debug/mksfs ~/.cargo/bin/
cd ../../kernel
make run arch=x86_64

OK!!!

mksfs can be installed by cargo, one command is enough:

cargo install --git https://github.com/wangrunji0408/rcore-fs --features="std" --force