-
Notifications
You must be signed in to change notification settings - Fork 13.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
Build failure in i686-pc-windows-gnu in MSYS2 with mingw-w64-i686-gcc 6.3.0-1 (rustbuild) #39357
Comments
You may want to use my MinGW build under https://github.com/ncihnegn/mingw-w64-packages/rust-git. |
Rustbuild will work only if you use Rust build with pthread (like Rust package from MSYS2) and add few hacks to Rust code. @alexcrichton Ideally there could be config option in |
FWIW I had As a side note, the GCC package (+other toolchain) from MSYS2 is a ticking bomb, it broke on update so many times in the past, and if this happens it cannot be easily downgraded. It should be recommended to use the official standalone installer from https://mingw-w64.org/doku.php/download/mingw-builds which also gives you a choice of threading and exception models and precise version. |
Issue with I've considered packaging rustup instead of Rust but I'll need to discuss with MSYS2 developers. |
Oh, you are actually doing packaging for MSYS2, looks like it brings some special set of concerns. |
@petrochenkov
Which is not surprising as those tests fail on Linux also, here is more detailed log: https://paste.ubuntu.com/24201347/ |
The is unfortunately an expected failures, we're just not compatible with the pthread toolchain right now. Support needs to be added to libstd to detect these hidden dependencies and emit appropriate link directives, and it means an entirely new toolchain must be created regardless. |
I currently have this patch: https://gist.github.com/mati865/6fd83fd24bd17dc4639e03a8211bc319 |
I believe this is fixed on master, so closing. |
It looks like gcc_eh is dependent on
-pthread
for this build mingw gcc, which we are not using.We probably need to add it after gcc_eh for gcc versions that use winpthreads if we want to support this. And it might also require copying some extra dlls if some this is built non static, but I'm not sure.
Otherwise we need to document what a user should do since the instructions in the README.md don't work.
The AppVeyor configuration seems to use a different gcc toolchain to work around this.
Commands
Log
Workaround
I got the bootstrap.exe to build but no further with:
Probably due to this in cargo src/cargo/ops/cargo_rustc/context.rs:907-912
I also tried to use the compiler that AppVeyor uses but simply adding it to the PATH doesn't seem to be enough as rustc is insistent on using the installed gcc as the linker rather than the gcc that was added to the path. What eventually worked was to remove mingw-w64-i686-gcc in msys2 and add the gcc used in the AppVeyor config to the PATH. 😫
@alexcrichton
The text was updated successfully, but these errors were encountered: