phil-opp / blog_os

Writing an OS in Rust
http://os.phil-opp.com
Apache License 2.0
15.85k stars 1.09k forks source link

bootimage can't be installed #1329

Closed Nerocraft4 closed 3 months ago

Nerocraft4 commented 5 months ago

Hello,

I've tried to install bootimage several times and I can't manage to do it. I'm stuck at the last part of this tutorial (https://os.phil-opp.com/minimal-rust-kernel/) and bootimage just won't install.

I get thousands of errors:

Some errors have detailed explanations: E0405, E0412, E0425, E0432, E0433, E0463, E0531.
error: could not compile `serde` (lib) due to 6739 previous errors
error: failed to compile `bootimage v0.10.3`, intermediate artifacts can be found at `/tmp/cargo-installud8I1t`.

What can I do? I really wanted to follow along the tutorial, but this has stopped me and I can't find anything to solve it.

phil-opp commented 5 months ago

Please try running the cargo install command from a different directory, e.g. your home directory.

Nerocraft4 commented 5 months ago

thing is, from there, it tells me the target system (the x86... .json thingy) is not installed. It could be a bug due to the unstable-nightly version, maybe?

phil-opp commented 5 months ago

cargo install should always build for your host system, not for the custom target. Did you perhaps set the default target in your $HOME/.cargo/config instead of a path/to/your/project/.cargo/config file? In that case you changed the default target for your whole system, which would explain why the error still happens from your home directory.

Nerocraft4 commented 5 months ago

thanks! that might be it. I will try again as soon as I can and let you know.

phil-opp commented 3 months ago

I'll go ahead and close this because I think this has been answered. Let me know if you still have issues.