-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Package all required components of the MinGW toolchain #11782
Comments
Accepted for 1.0, assigning P-backcompat-libs (in lieu of P-backcompat-tools) |
May depend on #11937. |
My current opinion is that just bundling gcc is the path of least resistence here. gcc's dependencies are no greater than ld itself. The only sticking point is that gcc's license does include the GPL runtime exception, unlike the other components. I'm investigating the legal issues. |
I still think we would be better off bundling |
Building clang is a possibility for the future but it is a bigger and more controversial change. Using clang to drive ld still requires bundling the GNU linker, so doesn't save us any appreciable amount of work. I would rather still just use lld directly, skipping clang entirely. |
The comparison would be pre-built clang (used as a library) vs. pre-built gcc. It could be built as part of building Rust but it's no more necessary than building gcc AFAICT. |
Well, I guess it does need to match the LLVM version. |
Still waiting on legal advice re packaging gcc. |
Packaging gcc is fine, considered 'aggregation' in GPL terms, which is allowed in most circumstances, including this one. |
Also need to package 'ar'. |
LLVM has an |
Dropping these files into rust installation seems to be sufficient for self-hosting:
Note on |
Given that gcc binaries are target-specific, it probably isn't a great idea to drop them in the root though. I'm thinking something like |
Package rustc's mingw dependencies into Windows installer to avoid requiring a separate mingw install. Closes #11782
I'd like to give this some thorough testing before calling it closed. |
The Win64 installer is not working. libwinpthread-1.dll is missing (which is strange since the bots are not supposed to be using the pthread mingw). Dependency walker also says that api-ms-win-core-kernel32-private-l1-1-1.dll and two other similarly-named required DLL's aren't available; I have no idea what those are. Win32 build tests fine! |
@brson, perhaps the nightly bot got installed with "posix" mingw? We can package libwinpthread-1.dll too, but I think the preferable solution would be not having this dependency at all. You can ignore "missing" api-ms-win-... dependencies,- they are not missing, just not on PATH, but Windows knows where to find them. |
@vadimcn I will investigate the bot configuration. |
I believe what's happening is that the distribution script is picking up the wrong libgcc_s_seh-1.dll and packaging it. msys2 comes with its own copy that does use emulated pthreads. I'm going to try switching which order the msys2/mingw-w64 paths are in in |
Does that msys2 instance have gcc package installed in it? Mine doesn't, and it doesn't contain the libgcc_s_seh-1 dll either. |
I manually removed all vestiges of msys2's mingw64 toolchain on my system to make sure I wasn't accidentally picking up any unwanted dependencies. |
@vadimcn msys2 does not appear to have gcc installed but I may have e.g. installed and uninstalled during the initial provisioning. |
The problem seems to be with the 'innoextract' tool we have installed on that bot via msys, which pulls in gcc-libs. I'll look into fixing that tomorrow. |
I've modified the win64 VM to not contain the pthread-based gcc-libs. Next nightly should work. |
New nightly still didn't work. Continuing to investigate. |
X86_64 nightlies work correctly now. |
Reopening because of complications in #17442 that make this not solved. |
Per @alexcrichton I'm going to close this because the (statically compiled) cargo binaries should work without mingw; the problem cargo is encountering is just with building. |
… r=Centri3 Make `macro_use_imports` lint ordering more stable changelog: none Fixes [the `macro_use_imports` ordering dependence](rust-lang#117649 (comment)) on the hash of `Span`s
Easier than #9367. We're already packaging a few of MinGW's binaries. There are probably just a few more pieces needed to have a completely self contained toolchain. This will require either using the linker directly on windows or packaging all of gcc with Rust.
Nominating.
The text was updated successfully, but these errors were encountered: