-
Notifications
You must be signed in to change notification settings - Fork 38.7k
windows: Set _WIN32_WINNT to 0x0601 (Windows 7) #14922
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
Conversation
|
|
|
What does this change do? |
|
#14881 is using |
|
If |
|
@kristapsk Vista supports that, which is the minimum that is supported, so now after changing the minimum (initially it was changing it to W7) to Vista this PR is non-controversial. |
|
Ok, then it's strong utACK from me, nobody should run Bitcoin Core on XP anymore. |
|
But should be mentioned in release notes. |
|
Prefer to see this kind of change merged as part of a PR that needs/uses it. Release notes are already clear that XP isn't supported, for several versions now. |
XP has already not been supported since 0.13.0 in 2016, which was explicitly mentioned in the release notes then (and many a release after that): https://github.com/bitcoin/bitcoin/blob/master/doc/release-notes/release-notes-0.13.0.md#compatibility |
|
Gitian builds for commit 5f23460 (master):
Gitian builds for commit 5d233926dec4b3df52849cd15e4a86429adfd8bc (master and this pull):
|
|
FWIW I spun up a Windows Vista (SP2) VM and downloaded the v0.17.0.1 binary. It "seems" to run ok, although I didn't test extensively: However, Qt last listed Vista as a supported platform (deployment only) in 5.6 (LTS - Mar 2019), so I'd be happy to suggest tagging this for 0.18.0, revert to bumping to I'd be pretty surprised if anyone is testing on Vista (at all), and given Qt has dropped support for it, I assume it's just a matter of time before it will stop working (possibly randomly), especially if we move to a newer Qt for release builds in 0.18.0. |
|
@ken2812221 Could you update this PR to include docs changes. Related IRC discussion here, (lines 284 - ~335). |
|
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. ConflictsNo conflicts as of last run. |
|
Gitian fails with: |
|
@MarcoFalke Gitian build would still be failed now. It's still under investigation. |
|
One other thought, if we're changing this, do we want to explicitly pass the same version to anything in depends? i.e at the moment |
Not sure, that depends:
If either is yes, it might make sense to equalize them. If not, there's no point in doing this for dependencies. |
|
I found it be defined in many places. So I think it would be better to use |
TBH as it's part of the code itself (the "contract" with Windows), I personally prefer it to be defined in the code, not in the build system. |
|
Since #14881 was closed, this PR shall not be necessary anymore. This change could cause compilation issue on Mingw or we would have to define |
|
@ken2812221 #14881 has just been moved to #15052. |
Also remove all defines in many places and define it in configure stage to keep consistency.
|
Do we need to worry about |
|
Looks like you could drop this code: Lines 896 to 900 in 82cf681
|
|
Concept ACK |
|
@theuni can you weigh in here please |
"The AI_ADDRCONFIG flag is defined on the Windows SDK for Windows Vista and later. The AI_ADDRCONFIG flag is supported on Windows Vista and later." https://docs.microsoft.com/en-us/windows/desktop/api/ws2tcpip/nf-ws2tcpip-getaddrinfo However, the version of MinGW we use on Travis is not current and does not carry the relevant definition, as such I defined it in compat. https://github.com/wine-mirror/wine/blob/master/include/ws2tcpip.h Testing confirms that the PROTECTION_LEVEL_UNRESTRICTED, IPV6_PROTECTION_LEVEL, PROCESS_DEP_ENABLE, AI_ADDRCONFIG, are now supported by the version of Windows that we test against, so can be removed. https://travis-ci.org/bitcoin/bitcoin/jobs/483255439 https://travis-ci.org/Empact/bitcoin/jobs/484123087
|
This commit shows a few more settings that can be removed: I used the |
|
utACK d8a2992 |
|
re-utACK d0522ec |
|
Concept ACK. Agreed with @laanwj about the depends. I would think that qt would be the most likely to be problematic, but it appears to be handled sanely there: # Override MinGW's definition in _mingw.h
mingw: DEFINES += WINVER=0x600 _WIN32_WINNT=0x0600Which made me curious about WINVER. This msdn Article doesn't specifically mention that they need to be the same value, but imo it's implied. So, I think we should be setting both. Then there's a new snag. Leveldb sets src/Makefile.leveldb.include:LEVELDB_CPPFLAGS_INT += -DLEVELDB_PLATFORM_WINDOWS -DWINVER=0x0500 -D__USE_MINGW_ANSI_STDIO=1I tracked that down, and we actually added it ourselves in b102466: So it should be safe to bump that to whatever. I'd suggest:
Edit: Whoops, I see now that @Empact already mentioned WINVER. IMO we should indeed "worry about it", if for no other reason than to save ourselves from hard-to-track-down compile failures in the future. |
|
|
|
@ken2812221 Ok, yes, I see that: /* Choose WINVER Value */
#ifndef WINVER
#ifdef _WIN32_WINNT
#define WINVER _WIN32_WINNT
#else
#define WINVER 0x0502
#endif
#endifI guess the msvc headers work similarly? utACK as long as that's the case. |
0164b0f build: Remove WINVER pre define in Makefile.leveldb.inlcude (Chun Kuan Lee) d0522ec Drop defunct Windows compat fixes (Ben Woosley) d8a2992 windows: Call SetProcessDEPPolicy directly (Chun Kuan Lee) 1bd9ffd windows: Set _WIN32_WINNT to 0x0601 (Windows 7) (Chun Kuan Lee) Pull request description: The current minimum support Windows version is Vista. So set it to 0x0600 https://github.com/mirror/mingw-w64/blob/5a88def8ad862ef8f4e5f2e69661bfb2d07f1ce2/mingw-w64-headers/include/sdkddkver.h#L19 Tree-SHA512: 38e2afc79426ae547131c8ad3db2e0a7f54a95512f341cfa0c06e4b2fe79521ae67d2795ef96b0192e683e4f1ba6183c010d7b4b8d6b3e68b9bf48c374c59e7d
Summary: Was set to 0x0501 (XP) which is no longer supported. Backport of core [[bitcoin/bitcoin#14922 | PR14922]]. Test Plan: ``` cmake -GNinja ..\ -DCMAKE_TOOLCHAIN_FILE=../cmake/platforms/Win64.cmake \ -DBUILD_BITCOIN_SEEDER=OFF ninja ``` Reviewers: #bitcoin_abc, deadalnix Reviewed By: #bitcoin_abc, deadalnix Differential Revision: https://reviews.bitcoinabc.org/D7741

The current minimum support Windows version is Vista. So set it to 0x0600
https://github.com/mirror/mingw-w64/blob/5a88def8ad862ef8f4e5f2e69661bfb2d07f1ce2/mingw-w64-headers/include/sdkddkver.h#L19