-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Post 2: error: Error loading target specification: target feature soft-float
is incompatible with the ABI but gets enabled in target spec.
#1387
Comments
soft-float
is incompatible with the ABI but gets enable d in target spec.soft-float
is incompatible with the ABI but gets enable d in target spec.
soft-float
is incompatible with the ABI but gets enable d in target spec.soft-float
is incompatible with the ABI but gets enabled in target spec.
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. |
Thank you for answering my confusion. |
Thanks for reporting! Should be fixed in #1393 and rust-osdev/bootloader#492. You might need to run |
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
![Image](https://private-user-images.githubusercontent.com/38477812/410094114-001353ca-b798-4e67-8563-299e5c8b4afc.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkyOTM4NjcsIm5iZiI6MTczOTI5MzU2NywicGF0aCI6Ii8zODQ3NzgxMi80MTAwOTQxMTQtMDAxMzUzY2EtYjc5OC00ZTY3LTg1NjMtMjk5ZTVjOGI0YWZjLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjExVDE3MDYwN1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTNiZDQyN2RjZGU0ZTk3MzRjZDQyOWY2MzlkOTZlNzFkODQ3NTRhMGIwNmYxMjg3MGIwYjE0ZDQ5MGMyODA2YWEmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.7J4nfBccHq3Ha4RadrH73XuCY3qegtkROLlVaAW8aCg)
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: