rust-osdev/bootimage

Cargo install bootimage fails

therishidesai opened this issue · 3 comments

When I try to cargo install bootimage, I get the following error.

error[E0425]: cannot find function `read_to_string` in module `fs`
  --> src/test.rs:66:34
   |
66 |                 let output = fs::read_to_string(&output_file)
   |                                  ^^^^^^^^^^^^^^ did you mean `read_string`?

error: aborting due to previous error

error: failed to compile `bootimage v0.4.3`, intermediate artifacts can be found at `/tmp/cargo-install.bb6pN4pqkVxR`

When I did rustup update stable it ran fine. I guess the current nightly build had issues.

Seems like you just used an old compiler: The read_string function was renamed to read_to_string in rust-lang/rust#49522 and was stabilized in 1.26.

I'm going to close this because I think it is solved. If you're still having this issue @apache8080 I'm happy to reopen!