msys2:change the error message to let user know how to work with windows arm64. #26466
+2
−0
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.
fixes #26379
Summary
Changes to recipe: msys2/cci.latest
Motivation
msys2 now doesn't fully support native arm64, but its default installed x86_64 executable files can work on x86 emulation on windows 11 arm, please refer to:
https://learn.microsoft.com/en-us/windows/arm/apps-on-arm-x86-emulation
And can use the mingw-w64-cross-gcc package fro arm64 cross build from x64, please refer to:
https://github.com/Windows-on-ARM-Experiments/msys2-woarm64-build
so, we can set the arch of build profile to x64 and the arch of host profile to arm64 for msys2:
or add the --settings:build command line argument:
conan install --require=libxxx/xxx --build=missing --settings:build="msys2/*:arch=x86_64"
That will try to run msys2 in x86 emulation mode, work together with other arm64 native tool; and if any recipe needs arm cross build, it can install mingw-w64-cross-gcc package and utilize it manually.
Details
The error message can be refined to tip user how to correctly run x64 files of msys2, if user doesn't have this background knowledge, they will consume many time to research, and may not find the simple way to make the build successfully.
I think msys2 will support native arm64 in future, and this rare issue only happened between windows with x86 emulation and no arm64 tool, it may be not suitable enough to write in the document.