- Notifications
- Fork 35.4k
-
Star 76.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
windows: Set _WIN32_WINNT to 0x0601 (Windows 7) #14922
windows: Set _WIN32_WINNT to 0x0601 (Windows 7) #14922
Conversation
ken2812221
commented
Dec 11, 2018
•
edited
edited
laanwj
commented
Dec 11, 2018
•
edited
edited
|
ken2812221
commented
Dec 11, 2018
@laanwj Oh, I saw #12546 and thought that we didn't support Vista anymore. Changed to 0x0600 (Vista) |
laanwj
commented
Dec 11, 2018
•
edited
edited
What does this change do? |
ken2812221
commented
Dec 11, 2018
#14881 is using |
kristapsk
commented
Dec 11, 2018
If |
laanwj
commented
Dec 11, 2018
@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. |
kristapsk
commented
Dec 11, 2018
Ok, then it's strong utACK from me, nobody should run Bitcoin Core on XP anymore. |
kristapsk
commented
Dec 12, 2018
But should be mentioned in release notes. |
luke-jr
commented
Dec 12, 2018
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. |
laanwj
commented
Dec 12, 2018
•
edited
edited
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 |
DrahtBot
commented
Dec 12, 2018
Gitian builds for commit 5f23460 (master):
Gitian builds for commit 5d233926dec4b3df52849cd15e4a86429adfd8bc (master and this pull):
|
fanquake
commented
Dec 12, 2018
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. |
fanquake
commented
Dec 12, 2018
@ken2812221 Could you update this PR to include docs changes. Related IRC discussion here, (lines 284 - ~335). |
DrahtBot
commented
Dec 12, 2018
•
edited
edited
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. ConflictsNo conflicts as of last run. |
maflcko
commented
Dec 12, 2018
Gitian fails with:
|
ken2812221
commented
Dec 12, 2018
•
edited
edited
@MarcoFalke Gitian build would still be failed now. It's still under investigation. |
fanquake
commented
Dec 12, 2018
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 |
laanwj
commented
Dec 13, 2018
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. |
ken2812221
commented
Dec 14, 2018
I found it be defined in many places. So I think it would be better to use |
laanwj
commented
Dec 14, 2018
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. |
ken2812221
commented
Jan 2, 2019
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 |
fanquake
commented
Jan 2, 2019
@ken2812221 #14881 has just been moved to #15052. |
Also remove all defines in many places and define it in configure stage to keep consistency.
Empact
commented
Jan 23, 2019
Do we need to worry about |
Empact
commented
Jan 23, 2019
Looks like you could drop this code: bitcoin/src/init.cpp Lines 896 to 900 in 82cf681
|
Empact
commented
Jan 23, 2019
Concept ACK |
windows: Call SetProcessDEPPolicy directly
d8a2992
laanwj
commented
Jan 24, 2019
@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
Empact
commented
Jan 25, 2019
This commit shows a few more settings that can be removed: I used the |
Empact
commented
Jan 25, 2019
utACK d8a2992 |
Empact
commented
Jan 25, 2019
re-utACK d0522ec |
theuni
commented
Jan 25, 2019
•
edited
edited
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=0x0600 Which 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=1 I 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. |
build: Remove WINVER pre define in Makefile.leveldb.inlcude
0164b0f
ken2812221
commented
Jan 26, 2019
•
edited
edited
|
theuni
commented
Jan 26, 2019
@ken2812221 Ok, yes, I see that: /* Choose WINVER Value */
#ifndef WINVER
#ifdef _WIN32_WINNT
#define WINVER _WIN32_WINNT
#else
#define WINVER 0x0502
#endif
#endif I guess the msvc headers work similarly? utACK as long as that's the case. |
0164b0f
into
bitcoin:master
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