-
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
Reset PROCESSOR_ARCHITECTURE on start #1297
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
…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 ```
I can't replicate the user's exact thing but I do see after .\vcpkg.exe install libxml2:x64-windows --binarysource=clear
[...]
Building libiconv:x64-windows...
[...]
CMake Error at scripts/cmake/vcpkg_configure_make.cmake:19 (message):
Unsupported host architecture in z_vcpkg_determine_autotools_host_cpu! which after this change becomes: .\vcpkg.exe install libxml2:x64-windows --binarysource=clear
[...]
Building libiconv:[email protected]#1...
[...]
Elapsed time to handle libiconv:x64-windows: 5.2 min |
Interestingly this is also fixed if the values are set to bogus. I don't know how but I'm just going to be happy it is: PS D:\vcpkg> echo "PROCESSOR_ARCHITEW6432: $env:PROCESSOR_ARCHITEW6432 PROCESSOR_ARCHITECTURE: $env:PROCESSOR_ARCHITECTURE"
PROCESSOR_ARCHITEW6432: fish PROCESSOR_ARCHITECTURE: fish
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
D:\vcpkg>exit
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 |
vicroms
approved these changes
Dec 11, 2023
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.
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: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:
After: