-
Notifications
You must be signed in to change notification settings - Fork 296
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
Detect WOW64 through IsWow64Process(2) #769
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…CESSOR_ARCHITEW6432.
ras0219-msft
approved these changes
Oct 25, 2022
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.
❤️
BillyONeal
added a commit
to BillyONeal/vcpkg-tool
that referenced
this pull request
Dec 5, 2023
…ect that Ninja is safe to use. There, despite being on an amd64 system, this block didn't detect that things were OK: https://github.com/microsoft/vcpkg/blob/08c4e71048eb54733d9b180a28b9b1d7ce637454/ports/vcpkg-cmake/vcpkg_cmake_configure.cmake#L55-L61 We are unable to replicate the problem, but suspect that they may be in an environment where PROCESSOR_ARCHITECTURE isn't set properly, similar to what we experienced in microsoft#769 . Try to fix this problem by explicitly setting it to what it should be. Before: ```console PS D:\vcpkg> rm env:PROCESSOR_ARCHITECTURE Remove-Item: Cannot find path 'Env:\PROCESSOR_ARCHITECTURE' because it does not exist. PS D:\vcpkg> rm env:PROCESSOR_ARCHITEW6432 Remove-Item: Cannot find path 'Env:\PROCESSOR_ARCHITEW6432' because it does not exist. PS D:\vcpkg> echo "PROCESSOR_ARCHITEW6432: $env:PROCESSOR_ARCHITEW6432 PROCESSOR_ARCHITECTURE: $env:PROCESSOR_ARCHITECTURE" PROCESSOR_ARCHITEW6432: PROCESSOR_ARCHITECTURE: PS D:\vcpkg> .\vcpkg.exe env Microsoft Windows [Version 10.0.22631.2715] (c) Microsoft Corporation. All rights reserved. D:\vcpkg>echo PROCESSOR_ARCHITEW6432: %PROCESSOR_ARCHITEW6432% PROCESSOR_ARCHITECTURE: %PROCESSOR_ARCHITECTURE% PROCESSOR_ARCHITEW6432: %PROCESSOR_ARCHITEW6432% PROCESSOR_ARCHITECTURE: %PROCESSOR_ARCHITECTURE% D:\vcpkg>exit PS D:\vcpkg> echo "PROCESSOR_ARCHITEW6432: $env:PROCESSOR_ARCHITEW6432 PROCESSOR_ARCHITECTURE: $env:PROCESSOR_ARCHITECTURE" PROCESSOR_ARCHITEW6432: PROCESSOR_ARCHITECTURE: PS D:\vcpkg> .\vcpkg.exe env C:\Windows\SysWOW64\cmd.exe Microsoft Windows [Version 10.0.22631.2715] (c) Microsoft Corporation. All rights reserved. D:\vcpkg>echo PROCESSOR_ARCHITEW6432: %PROCESSOR_ARCHITEW6432% PROCESSOR_ARCHITECTURE: %PROCESSOR_ARCHITECTURE% PROCESSOR_ARCHITEW6432: %PROCESSOR_ARCHITEW6432% PROCESSOR_ARCHITECTURE: %PROCESSOR_ARCHITECTURE% ``` After: ```console PS D:\vcpkg> rm env:PROCESSOR_ARCHITECTURE PS D:\vcpkg> rm env:PROCESSOR_ARCHITEW6432 Remove-Item: Cannot find path 'Env:\PROCESSOR_ARCHITEW6432' because it does not exist. PS D:\vcpkg> echo "PROCESSOR_ARCHITEW6432: $env:PROCESSOR_ARCHITEW6432 PROCESSOR_ARCHITECTURE: $env:PROCESSOR_ARCHITECTURE" PROCESSOR_ARCHITEW6432: PROCESSOR_ARCHITECTURE: PS D:\vcpkg> .\vcpkg.exe env Microsoft Windows [Version 10.0.22631.2715] (c) Microsoft Corporation. All rights reserved. D:\vcpkg>echo PROCESSOR_ARCHITEW6432: %PROCESSOR_ARCHITEW6432% PROCESSOR_ARCHITECTURE: %PROCESSOR_ARCHITECTURE% PROCESSOR_ARCHITEW6432: %PROCESSOR_ARCHITEW6432% PROCESSOR_ARCHITECTURE: AMD64 D:\vcpkg>exit PS D:\vcpkg> echo "PROCESSOR_ARCHITEW6432: $env:PROCESSOR_ARCHITEW6432 PROCESSOR_ARCHITECTURE: $env:PROCESSOR_ARCHITECTURE" PROCESSOR_ARCHITEW6432: PROCESSOR_ARCHITECTURE: PS D:\vcpkg> .\vcpkg.exe env C:\Windows\SysWOW64\cmd.exe Microsoft Windows [Version 10.0.22631.2715] (c) Microsoft Corporation. All rights reserved. D:\vcpkg>echo PROCESSOR_ARCHITEW6432: %PROCESSOR_ARCHITEW6432% PROCESSOR_ARCHITECTURE: %PROCESSOR_ARCHITECTURE% PROCESSOR_ARCHITEW6432: AMD64 PROCESSOR_ARCHITECTURE: x86 ```
vicroms
pushed a commit
that referenced
this pull request
Dec 11, 2023
A customer reported a problem where sometimes `vcpkg-cmake` can't detect that Ninja is safe to use. There, despite being on an amd64 system, this block didn't detect that things were OK: (#1297)https://github.com/microsoft/vcpkg/blob/08c4e71048eb54733d9b180a28b9b1d7ce637454/ports/vcpkg-cmake/vcpkg_cmake_configure.cmake#L55-L61 We are unable to replicate the problem, but suspect that they may be in an environment where PROCESSOR_ARCHITECTURE isn't set properly, similar to what we experienced in #769 . Try to fix this problem by explicitly setting it to what it should be. Before: ```console PS D:\vcpkg> rm env:PROCESSOR_ARCHITECTURE Remove-Item: Cannot find path 'Env:\PROCESSOR_ARCHITECTURE' because it does not exist. PS D:\vcpkg> rm env:PROCESSOR_ARCHITEW6432 Remove-Item: Cannot find path 'Env:\PROCESSOR_ARCHITEW6432' because it does not exist. PS D:\vcpkg> echo "PROCESSOR_ARCHITEW6432: $env:PROCESSOR_ARCHITEW6432 PROCESSOR_ARCHITECTURE: $env:PROCESSOR_ARCHITECTURE" PROCESSOR_ARCHITEW6432: PROCESSOR_ARCHITECTURE: PS D:\vcpkg> .\vcpkg.exe env Microsoft Windows [Version 10.0.22631.2715] (c) Microsoft Corporation. All rights reserved. D:\vcpkg>echo PROCESSOR_ARCHITEW6432: %PROCESSOR_ARCHITEW6432% PROCESSOR_ARCHITECTURE: %PROCESSOR_ARCHITECTURE% PROCESSOR_ARCHITEW6432: %PROCESSOR_ARCHITEW6432% PROCESSOR_ARCHITECTURE: %PROCESSOR_ARCHITECTURE% D:\vcpkg>exit PS D:\vcpkg> echo "PROCESSOR_ARCHITEW6432: $env:PROCESSOR_ARCHITEW6432 PROCESSOR_ARCHITECTURE: $env:PROCESSOR_ARCHITECTURE" PROCESSOR_ARCHITEW6432: PROCESSOR_ARCHITECTURE: PS D:\vcpkg> .\vcpkg.exe env C:\Windows\SysWOW64\cmd.exe Microsoft Windows [Version 10.0.22631.2715] (c) Microsoft Corporation. All rights reserved. D:\vcpkg>echo PROCESSOR_ARCHITEW6432: %PROCESSOR_ARCHITEW6432% PROCESSOR_ARCHITECTURE: %PROCESSOR_ARCHITECTURE% PROCESSOR_ARCHITEW6432: %PROCESSOR_ARCHITEW6432% PROCESSOR_ARCHITECTURE: %PROCESSOR_ARCHITECTURE% ``` After: ```console PS D:\vcpkg> rm env:PROCESSOR_ARCHITECTURE PS D:\vcpkg> rm env:PROCESSOR_ARCHITEW6432 Remove-Item: Cannot find path 'Env:\PROCESSOR_ARCHITEW6432' because it does not exist. PS D:\vcpkg> echo "PROCESSOR_ARCHITEW6432: $env:PROCESSOR_ARCHITEW6432 PROCESSOR_ARCHITECTURE: $env:PROCESSOR_ARCHITECTURE" PROCESSOR_ARCHITEW6432: PROCESSOR_ARCHITECTURE: PS D:\vcpkg> .\vcpkg.exe env Microsoft Windows [Version 10.0.22631.2715] (c) Microsoft Corporation. All rights reserved. D:\vcpkg>echo PROCESSOR_ARCHITEW6432: %PROCESSOR_ARCHITEW6432% PROCESSOR_ARCHITECTURE: %PROCESSOR_ARCHITECTURE% PROCESSOR_ARCHITEW6432: %PROCESSOR_ARCHITEW6432% PROCESSOR_ARCHITECTURE: AMD64 D:\vcpkg>exit PS D:\vcpkg> echo "PROCESSOR_ARCHITEW6432: $env:PROCESSOR_ARCHITEW6432 PROCESSOR_ARCHITECTURE: $env:PROCESSOR_ARCHITECTURE" PROCESSOR_ARCHITEW6432: PROCESSOR_ARCHITECTURE: PS D:\vcpkg> .\vcpkg.exe env C:\Windows\SysWOW64\cmd.exe Microsoft Windows [Version 10.0.22631.2715] (c) Microsoft Corporation. All rights reserved. D:\vcpkg>echo PROCESSOR_ARCHITEW6432: %PROCESSOR_ARCHITEW6432% PROCESSOR_ARCHITECTURE: %PROCESSOR_ARCHITECTURE% PROCESSOR_ARCHITEW6432: AMD64 PROCESSOR_ARCHITECTURE: x86 ```
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
… rather than inspecting
PROCESSOR_ARCHITEW6432
.