MSYS2-packages
MSYS2-packages copied to clipboard
Will There be an ARM/ARM64 Windows Support Soon?
Hello devs,
I would like to know if there will be an ARM/ARM64 Windows support for MinGW's toolchain (such as GCC/G++), since Windows 10 ARM/ARM64 will be widely adopted soon with the release of Microsoft Surface Pro X that comes pre-installed with Windows 10 ARM64?
I don’t plan to support it myself, only if someone want to volunteer it
What will be the necessary steps to make a ARM64 msys2 installation? Any Wiki or docs?
I don't have docs/wikis per se, but I found a repo that instructs on building Mingw+LLVM on Windows/Ubuntu that targets Windows MinGW. This is the link to the repo: https://github.com/mstorsjo/llvm-mingw. It also contains prebuilt binaries for all four architectures: armv7 (ARM), aarch64 (ARM64), i686 (X86), and x86_64 (X86-64). However, the clang++ being used is defaulting to libc++.dll, which, for example, doesn't yet support std::filesystem, while libstdc++.dll (GNU toolchain in MSYS2 for MinGW) does. Aside from that, it would be nice to have a fully integrated system for MSYS2+MinGW with Pacman, much like the already available one for X86 and X86_64, which also supports GNU toolchain, for ARM/ARM64 targets.
Is it possible to cross compile msys2 for ARM64 in Arch Linux ARM64?
I believe the problem is that there are no assemblers built yet for ARM64 for Windows for the GNU toolchain, and that might be what's holding back the build for MSYS2. I might be mistaken here. The MSYS2 devs knows better.
Is there an update on this issue? I would appreciate if there were ARM compilers available for Windows for ARM.
Some native AArch64 mingw toolchain is available in clangarm64 repository (https://repo.msys2.org/mingw/clangarm64/). But it is in experimental stage now. But the msys2 itself is only x86_64.
@Biswa96 How would I install these? I don't see any instructions or any installation files. I'm also a bit confused because the *.tar.*
formats are typically used on Linux, but MinGW stands for Minimalist GNU for Windows.
As I said, the aarch64 is only in experimental first stage. Hence there is no instructions. Here is a gist:
- Install msys2 installer in your machine. The OS should support x86_64 emulation in aarch64.
- Add this in /etc/pacman.conf file
[clangarm64]
Include = /etc/pacman.d/mirrorlist.mingw
- Run
C:\msys64\msys2_shell.cmd -defterm -no-start -clangarm64
(assume mssy2 is installed in C:\msys64). - Run
pacman -Syy
andpacman -S <package>
to download aarch64 packages.
I may be wrong. @jeremyd2019 can provide further details.
BTW, if you are looking for cross compile toolchain for aarch64 then llvm-mingw is the right one.
- Install msys2 installer in your machine. The OS should support x86_64 emulation in aarch64.
Only on Windows 11. If you're still on 10, you'd have to use i686 msys2, which is no longer supported. It's possible, but more tricky.
- Run
C:\msys64\msys2_shell.cmd -defterm -no-start -clangarm64
(assume mssy2 is installed in C:\msys64).
You'd need to have updated msys2 before that would work (filesystem-2021.11-1 added -clangarm64 option)
- Run
pacman -Syy
andpacman -S <package>
to download aarch64 packages.
the first <package>
you would probably want is actually the toolchain group... pacman -S --needed mingw-w64-clang-aarch64-toolchain
The packages available are pretty limited. I could work on getting more if there are particular few you need, but the main limiting factor is that there is no hosted Github Actions runner for ARM64, so all the packages currently get built on my Raspberry Pi 4 8GB.
I'm on Windows 11 for ARM. I downloaded the latest MSYS2 for x86_64 from the website (msys2-x86_64-20210725
), ran it, updated, then after updating with pacman -Syyu
I was able to launch MSYS2 with C:\msys64\msys2_shell.cmd -defterm -no-start -clangarm64
, however uname -a
reports the system is x86_64
. Then when I tried this command, it failed:
$ pacman -S --needed mingw-w64-clang-aarch64-toolchain
error: target not found: mingw-w64-clang-aarch64-toolchain
The packages available are pretty limited. I could work on getting more if there are particular few you need, but the main limiting factor is that there is no hosted Github Actions runner for ARM64, so all the packages currently get built on my Raspberry Pi 4 8GB.
GCC and/or Clang/LLVM, Python 3 (including pip). I'm compiling Godot. The Linux dependencies also include pkg-config and development libraries for X11, Xcursor, Xinerama, Xi, XRandR, MesaGL, ALSA, PulseAudio, but I'm not sure if these are needed for compiling the Windows version of Godot.
If desired I can donate my computing power. I have an M1 Pro Mac, I can just set up a VM and give you remote access to it. This definitely wouldn't be a 24/7 solution, but if packages are needed to be built at some frequency then I can plan for it, and also it has surprisingly fast CPU performance so it probably wouldn't take much time each time.
I'm on Windows 11 for ARM. I downloaded the latest MSYS2 for x86_64 from the website (
msys2-x86_64-20210725
), ran it, updated, then after updating withpacman -Syyu
I was able to launch MSYS2 withC:\msys64\msys2_shell.cmd -defterm -no-start -clangarm64
, howeveruname -a
reports the system isx86_64
. Then when I tried this command, it failed:$ pacman -S --needed mingw-w64-clang-aarch64-toolchain error: target not found: mingw-w64-clang-aarch64-toolchain
You need to add the clangarm64 repo to pacman.conf as Biswa96 said. and then run pacman -Sy
(you can combine that as pacman -Sy --needed
...)
The packages available are pretty limited. I could work on getting more if there are particular few you need, but the main limiting factor is that there is no hosted Github Actions runner for ARM64, so all the packages currently get built on my Raspberry Pi 4 8GB.
GCC and/or Clang/LLVM, Python 3 (including pip).
GCC does not support Windows on ARM. We have clang/llvm, and python3. I don't think I did pip. Even if we had pip, it probably wouldn't be horribly useful as I don't expect any Windows ARM64 wheels exist (and if they did they probably wouldn't be compatible). It looks like you might just need scons. That should be more doable.
I'm compiling Godot. The Linux dependencies also include pkg-config and development libraries for X11, Xcursor, Xinerama, Xi, XRandR, MesaGL, ALSA, PulseAudio, but I'm not sure if these are needed for compiling the Windows version of Godot.
The godot package has quite a few dependencies, it would be quite some effort to get all of them going on ARM64. Maybe you'll be lucky and they'll be optional?
Isn't possible to build MSYS2-packages for aarch64 using msys2/clang?
That will be some sort of cross compiling. But native compiler toolchain is used/preferred to build mingw packages. I can try to help expand aarch64 packages but it has to be built somewhere. Everyone has to trust a machine.
#8762 I have played around with setting up cross compiling for people who want it, but the PKGBUILDs assume they're building native.
I was talking about native compilation. I mean bootstrap clang/msys2 on aarch64 and then use it to build natively the other packages. Maybe the biggest blocker here is msys2-runtime (cygwin).
You need to add the clangarm64 repo to pacman.conf as Biswa96 said. and then run pacman -Sy
Thanks, that worked for installing the package. I didn't look closely enough that I had to follow the instructions in both posts.
As you noted there are a lot of dependencies. Most are optional and can be disabled by disabling modules, I'll see if I can make it work. I've started compiling and so far it seems to function, Task Manager says that clang++
is "ARM64" (although MSYS2's Bash is still "x64" aka x86_64, it would be nice to have ARM64 everything).
EDIT: It's missing OpenGL, so the linker can't link it together. I think that Mesa needs to be ported.
I was talking about native compilation. I mean bootstrap clang/msys2 on aarch64 and then use it to build natively the other packages. Maybe the biggest blocker here is msys2-runtime (cygwin).
Technically, and I'm sure it's been mentioned already, but on windows arm there's a layer for running regular 32bit/64bit on arm, so you could run msys2 already. But I will say, I wouldn't mind seeing the runtime itself natively on arm.
It's missing OpenGL, so the linker can't link it together.
There is some confusion about opengl in win arm. See this issue for detailed info https://github.com/mstorsjo/llvm-mingw/issues/209.
Looks like it's now fixed upstream: https://sourceforge.net/p/mingw-w64/mailman/message/37403944/
EDIT: or not?
I am looking for some test environments for https://github.com/lhmouse/mcfgthread. Would you please give it a try?
[There is an issue in Clang which prevents the pre-compiled header from working, so it has to be disabled.]
autoreconf -i
./configure --disable-pch
make
make check
Regarding this topic: I have made crude Cygwin targets for LLVM but quickly given up since building Cygwin seems to require huge amount of linker scripts magic (tested with x86_64 target) which very likely will be never supported by LLD's COFF backend.
I would reckon that cygwin would need to be changed to support lld in this case I guess and that's not an easy task I would imagine.