You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Originally, I was hoping to use the detect_architecture() function in VCEnvironment.cmake to solve this problem, but it turned out detect_architecture cannot detect the ARCH on ARM. Here is a similar issue: microsoft/vcpkg#17832
An unrelated suggestion is that I would like to move the inclusion of Utilities.cmake outside of the file VCEnvironment.cmake, since the functions in Utilities.cmake are no longer exclusively used by that single file.
Upvote & Fund
I am using Polar.sh so you can upvote and help fund this issue. The funding is received once the issue is completed & confirmed by you.
Thank you in advance for helping prioritize & fund our backlog.
The text was updated successfully, but these errors were encountered:
cmake >=3.17.0 fixed this problem by using the result of uname -m on Linux.
And this is what I'm doing in my configuration:
# CMAKE_HOST_SYSTEM_PROCESSOR is not helpful because it outputs "unknown" on
# Linux on ARM.
execute_process(
COMMAND "uname" "--machine" OUTPUT_VARIABLE MACHINE_HARDWARE_NAME
COMMAND_ERROR_IS_FATAL LAST)
string(TOLOWER "${MACHINE_HARDWARE_NAME}" MACHINE_HARDWARE_NAME_LOWER)
# vcpkg: Environment variable VCPKG_FORCE_SYSTEM_BINARIES must be set on arm,
# s390x, and ppc64le platforms.
# See https://github.com/microsoft/vcpkg-tool/blob/2022-02-24/src/vcpkg.cpp#L257-L266
if((MACHINE_HARDWARE_NAME_LOWER MATCHES "^arm"
OR MACHINE_HARDWARE_NAME_LOWER MATCHES "^aarch64"
OR MACHINE_HARDWARE_NAME_LOWER MATCHES "^s390x"
OR MACHINE_HARDWARE_NAME_LOWER MATCHES "^ppc64"
)
AND NOT CMAKE_HOST_SYSTEM_NAME STREQUAL "Windows"
AND NOT CMAKE_HOST_SYSTEM_NAME STREQUAL "Darwin")
set(ENV{VCPKG_FORCE_SYSTEM_BINARIES} 1)
endif()
For the placement of including the Utilities.cmake, if eventually we solve the problem of setting the VCPKG_FORCE_SYSTEM_BINARIES for vcpkg running on ARM, I think we should include the Utilities.cmake before including the Vcpkg.cmake in Index.cmake.
When installing libraries, vcpkg raises this error:
Ref: https://github.com/microsoft/vcpkg-tool/blob/2022-02-11/src/vcpkg.cpp#L61
Originally, I was hoping to use the
detect_architecture()
function inVCEnvironment.cmake
to solve this problem, but it turned outdetect_architecture
cannot detect the ARCH on ARM. Here is a similar issue: microsoft/vcpkg#17832For cmake < 3.17,
CMAKE_HOST_SYSTEM_PROCESSOR
uses the commanduname -p
to get the result but it simply returns "unknown" on ARM: https://cmake.org/cmake/help/v3.16/variable/CMAKE_HOST_SYSTEM_PROCESSOR.htmlAn unrelated suggestion is that I would like to move the inclusion of
Utilities.cmake
outside of the fileVCEnvironment.cmake
, since the functions inUtilities.cmake
are no longer exclusively used by that single file.Upvote & Fund
I am using Polar.sh so you can upvote and help fund this issue. The funding is received once the issue is completed & confirmed by you.
Thank you in advance for helping prioritize & fund our backlog.
The text was updated successfully, but these errors were encountered: