You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm up to post 2 - A Minimal Rust Kernel and it seems the latest nightly rust build nightly-2025-02-04 is a breaking change, where the previous nightly-2025-02-03 build was working.
After a cargo build, I get the error:
"error: Error loading target specification: target feature soft-float is incompatible with the ABI but gets enable
d in target spec. Run rustc --print target-list for a list of built-in targets"
My rustc version:
After some digging, it looks like a similar issue was brought up in the rust repo here
Solution
To fix the build/compilation error of the Rust OS crate, adding "rustc-abi": "x86-softfloat" to the end of the x86_64-blog_os.json file should fix the issue.
But the same issue arises when trying to run the kernel with cargo run which uses the bootimage runner that first builds the bootloader dependency. Due to the same target spec configuration issue in the crate, you can fix this issue the same way locally by modifying the source code of the bootloader crate and adding "rustc-abi": "x86-softfloat" to the end of the x86_64-bootloader.json file.
I found the location of my x86_64-bootloader.json file in ~/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/bootloader-0.9.29/x86_64-bootloader.json.
From what I understand, rust now requires an explicit declaration of the intended ABI for the "soft-float" spec.
A working x86_64-blog_os.json target configuration in the Rust OS crate with this change:
I assume a change to the configurations in the rust OS blog+ rust OS code repo + bootloader repo will be needed? I'd love to work on a PR if these observations are correct. Hope this helps other people running across the same issue!
The text was updated successfully, but these errors were encountered:
EricLi-Dev
changed the title
error: Error loading target specification: target feature soft-float is incompatible with the ABI but gets enable d in target spec.
Post 2: error: Error loading target specification: target feature soft-float is incompatible with the ABI but gets enable d in target spec.
Feb 5, 2025
EricLi-Dev
changed the title
Post 2: error: Error loading target specification: target feature soft-float is incompatible with the ABI but gets enable d in target spec.
Post 2: error: Error loading target specification: target feature soft-float is incompatible with the ABI but gets enabled in target spec.
Feb 5, 2025
I have some questions, assuming this PR is going to be submitted, which version of bootloader should the code part about bootloader be submitted to? The current blog uses the bootloader version 0.9, and there is an updated version now. Does crate.io allow modification of the published version?
It is still possible to publish an update for the 0.9.x series even though 0.11.x has already been released. You can't modify an existing version, but you can upload a new semver compatible one.
It is still possible to publish an update for the 0.9.x series even though 0.11.x has already been released. You can't modify an existing version, but you can upload a new semver compatible one.
Problem
I'm up to post 2 - A Minimal Rust Kernel and it seems the latest nightly rust build
nightly-2025-02-04
is a breaking change, where the previousnightly-2025-02-03
build was working.After a
cargo build
, I get the error:"error: Error loading target specification: target feature
soft-float
is incompatible with the ABI but gets enabled in target spec. Run
rustc --print target-list
for a list of built-in targets"My
rustc
version:After some digging, it looks like a similar issue was brought up in the rust repo here
Solution
To fix the build/compilation error of the Rust OS crate, adding
"rustc-abi": "x86-softfloat"
to the end of thex86_64-blog_os.json
file should fix the issue.But the same issue arises when trying to run the kernel with
cargo run
which uses the bootimage runner that first builds the bootloader dependency. Due to the same target spec configuration issue in the crate, you can fix this issue the same way locally by modifying the source code of the bootloader crate and adding"rustc-abi": "x86-softfloat"
to the end of thex86_64-bootloader.json
file.I found the location of my
x86_64-bootloader.json
file in~/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/bootloader-0.9.29/x86_64-bootloader.json
.From what I understand, rust now requires an explicit declaration of the intended ABI for the "soft-float" spec.
A working
x86_64-blog_os.json
target configuration in the Rust OS crate with this change:A working change to the
~/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/bootloader-0.9.29/x86_64-bootloader.json
:I assume a change to the configurations in the rust OS blog+ rust OS code repo + bootloader repo will be needed? I'd love to work on a PR if these observations are correct. Hope this helps other people running across the same issue!
The text was updated successfully, but these errors were encountered: