-
Notifications
You must be signed in to change notification settings - Fork 6.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
Add mingw documentation #17219
Add mingw documentation #17219
Conversation
What I would like to add later is comments about the "system binaries" configuration, affecting cmake and ninja. But this really needs to be tested before published. This can be done i another PR. |
Ready, from my POV. |
Thanks for the PR! I really appreciate having proper documentation for mingw. |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
I was inclined to answer again with "know your toolchain" but maybe this needs more attention indeed. I looked through the mingw mailing lists, and it confirms the MinGW project's mood as reported in #14561, in particular when users of mingw-w64 raise questions there. To make it really clear, I would replace MinGW with Mingw-w64 in most occurences. This is not meant to exclude MinGW if someone is willing to support that in terms of documentation, triplets and or ports. But I don't think MinGW is ready for usage with vcpkg at this stage. In particular, I won't change the mingw.md file name. However, renaming the community triplets should be seriously considered. And last not least it is |
It's not about vcpkg, it's about upstream expectation. Pretty much every libraries out there expect Mingw-w64, not MinGW. |
IMO there is nothing wrong with upstream. It is downstream, i.e. vcpkg users, which expect the ports to magically work with MinGW when vcpkg talks about MinGW. But when there is no x86_64 in MinGW, it won't come through vcpkg.
I didn't try any MinGW toolchain in the last years, and the currently broken MinGW website doesn't help. But I don't think they use the same prefix, or report the same autoconf triplet, as mingw-w64. I assume $ x86_64-w64-mingw32-gcc -dumpmachine
x86_64-w64-mingw32 So I would look for |
And now I realize that vcpkg passes the MinGW autotools triplets (...-pc-mingw32) to configure. IMO it should use the ... |
To be honest, letting autotools decide what triplet to use is a bit unreliable, and I would really like for each triplet to specify its corresponding autotools triplet, but that would require some work on |
I didn't want to suggest that autotools should decide. I just want to make a distinction from vcpkg's triplets.
In the vcpkg triplet file, at least optionally? Well, this is also what I think. It would facilitate adding new or customizing existing triplets (Android, mingw-w64 ucrt). The triplet files are in the hand of the users.
I got the impression that there is already a backlog of open PRs for this script, and I noticed some issues which aren't reported yet. |
Oh alright, I thought you were talking about the MinGW vs. Mingw-w64 issue and how the |
I added another section how to to avoid mixing MSYS binaries from different installations. Background: Note: IMO the underlying problem might effect even building ports for MSVC targets. For the record, my intermediate goal is to build the |
I had to extend the I think that it might make sense to handle this Removing the local msys2 installation from This basically marks the point where I consider this PR done: It is tested on multiple installation of Windows. (Yes, I succeeded in building gdal with mingw on Windows. It is as broken as on Linux, #9068). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks for making this awesome doc @dg0yt !
This PR adds basic documentation for using vcpkg with mingw.
The instructions weren't tested line by line from scratch. But they are based on recent work with vcpkg.