-
Notifications
You must be signed in to change notification settings - Fork 482
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
"cargo-warning:Compiler version doesn't include clang or GCC" prints a lot on Ubuntu #909
Comments
#932 should fix this, I will fix the merge conflict. |
While it (*) As in diff --git a/src/tool.rs b/src/tool.rs
index 915be54..9c84458 100644
--- a/src/tool.rs
+++ b/src/tool.rs
@@ -84,14 +84,7 @@ impl Tool {
};
if stdout.contains("clang") {
ToolFamily::Clang
- } else if stdout.contains("GCC") {
- ToolFamily::Gnu
} else {
- // --version doesn't include clang for GCC
- cargo_output.print_warning(&format_args!(
- "Compiler version doesn't include clang or GCC: {:?}",
- cmd
- ));
ToolFamily::Gnu
}
} |
Just in case for reference. It appears on Fedora, RHEL and Archlinux, but not on Ubuntu, Debian and naturally their derivatives.... |
Sounds good, I will open a separate PR to remove that warning. |
@dot-asm Thinking about this again, we probably need better ways to detect clang/gcc, rather than removing that warning. |
I'm still seeing this on Ubuntu 22.04 with cc version 1.0.88, despite it being closed. An idea I have to fix it would be to first invoke "cc --version", then if the "gcc" or "clang" strings cannot be found, to try "cc -v" before printing the warning. On my machine, "cc -v" does include "gcc" but "cc --version" does not. |
@believeinlain Yeah I think that might work, can you submit a PR for this? |
I have the same behaviour as @believeinlain described on my Ubuntu 20.04.6 LTS: |
cc version issue is tracked in #958 |
This includes the fix to rust-lang/cc-rs#909 which spams warnings on ubuntu 22.04
This includes the fix to rust-lang/cc-rs#909 which spams warnings on ubuntu 22.04
When I'm building Rust (well, Ferrocene), I see a lot of:
This appears to be because Ubuntu 22.04's GCC doesn't report itself as GCC failing this check.
I'm using cc 1.0.79.
If
--version
doesn't help, you could consider usingcc -v
instead?Other options include looking for the "Free Software Foundation" copyright (that will always mean it's gcc, surely), or the string
cc (Ubuntu
.Clang's output remains constant, no matter whether it is called as
clang
orcc
.The text was updated successfully, but these errors were encountered: