bootloader
bootloader copied to clipboard
Cannot build or install bootloader package due to duplicate llvm-tools dependency within bootloader Cargo.toml
I'm trying to set up a basic skeleton for a Rust-based OS using this package to create a bootloader and boot image, and am running into the following problem:
$ cargo install bootloader --all-features
Updating crates.io index
Installing bootloader v0.10.11
error: failed to compile `bootloader v0.10.11`, intermediate artifacts can be found at `/tmp/cargo-installOtF7pN`
Caused by:
the crate `bootloader v0.10.11` depends on crate `llvm-tools v0.1.1` multiple times with different names
I've also tried just setting bootloader v0.10.11 as a dependency for my crate and trying to build a minimal kernel (just a _start that loops forever and a panic handler) and run into the same issue when trying to build it:
$ cargo build
error: the crate `bootloader v0.10.11` depends on crate `llvm-tools v0.1.1` multiple times with different names
I am using the nightly toolchain via rustup, and have installed the llvm-tools-preview component for the nightly toolchain. Did I miss an important step somewhere? Any ideas?
See https://os.phil-opp.com/minimal-rust-kernel/#creating-a-bootimage for some setup instructions. The bootloader crate is not intended for cargo install, it should be a dependency of your kernel instead. If you want to use bootimage for building, you should also stick to version 0.9 of the bootloader crate for now, as v0.10 is not supported in bootimage yet. Hope this helps!