-
Notifications
You must be signed in to change notification settings - Fork 13k
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
fix building mingw32 rust with default gcc #37409
Comments
Adding some console output |
On 64-bit MinGW we use a different unwinding strategy for panics. That is, we vendor our own implementation which doesn't rely on any MinGW libraries. On 32-bit MinGW, however, we use the standard MinGW libraries for an unwinding implementation. On the pthreads toolchain these libraries reference pthread symbols, which we don't link by default. On the win32 toolchain these libraries link the win32 symbols, which we do indeed link by default. Does that make sense? |
Er and to expand on that, because on 64-bit MinGW we don't use any standard libraries, it doesn't matter what toolchain you're using as we're compatible with both. |
Does anyone have steps to overcome this? |
The immediate fix, write our own unwinder, is unfortunately very unlikely to work any time in the near future. Apart from that a possible solution could try to be dynamic detection of what toolchain we're working with to link the right libraries, perhaps. |
@jsen- I was able to get it to build by doing: |
I've almost got the mingw PKGBUILD to a working state, it is just that gosh darn cargo build that won't take any of my flags. |
@alexcrichton I'm just starting to understand how rust build system works but I think it would be possible to add target triples EDIT: Instead of creating additional target cmake option could be added to force pthread linking with mingw. |
Unfortunately this is likely to be an uphill battle. There's no easy workaround AFAIK to get this working, and you'd basically be blazing a new trail. It's unlikely we'll add new targets for this use case as well, but not implausible! |
I understand adding additional target could be overkill. Is there developer that I could contact by mail or IRC about rust build system? EDIT: Never mind, |
Ah I'm likely the developer you'd want to contact about the build system! You can find me as |
This edit by @mati865 seems to suggest that this has been fixed, so perhaps we can close? @mati865 could you confirm that you've managed to fix this or let us know if it's still broken (I assume it is, I think, since I don't recall us doing anything to fix it). |
Issue is resolved and should be closed. |
Hiya folks. I've been working on updating msys2's rust package. As noted in the appveyor.yml rust i686-pc-windows-gnu doesn't build on the default mingw32 compiler.
Why does it compile with the 64-bit mingw64 gcc then? What is so different that it compiles with the 64-bit one but not the 32-bit gcc? If this is not rust's fault, could a bug be filed on the MINGW-Packages repo by someone who knows what the problem is?
The text was updated successfully, but these errors were encountered: