Repository navigation
Fix Windows CI failure and update msys2 env - #419
Conversation
|
@prj-, have you had time to take a look? |
|
The latest pipeline has a couple of failures. Is it still ready for review? |
9c2cff8 to
d32d27b
Compare
|
You are prefixing some commits by |
|
Still failing. |
c87974b to
7cc0073
Compare
|
My bad, I forgot to adapt the new prefix of packages introduced by b079fb7. It should be better. |
There was a problem hiding this comment.
🟡 Changes recommended
The unchanged PETSc cache key risks restoring incompatible MINGW64 artifacts, while hardcoded UCRT64 dependency paths and missing ntldd can leave Windows packages without the correct runtime DLLs.
3 open issues
What changed in this PR
This PR addresses FreeFEM’s Windows MPI detection failures and updates its CI and installer packaging for MSYS2 UCRT64.
Changes:
- Fix Windows MPI wrapper discovery and normalize quoted compiler output.
- Migrate Windows CI dependencies to UCRT64 and remove macOS 14 matrix entries.
- Update runtime DLL collection and PETSc installer path handling.
| File | Description |
|---|---|
| Makefile.am | Use ntldd for DLL collection and a configurable PETSc path. |
| etc/config/m4/WindowsPackage.m4 | Remove the hardcoded legacy PETSc packaging fallback. |
| etc/config/m4/acmpi.m4 | Adjust MPI wrapper lookup, executable handling, and output parsing. |
| configure.ac | Correct Windows PETSc path conversion and substitution. |
| .github/workflows/sequential.yml | Switch Windows dependencies to UCRT64 and remove macOS 14. |
| .github/workflows/minimal.yml | Switch Windows dependencies to UCRT64 and remove macOS 14. |
| .github/workflows/full-msmpi.yml | Migrate MS-MPI dependencies and Python cleanup to UCRT64. |
| .github/workflows/full-mpich.yml | Remove macOS 14 from the build matrix. |
Review effort: Balanced
| mingw-w64-x86_64-cmake | ||
| mingw-w64-x86_64-msmpi | ||
| mingw-w64-ucrt-x86_64-cmake | ||
| mingw-w64-ucrt-x86_64-msmpi |
| # Also copy MSYS2 .dlls | ||
| win32: WindowsPackage.iss FreeFEM-documentation.pdf | ||
| ldd src/bin-win32/*.{dll,exe} | grep -vi /windows | grep -v /bin-win32 | grep -v libff.dll | grep '=>' | awk '{print "cp",$$3,"./src/bin-win32/"}' | sort -u | grep -v '[?]' | sh | ||
| ntldd -R src/bin-win32/*.{dll,exe} | grep -oiE '[A-Za-z0-9_.+-]+\.dll' | sort -u | while read d; do [ -f /ucrt64/bin/"$$d" ] && echo "cp -p /ucrt64/bin/$$d ./src/bin-win32/"; done | sh |
There was a problem hiding this comment.
Seems partially relevant to me since MinGW64 is not expected to be used anymore. But adding an MSYS2_PREFIX could be useful in case we want to also support clang64 environment. Is it something we want?
I'll modify readme/README_WINDOWS.md so that it doesn't mention mingw64 anymore.
There was a problem hiding this comment.
If things were already properly prefixed by ${MINGW_PREFIX}, then we wouldn't be in this situation.
|
There is a couple of credible comments by Copilot, please have a look. It's good to go on my end otherwise once these are addressed. |
- MinGW64 is deprecated. - Fix the Windows PETSc prefix.
$MPIRUN (where mpiexec.exe is) should not be searched on Windows. Instead search wrappers in MSYS2's path (like /ucrt64/bin).
If no .exe is added, CMake configured dependencies (like PARMETIS) fail to detect the compilers.
For I don't know what reason, globbing ldd src/bin-win32/*.{dll,exe} didn't
output libmsmpifec.dll, while ldd src/bin-win32/MUMPS.dll did.
ntldd seems a better tool for windows binaries, and does the job.
7cc0073 to
27bb3ad
Compare
|
I added the mods. It's ok for me. |
|
Will merge later today, thanks. |

Summary
I fixed the
make checkfailure offull-msmpi.yml. MUMPS.dll plugin couldn't be loaded because the plugin was not compiled due to no mpifc being detected (a dependency of MUMPS.cpp). I couldn't reproduce the problem on a local VM, but it appeared that the MPI detection was not fully fonctionnal. I also don't know why we didn't encounter the problem before...Main changes
mpi* -showcommands inetc/config/m4/acmpi.m4. It prevented ff_MPI_INCLUDE_DIR from being filled and messed up the Fortran MPI detection l.267-272.Secondary changes
src/bin-win32. I don't understand why, butldd src/win-bin32/*.{dll,exe}misseslibmsmpifec.dll, whileldd src-bin32/MUMPS.dll doesn't... AI told me that a better tool to use isntldd`, suited for Windows binaries, and all .dlls are now copied.Suggestions
I think we should stop the compilation somewhere between
ff-get-dep.inandload.link.inwhen a plugin's dependency is missing. Or maybe make a missing plugin in LIST_COMPILE fatal. It would ease the debugging of such situations. I can open another PR for this if you want.