-
-
Notifications
You must be signed in to change notification settings - Fork 104
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
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
CMake sometimes hangs after Cargo finishes a crate when using sccache #417
Comments
Are your sure it is actually CMake that hangs? I've recently been experimenting on integrating a workaround for #413 into corrosion until it is fixed upstream, and have noticed hangs for the following dead simple program (only tested on mac): // use std::ffi::OsString;
use std::process::Command;
fn main() {
// let args = std::env::args_os()
// .chain([OsString::from("--target=abcdefg")]);
let mut handle = Command::new("echo")
// .args(args)
.spawn()
.expect("Failed to spawn");
handle.wait().expect("Command wasn't running");
} I get the following output:
The hang happens between "Running" which is printed immediately and the output of "echo" which can take seconds to appear, even though compilation has already finished!. |
Note that I used to have hangs as well when using vscode + CMake, but since disabling sccache i haven't observed them again. So I think it is somehow related to having sccache enabled. |
I think you are right that this only shows up with sccache. When the build hangs, neither rustc nor cargo processes are running. I don't know if Corrosion, CMake, or sccache are the problem; my guess is the bug is in sccache. |
Potentially related: I have never encountered this using sccache with Cargo alone (not using CMake + Corrosion). |
I'm a bit skeptical that this is related to corrosion. Corrosion / CMake does all its work at configure time. At build time the Generator (in your case ninja) invokes the build rules (e.g.
|
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
Current Behavior
CMake sometimes hangs indefinitely after Cargo finishes building a crate.
Expected Behavior
CMake proceeds after Cargo finishes building a crate.
Steps To Reproduce
cmake -S . -B build -G Ninja
cmake --build build
This is not reproducible every time; it only happens occasionally. Terminating CMake with Ctrl + C then rerunning CMake works around the problem. This has been happening for a while across multiple versions of Rust, CMake, and Corrosion.
Environment
CMake configure log with Debug log-level
No response
CMake Build step log
The text was updated successfully, but these errors were encountered: