-
Notifications
You must be signed in to change notification settings - Fork 893
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
rustup's libgcc_s_dw2-1.dll breaks gcc under i686-pc-windows-gnu #3045
Comments
For what it's worth, the configuration build logs from attempting to build GMP inside gmp-mpfr-sys show the following PATH components:
The first four PATH components are added by |
I also tried older i686-gnu toolchains, for example 1.38.0-i686-pc-windows-gnu, and they also fail, which is why I believe the culprit is rustup, not the toolchains. Maybe the paths were appended in 1.24.3 and are now prepended in 1.25? (I cannot really test, as I do not know a way to downgrade rustup to 1.24.3.) |
This seems like it may be caused by the same things as #3036? |
Ah well, I downgraded to 1.24.3 and I'm getting the same problem. My suspicion is now that an MSYS2 update has become incompatible with the libgcc_s_dw2-1.dll included with the rust toolchains. And it's failing with old toolchains too, so toolchains that used to work don't work anymore with an up-to-date MSYS2. |
I've downgraded mingw-w64-i686-{gcc,gcc-libs,libgccjit} to version 11.2.0 and my problem went away. So it seems that the issue is some incompatibility between MSYS2 mingw-w64-i686-gcc >=11.3 and rustc. |
Huh, in that case maybe this issue should be moved over to rustc? |
I opened an issue in rustc instead; closing. |
Problem
When I install the stable-i686-pc-windows-gnu toolchain and try to build a crate which calls gcc in its build.rs, the build breaks. For example when trying to build the gmp-mpfr-sys crate under Msys2 32-bit, the build breaks saying that gcc doesn't work.
I managed to reduce the failure to just calling gcc with .rustup/toolchains/stable-i686-pc-windows-gnu/bin in the PATH.
Steps
Install stable-i686-pc-windows-gnu toolchain in rustup.
Install MSYS2 32-bit gcc. This can be done using:
Install MSYS2 using the installer at https://www.msys2.org/
Launch the MSYS2 MinGW x86 application which is the 32-bit terminal
Install gcc
Launch the MSYS2 MinGW x86 application and prepend the rustup toolchain directory to the PATH, something like
with the correct drive for
c
and username forUser
.Create the file a.c containing one single line
Try to compile the file using
gcc a.c
.Possible Solution(s)
When I rename the file libgcc_s_dw2-1.dll inside .rustup/toolchains/stable-i686-pc-windows-gnu,
gcc a.c
succeeds.Notes
No response
Rustup version
rustup 1.25.1 (bb60b1e89 2022-07-12)
Installed toolchains
stable-i686-pc-windows-gnu
The text was updated successfully, but these errors were encountered: