-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
compiler: capture rustc error output if extra-verbose #6957
Conversation
(rust_highfive has picked a reviewer for you, use r? to override) |
I'm not sure I understand this change. All of stderr and stdout is forwarded to the output (in latest nightly). This will just repeat what was already printed. Also, things have recently changed so that stdout is forwarded (it does not cause a failure). Is there some reason you need the output repeated? |
Looks like I was confused by the error message "Did not run successfully: Ok(ExitStatus(ExitStatus(6)))" which actually comes from rustc's bootstrap rustc-wrapper. It's unclear if that wrapper is dropping stdout/stderr or if it's actually empty, however. |
That is curious. AFAIK, the bootstrap wrapper disables JSON output and forwards stdout/stderr to cargo. In the case of the version you're using, stderr would just pass through, but it would fail on the first line on stdout (the latest cargo won't do that). So I would be surprised if the stderr messages are lost. Error code 6 also seems suspicious. I've never seen rustc exit with such a code. Is that maybe SIGABRT? |
So, stderr is definitely getting lost. I ran the command manually and it gives me "LLVM ERROR: out of memory" on stderr with the shell adding "Aborted", which seems to be the same problem as in our automated build log (and the same problem as rust-lang/rust#56888). But this seems more like a bug in rustc's bootstrap rather than cargo so I'll investigate some more and probably close this PR soon. |
☔ The latest upstream changes (presumably #6933) made this pull request unmergeable. Please resolve the merge conflicts. |
Looks like the issue is fixed in rustc 1.34.2, we do get "LLVM out of memory" in the build logs again, so closing. |
The Debian rustc 1.33.0 build for mips* is failing with an error message like:
It does not tell me what the actual error output of rustc is, making it very difficult to debug the problem.
This PR makes cargo capture rustc output and include it in the error message, if extra_verbose is on.