Open frol opened 6 years ago
I got past this error by adding RUST_TARGET_PATH='${BASE_DIR}'
as an additional environment variable to the cargo command in kbuild.mk on line 46. It appears there's a bug in Cargo where when it changes directory to build other crates, it loses where to find the target specification, so you have to set that variable to make it remember. See https://github.com/rust-lang/cargo/issues/4905
But after fixing that, I get a ton of errors from the nightly-libcore
crate, which it seems has not been kept up to date.
Ah, it seems the proper way going forward is to use Xargo instead of Cargo and this nightly-libcore
hack. Xargo takes care of building libcore for the proper target for you. I've done a bit of work on my fork (https://github.com/wfraser/rust.ko) that involves this, and also updating the bindgen
version used, among other things, that gets it building on the current nightly rustc.
Is this fixed yet?
I have updated the
x86_64-unknown-none-gnu.json
file with the version fromrust-barebones-kernel
, but still cannot get through error:Can anyone help me?