Skip to content

Conversation

@mmuetzel
Copy link
Contributor

This adds CI for building FlexiBLAS for Windows MinGW using the compiler toolchain and packages from MSYS2. Overall it is very similar to the existing CI that is running on Ubuntu images.

MSYS2 is a collection of tools and libraries providing you with an easy-to-use environment for building, installing and running native Windows software. It provides toolchains and packages for different build environments. These build environments mainly differ in the compiler toolchains (GCC vs. LLVM) that are used, the C/C++ libraries, and the target architecture (i686, x86_64, or arm64).

I chose to use the UCRT64, the CLANG64, and the CLANGARM64 environments. Please, let me know if you prefer to test with more or other environments.

The only environment that is currently capable of building for Windows on ARM is one that is based on LLVM (CLANGARM64). The Fortran compiler of that toolchain is LLVM Flang.
While this Fortran compiler has already come a long way in supporting most features that gfortran supports (and partly more), it is (still) incompatible/incomplete in some aspects (unfortunately).

It looks like there are some build issues with LLVM Flang. I'm not sure how to address them. Maybe, you'll have an idea how to interpret the error messages.
That's why the CI for the CLANG64 and CLANGARM64 environments is failing.
MSYS2 is cherry-picking a few patches from upstream when building the reference BLAS/LAPACK implementations:
https://github.com/msys2/MINGW-packages/blob/fc18ee4334b70d1daa411525209ea4d9d81cb295/mingw-w64-lapack/PKGBUILD#L30-L32
Maybe, they are also needed in the vendored version of LAPACK? (They don't really look related to the build errors to me.)

Independently, the test suite is failing in the UCRT64 environment. That environment is based on a GCC toolchain. It uses the "Universal C Runtime" (UCRT) as the Windows C library. The UCRT is a more modern implementation of the C library (compared to the older MSVCRT).
Like you wrote in #76 (comment), those test errors are likely due to how xerbla is implemented in shared libraries (if I understood correctly).

@mmuetzel
Copy link
Contributor Author

mmuetzel commented Nov 12, 2025

The error with LLVM Flang looks similar to the compilation error with the Intel Fortran compiler that is described here:
https://gitlab.com/Molcas/OpenMolcas/-/issues/338

For that project, it apparently helped to remove a -r8 flag for the Fortran compiler.

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.

1 participant