-
Notifications
You must be signed in to change notification settings - Fork 492
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
clang
build fails with "invalid version 'softfloat'" on aarch64-unknown-none-softfloat target with cc crate 1.2.17
#1441
Comments
Is it installed from homebrew? Previously we have encountered similar issues with homebrew clang |
Huh? We should be passing Line 33 in d9dd20e
I wonder why this isn't working? |
No, we don't have homebrew in our stack :/ |
I cannot reproduce this with Could you post a minimal reproducer / post the contents of your |
This seems to be a regression,
|
Well, in that case it's definitely #1413. But I still cannot reproduce it, nor even fathom what the issue could be? If you don't want to post a full reproducer, could I get you to check out this repository, run |
Oddly enough, I've also tried 1.0.79 and I'm getting the same error. |
Running the command you posted above (after fixing some errors) produces the following:
This might (?) still be a problem with the setup, but I've had a look online and am not sure how to tackle this. Any ideas? Does this help? |
Odd, that sounds like you're missing a |
That's what I thought as well but I get the following:
|
Ah, right, that's actually kinda expected, since Could you test the following Cargo project: With |
Sure thing, here's the output: [...]:~/rust/3c53305b58624ee8251a38b709db6412$ cargo build --target aarch64-unknown-none-softfloat -vv Compiling cc v1.2.17 |
Well, that works, so I'm feeling fairly confident the problem isn't with |
Ok, I'll dig a bit more next week, thanks for helping out. For now we've got the =1.2.16 version workaround. I'll post here when/if I confirm what the problem is. |
I can fairly confidently confirm this isn't an issue with |
When building a Rust project that uses the cc crate (version 1.2.17) for the aarch64-unknown-none-softfloat target, the build fails if clang is used as the C compiler.
The error message from clang is:
clang: error: version 'softfloat' in target triple 'aarch64-unknown-none-softfloat' is invalid
The cc crate appears to be invoking clang with the full target triple --target=aarch64-unknown-none-softfloat. It seems that some versions of clang do not accept the softfloat version string within the target triple for this architecture.
Steps to Reproduce (based on our experience):
Use a build.rs script that utilizes the cc crate (version 1.2.17).
Set the build target to aarch64-unknown-none-softfloat (either through environment variables like TARGET or by calling build.target() in the build script).
Ensure clang is selected as the C compiler (e.g., env::set_var("CC", "clang"); in build.rs or via environment variable).
Run cargo build --target aarch64-unknown-none-softfloat.
The text was updated successfully, but these errors were encountered: