-
Notifications
You must be signed in to change notification settings - Fork 12.1k
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
pyo3 crashes with ICE in gcc #57176
Comments
This seems like a bug in gcc rather than rust? |
This seems indeed to be a gcc bug. However, pyo3 fails to compile even if it does never invoke gcc itself, which imo shouldn't happen to a rust crate. |
How? |
As far as I've understood it, rustc invokes |
You said it fails to compile before invoking the linker. That would more likely to be a rustc issue, but you haven’t said how it fails. Citing:
Your last elaboration circles back to invocation of the native toolchain which is what then fails and not explanation of what fails before linking. ICE in linking is a bug in your toolchain and there is a little value in tracking that. From the error it appears that it could be circumvented by disabling LTO, perhaps. Looking at the reports, similar to the originally reported |
No, the linker is what fails, and I can't see that I've said otherwise. I've looked into how this is related to python and found that the error only happens with python installed through anaconda. Below is a Dockerfile that reproduces the error.
I still think that something like this shouldn't cause an ICE, but I can understand if you don't want to track errors in the system linker. |
Sorry, I assumed that it was the case based on the sentence about gcc not being invoked at all. My bad.
Since the ICE is in a component that is not part of the Rust project and the root cause is a library that is not built by rustc, there is hardly anything we can do on Rust side to solve this. Tracking issues like these as a bug in rustc is hardly useful. We can help you to find workarounds that could perhaps help. Here’s a few things that you could try:
|
Thanks for the suggestions. Disabling lto didn't help and switching to lld caused some |
Reproducing
Output (truncated)
Versions
rustc -V
:rustc 1.33.0-nightly (a7be40c65 2018-12-26)
cargo -V
:cargo 1.33.0-nightly (2cf1f5dda 2018-12-11)
The text was updated successfully, but these errors were encountered: