-
-
Notifications
You must be signed in to change notification settings - Fork 54
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
Investigate incorrect target detection #1376
Conversation
This should fix CI. See cargo-bins/cargo-binstall#1376 and https://github.com/cargo-bins/cargo-binstall/issue/1375 - it seems that cargo-binstall doesn't work correctly on ubuntu-20.04.
@NobodyXu need another run please; I've moved the logs to stderr so they don't interfere with the shell script. |
String::from_utf8_lossy(&stdout) | ||
.contains("GLIBC") | ||
.then_some(Libc::Gnu) | ||
let stdout = String::from_utf8_lossy(&stdout); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The bug resides in here, from the log:
while loading shared libraries: --version: cannot open shared object file\n")
My guess is that on ubuntu-20.04, glibc isn't executable.
To fix this, we can simply check that one of these files exist instead of executing them.
Or we can also check os-release but that is too complex.
crates/detect-targets/Cargo.toml
Outdated
tokio = { version = "1.28.2", features = ["rt", "process", "sync"], default-features = false } | ||
tracing = "0.1.37" | ||
tracing-subscriber = { version = "0.3.17", features = ["fmt"], default-features = false } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can make tracing-subscriber an optional dependency, only enabled if the binary is built.
The intent of this PR is to demonstrate the problem. I've removed the futures_util dependency. I'm not sure how to make tracing-subscriber optional in the way you describe. Please feel free to update this PR or create a new one using the code in this one. |
Please feel free to continue using the existing code since this PR is mostly for demonstrating the bug and finding the fix. I was just being pedantic. |
Can I close this PR @tamird ? |
I think the debug logs might still be useful. I can rebase if you agree. |
That's true, I can do the rebase for you and apply the suggestion I wanted. |
Sounds good; go ahead! |
Signed-off-by: Jiahao XU <[email protected]>
Signed-off-by: Jiahao XU <[email protected]>
Thanks @tamird ! |
See #1375.