-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
RFC: add mingw to appveyor matrix #2946
Conversation
2990b2e
to
35cf6c6
Compare
Sorry for eating up a lot of queue time experimenting with things here. If I knew of a way to only run these on AppVeyor and not Travis, I would. Please cancel any redundant pending builds for this so other things can go through. I have some code in here to fail immediately for obsolete builds on AppVeyor when a newer build is pending for the same PR, The 32 and 64 bit MinGW-w64 builds both looked successful, but powershell may have been treating all the compiler warnings as errors or something and it wasn't running the tests. I'm trying to run the build steps from cmd instead of powershell, though that is being pickier about multiline commands. |
a91fbc2
to
6d48a44
Compare
I think I see why the cross-compile was working with Anyway, this works and runs the tests now, at least for mingw-w64. There are a whole bunch of compiler warnings and 12 test failures due to building without openssl (I could go find a mingw-w64 openssl download), 4 "Unsupported URL protocol," and something else wrong with |
Wow!!! Very cool. With regards to the failing tests, we either need to build against openssl, or we need to simply not run the online tests. (It should be enough to drop the Long-term, I would like to see us building against openssl and using it, but that's not super critical for me for now. I think that there's a lot of value having the mingw builds even if they're not exercising the online tests. |
I can get a cross-compiled binary of openssl from the opensuse build service. It requires some messy rpm repodata xml parsing, I have a version written in bash (filed prominently under things you shouldn't write in bash) that relies on
Is that easily doable through |
use MSYS makefiles generator add bash script for running mingw on appveyor add --login and fix run paths use msys style path to appveyor-mingw.sh add mingw path to /etc/fstab
f66c290
to
714d144
Compare
cache mingw-w64 downloads quiet curl and 7zip run appveyor steps in cmd for mingw
714527b
to
b97476c
Compare
I found an OpenSSL binary and got it installed on appveyor, it built okay but gave |
I don't think we should bother too much with OpenSSL on Windows but instead try to get the PR which makes us use WinHTTP from the mingw environments in working order. |
Silly me, I had a typo in my ifdef. Fixed now, ftruncate test passing on mingw-w64. Travis has a big backlog of all the times I rebased and force-pushed this branch. ba6c53b is intended to work through that backlog a little quicker, but could be taken out since I'll admit I haven't tested that code outside of this PR. |
🍰 I fixed the mingw.org build problem too. It was due to empty/missing defines in some of the trace code, and a separate problem with 3 test failures on mingw.org, but could be much worse given the toolchain. |
ad856d6
to
a22f708
Compare
Thanks for all the hard work here @tkelman - I'll dig into this when I have a moment. Re cross-compiling - I agree that mingw on Windows is a challenge. However WINE introduces a handful of other issues - we don't work under WINE at the moment (or we didn't the last time that anybody I know tried it) and I don't want to end up testing WINE instead of us, as I'm sure you can sympathize with. Thanks again, I know you've put a ton of effort into this. |
@@ -55,7 +55,7 @@ int p_ftruncate(int fd, git_off_t size) | |||
return -1; | |||
} | |||
|
|||
#if !defined(__MINGW32__) | |||
#if !defined(__MINGW32__) || defined(__MINGW64_VERSION_MAJOR) |
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.
A recent PR suggests that MINGW_HAS_SECURE_API
might be defined when this is supported. This might be more idiomatic and future-proof.
This looks really nice to me. Not sure if that I know that @phkelley has played in the mingw space, I don't know if he has any additional thoughts. |
I agree there. I should've been a little more specific. I like cross-compiling for building binaries, since it's more easily automatable and repeatable via Docker, OBS, Koji, what have you - native dependency management on Windows is still an absolute mess, letting a Linux package manager do the work for you actually works really well for getting binaries built. Testing those cross-compiled binaries via Wine is good to do when things are simple, but also fraught with Wine quirks when things aren't simple. As an anecdote, Julia has a rewritten garbage collector as of a few months ago, which mysteriously broke the step in cross-compilation that depended on Wine - probably due to a bug in Wine.
I'll push a test commit and see whether that does the job as well as my initial version. If so, I can rearrange things a little. |
should cut down on compiler warnings with mingw
these shouldn't be necessary if _WIN32_WINNT >= _WIN32_WINNT_VISTA
Looks like it worked fine. I took out my versions of those commits and did it with a cherry-pick instead, so this vs #2959 could hopefully be merged in either order. |
Thanks for the hard work here, @tkelman . Really happy to see this done up so nicely. |
RFC: add mingw to appveyor matrix
Cool, you're very welcome. Happy to help make mingw(-w64) easier to support for you guys. Especially if https support without needing openssl can be tidied up and finalized by someone who knows what they're doing. Don't hesitate to revert either tkelman@8008ab6 or tkelman@ba6c53b if they cause any trouble. They were good to have within the context of this PR, but could also be useful in doing the job of cutting down on queue time elsewhere. |
As discussed here #2414 (comment)
This is just a start,
and is only using the 32-bit mingw.org that is already installed on the AppVeyor VM's. I can keep working on this and add 32 and 64 bit MinGW-w64 distributions. Just need to pick which distribution to download.It looks like there might be a build issue with mingw.org at the moment. On my fork I got
Which is interesting, since the cross-compile on Travis appears to be working.