Working on Stanford’s CS140e on my free-time I’m running into some issues compiling my kernel for the first time. Many of the issues seem to be related to changes in the Rust nightly compiler since the class was first created.
This project aims to create a
#[no_std] freestanding binary (a kernel, in this case).
Here’s the repository I’ve been working from.
To build our kernel we
cd into the
kernel directory and run
make, which at first gives me a number of warnings related to a few unused symbols in the
pi directory because I haven’t implemented those drivers yet. Here’s the error I get:
➜ kernel git:(master) ✗ make + Building target/aarch64-none-elf/release/libkernel.a [xargo --release] warning: `panic` setting is ignored for `test` profile Compiling kernel v0.1.0 (file:///home/isaak/Documents/code/cs140e/os/kernel) error[E0463]: can't find crate for `panic_abort` error: aborting due to previous error For more information about this error, try `rustc --explain E0463`. error: Could not compile `kernel`. To learn more, run the command again with --verbose. Makefile:38: recipe for target 'target/aarch64-none-elf/release/libkernel.a' failed make: *** [target/aarch64-none-elf/release/libkernel.a] Error 101
There’s no reference to a
panic_abort crate anywhere in the codebase outside of the
Cargo.toml configs that set
panic = "abort" to disable the generation of unwinding symbol information. This is nice as it’s supposed to decrease the size of the binary and compile time.
I’m not sure what I’m missing here and any pointers would be helpful. Thanks for reading!