-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Consider builds for UCRT64? #3167
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
Comments
That isn't really an architecture, but a different CRT. We allready do dynamically load some UCRT functions (like I went looking how linux package managers handle packages expecting alternative libc implementations and it seems like the answer for both pacman and apt seems to be they pretty much don't. So maybe a diffrent pseudo-arch is not the worst approach. I don't think we'd want to offer actual release builds linked against UCRT in parallel to the MSVCRT builds, though. It just adds unnesscessary maintenance complexity. So from my perspective we'd want to have UCRT32 builds as well as UCRT64 builds working before we produce any official UCRT releases and then probably offer just UCRT releases. This raises the interesting side question, what do we link the arm64 builds against? UCRT is probably our only option there, isn't it? That's probably a nice source of hard to pin-point differences between arm and intel builds. |
Forget what I said. MSYS2-packages link against newlib. |
Well, I know it is not really an architecture, but MSYS2 (or, MinGW-packages) put ucrt64 parallel with mingw64, just like different archs. I'm asking because I'm using msys2 with |
@Berrysoft could you show us how such a thing would look like (preferably as a PR at git-for-windows/MINGW-packages)? |
@dscho I'm trying so, but it maybe cost some more time because MSYS2 doesn't provide enough packages for |
@Berrysoft thank you for researching that. Could you maybe keep an eye out and let us know once enough packages are available to continue on this quest? |
@dscho OK, I'll try to PR after they're avaliable. |
I'd like to know how did you packaged I also would like to know how did you packaged |
The build definition is maintained here: https://github.com/git-for-windows/build-extra/tree/main/mingw-w64-cv2pdb
We didn't package it, we consumed it from MSYS2 when it still was offered. |
Well, I have to admit that the process trying to build git for windows in UCRT64 env is frustrating. It seems that there are many places hard coding |
I finally succeeded using cmake, with a little fix. Do you consider totally move to cmake? It will simplify a lot. |
We do have a working CMake definition, but I can't really say what we would lose by switching to it. Neither do I see any big win... what does UCRT bring us? Is it available on every Windows version we support? Does it need to be installed manually? |
Anyway you need to ship git with a msys2 runtime, and there is UCRT support in msys2. UCRT is a much newer C runtime than I'm asking for |
There is indeed work underway to build ARM64 artifacts, but they will be hybrid. Remember, Git for Windows bundles files from ~150 separate packages. Git is but one of them. All the other packages are built using either the MSYS or the MINGW toolchains, and have currently no support for ARM64. The most obvious challenge is to get the MSYS2 runtime built for ARM64. There is currently no support to bootstrap this, therefore there is no GCC targeting MSYS/ARM64. Since the MSYS2 runtime is a close fork of the Cygwin runtime, we'd have to rely on them to support ARM64 builds. Last time I checked, there was no effort under way to that end. That, combined with the fact that Git for Windows still needs to support Windows 7, and that Git does not need any of the features available in the UCRT (it uses direct Win32 API calls for Unicode, and does not interact with the Windows GUI in any way) makes me rather unenthusiastic to embark on what I perceive as a multi-year, multi-person project with negligible benefit, at least as far as I understand it. |
Well, no problem. I understand your choice, because there's a lot of work to do besides making the project built. |
One small thing I know is that Git built through
It is probably installed on most supported systems through windows update.
The MSYS2 team are working on building UCRT64 and ARM64 MINGW-Packages. I can't tell you the exact status of that effort, though.
Did we ever officially stop supporting Vista? I know we've talked about doing so on multiple occasions if Vista support would block some new feature, but I don't think it ever did. |
A little off-topic: |
Absolutely. Our CMake-based configuration is just not there yet.
Well, that's good! At the same time I want to caution that Git requires a Unix shell to work, in our case that's MSYS2's Bash (which is an MSYS program, not a MINGW program, as it requires the MSYS2 runtime to work). And that won't be built for ARM64 any time soon.
Whoops, I actually had forgotten about Vista ;-) But yes, according to https://gitforwindows.org/requirements.html we still support Vista.
That's something I don't want to rely on. GitHub Desktop bundles MinGit, and has no provision to take care of downloading additional files (such as UCRT). UCRT could not be bundled with it, either, for licensing and practical reasons. If I see enough benefit to pay the very real price of spending the time with every new release to bundle UCRT-based versions, I will do so, but for the time being I think the GCC-built version needs to stay our principal way to deliver Git for Windows to the users. Having said all that, I definitely didn't mean to discourage anyone from working on UCRT64-based builds or from improving the CMake configuration. |
Just chiming in here for the ARM64-specific bits as I've been working on Git for Windows ARM64 support. In this PR I'm using I saw the MSYS2 team has been hard at work providing Clang builds of Just for the record, MSYS2 has a good overview of the different environments here: https://www.msys2.org/docs/environments/ For ARM64, using UCRT is not a problem as ARM64 support was only introduced in Windows 10 😊 |
I've written a new |
@Berrysoft there are two major problems with this approach:
|
|
I cannot explain more because I failed to get to the root of the problem.
It must have something to do with Git's usage patterns, yes.
How would this work? How would e.g. Visual Studio find those dependencies when running CMake? |
OK, I still don't know about the problem 1, but I strongly suggest avoiding non-standard usage. Could you kindly point the usage out, so that I can produce a failure when targeting UCRT? The problem 2: CMake could find dependencies itself. My |
@Berrysoft if by "non-standard usage" you are referring to using API functions that are either rarely used or undocumented: no, Git does not do that. If you're referring to "using
That's what I missed. I thought you were somehow targeting Linux (based on your PR that adds PCRE2 support). |
Well, UCRT's logic of
Originally I added this support because the I hope the new Although git-for-windows uses a slightly different msys2 environment, I find it compiles and works well with the original environment. Did I miss something? If not, that should be perfect. Although the attempt years ago that to publish git-for-windows onto the official msys2 packages server failed, I hope it will success with this new attempt. |
My point of raising the As to |
I've noticed that you've already used |
I said "how many more problems do lurk there". It is such a fundamental (if all-too-frequently ignored) rule in our business that you should not nilly-willy "fix what ain't need fixing", lest you incur a ginormous amount of problems just by using something new whose negative implications you cannot even assess. You're trying to switch out the mingw-w64/MSVCRT combination, which we know really well, and whose shortcomings we know really well, for a clang/UCRT combination which we do not know well at all, and whose shortcomings we do not even know. All we know is that there are shortcomings that were not supposed to be there (read on the internets how many people claimed that nedmalloc is not necessary with modern C runtimes, including UCRT, because they outperform nedmalloc). This fact, that there is a known shortcoming already, even if it was supposed to not be there at all, concerns me and forces me to face the uncomfortable truth that there are most likely more such issues. Of course, you can feel free to go and simply switch to clang/UCRT and see where that gets you. But I, in my role as Git for Windows maintainer, cannot. That would be irresponsible. |
I've made up my mind, and after weighing the enormous cost of doing this against the benefit (I do not see any), I've decided that I won't consider builds for UCRT64, at least for now. |
Never mind, I've built it myself. |
It seems that MSYS2 has added arch support for ucrt64, which uses Universal CRT (64-bit) as its C runtime, and provides a full toolchain. Would you consider add builds for that arch?
The text was updated successfully, but these errors were encountered: