Skip to content
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

msys2:change the error message to let user know how to work with windows arm64. #26466

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

codereba
Copy link
Contributor

@codereba codereba commented Jan 26, 2025

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:

======== Input profiles ========
Profile host:
[settings]
arch=armv8
build_type=Release
compiler=msvc
compiler.cppstd=14
compiler.runtime=dynamic
compiler.runtime_type=Release
compiler.version=194
os=Windows
[conf]

Profile build:
[settings]
arch=armv8
build_type=Release
compiler=msvc
compiler.cppstd=14
compiler.runtime=dynamic
compiler.runtime_type=Release
compiler.version=194
os=Windows
msys2/*:arch=x86_64
[conf]

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.


…un x86 emulation model on windows arm64.

Signed-off-by: codereba <[email protected]>
@codereba codereba changed the title msys2:change the error message to let user know how to work on windows arm64. msys2:change the error message to let user know how to work with windows arm64. Jan 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[question] Could we add the arm64 building support for msys2?
1 participant