feat(windows): replace php-sdk-binary-tools with MSYS2 + 7za-win#1193
Conversation
- Add msys2-build-essentials target: downloads the MSYS2 nightly sfx,
extracts it, disables PGP keyring (CI-safe), runs two-pass pacman
update, and installs autotools build essentials (make, autoconf,
automake, libtool, pkgconf, perl).
- Add 7za-win target: downloads 7za.exe to PKG_ROOT_PATH\bin.
- Remove php-sdk-binary-tools target and all PHP_SDK_PATH references;
replace with SPC_MSYS2_PATH throughout Artifact, ArtifactExtractor,
FileSystem, DefaultShell and MSVCToolchain.
- Replace {php_sdk_path} path placeholder with {spc_msys2_path}.
- WindowsToolCheck: replace checkSDK/installSDK with checkMsys2,
installMsys2 and check7zaWin/install7zaWin fix items.
- nasm.yml: extract nasm.exe/ndisasm.exe to {pkg_root_path}/bin.
- env.ini: rename PHP_SDK_PATH to SPC_MSYS2_PATH.
- Docs: update Windows migration guide and package-model placeholder docs.
|
StaticPHP Test Bot Detected: Extensions: |
All GNU packages now use ftp.gnu.org (stable canonical server) as the primary filelist source, with ftpmirror.gnu.org configured as source-mirror fallback. ftpmirror uses DNS round-robin across many mirrors of varying reliability; this setup eliminates random CI failures caused by unreachable mirror nodes while preserving a fallback path.
…ersion check for MSVC + msys2
|
I'm not fully familiar with msys2, but wasn't it dev tools and libraries meant for building mingw applications? |
phpsdk-binary-tools uses imcomplete version, it does not have make, autoconf, etc. Yeah it's built for mingw libs and apps, and it will extend our capabilities. |
|
The thing is that php explicitly doesn't support compiling under mingw, so I'm surprised this even works. Especially with msvc as compiler? |
|
We are not going to build PHP under mingw. Some libs can and only can be built with mingw. Switching to msys2 does not affect known libraries and PHP builds, but it allows us to build libraries that depend on mingw. |
|
But MSVC can't link MinGW built static libraries. I meant it might work for C libraries with a small libc surface, but it will fail for anything else, especially C++. I'm not sure this is a great idea. Or is this for building binaries other than php? |
|
My initial plan was to allow us to use autoconf to handle some libraries and then build using MSVC, but my local branch was recently lost (the virtual machine was corrupted), and I forgot what library I was supposed to add over a month ago. But it does seem like a good option, allowing us to build MinGW things instead of necessarily using MSVC. |
henderkes
left a comment
There was a problem hiding this comment.
I guess as long as we're only using it for the binaries, or to build non-php binaries, it's okay. We need to be careful though not to accidentally leak anything mingw libc related into php though.
What does this PR do?
Also:
Checklist before merging
*.phpor*.yml, run them locally to ensure your changes are valid:composer cs-fixcomposer analysecomposer testbin/spc dev:lint-config