Skip to content

Fable v3 windows#1207

Merged
henderkes merged 30 commits into
v3from
fable-v3-windows
Jul 10, 2026
Merged

Fable v3 windows#1207
henderkes merged 30 commits into
v3from
fable-v3-windows

Conversation

@henderkes

Copy link
Copy Markdown
Collaborator

What does this PR do?

Checklist before merging

  • If you modified *.php or *.yml, run them locally to ensure your changes are valid:
    • composer cs-fix
    • composer analyse
    • composer test
    • bin/spc dev:lint-config

henderkes and others added 5 commits June 14, 2026 11:51
…lang >= 20

Go passes the MinGW-only -mthreads flag to the C compiler for cgo builds
(golang/go#16932); Clang >= 20 rejects it for the MSVC target, so the final
frankenphp go build fails on current windows-latest (VS 18 / LLVM 20+).

Wrap Clang with a generated .bat that drops the -mthreads token and forwards
the rest, used only when the detected Clang refuses the flag.
@crazywhalecc crazywhalecc added the need-test This PR has not been tested yet, cannot merge now label Jul 8, 2026
@github-actions

github-actions Bot commented Jul 8, 2026

Copy link
Copy Markdown

StaticPHP Test Bot

Detected: Extensions: imagick, pgsql, xlswriter | Libraries: imagemagick, libiconv-win, libzip, openssl, postgresql | Targets: curl
Active labels: sapi/frankenphp
Available labels: need-test (gate), test/linux test/windows test/macos (platform), test/tier2 (extra arch), test/php-83 test/php-84 (PHP version), sapi/frankenphp (extra FrankenPHP SAPI build)
Config: Linux x86_64 + Windows x86_64 + macOS arm64 | PHP 8.5 NTS + SAPI: frankenphp (Tier1 Linux/macOS/Windows)

@crazywhalecc

crazywhalecc commented Jul 8, 2026

Copy link
Copy Markdown
Owner

postgresql build depends on meson that we haven't installed in our procedure. Either install in msys2, or add a separate tool package to install, if we really need to build pgsql from source.

@m-this

m-this commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Fixes for the three failing Windows tests are in #1208 (four separate bugs, details over there). Hope it helps getting this branch merged 🙂

m-this and others added 15 commits July 8, 2026 11:15
- the meson build assumed meson/ninja/win_flex/win_bison/perl on PATH,
  which only held on machines that had them installed
- add meson, ninja and winflexbison tool packages and declare them via
  tools@windows on postgresql, together with the existing strawberry-perl
- meson no longer ships a Windows MSI, so the wheel is installed offline
  into a venv: postgres re-invokes meson through find_program, which
  needs the real meson.exe launcher pip generates
- php.exe already links with /FORCE:MULTIPLE for extension-bundled
  duplicate symbols, cgi and micro did not
- imagick's MagickCore defines gettimeofday, also defined in php's
  time.obj, and both links failed with LNK2005
- libpq authenticates through SSPI and the static libcrypto behind it
  reads the system cert store; php.exe failed to link with unresolved
  Cert* and SSPI symbols when the openssl extension is not in the build
- static-libs@windows listed both libiconv.lib (the dll import lib) and
  libiconv_a.lib; the import lib came first, so php.exe ended up
  importing libiconv.dll and the cli smoke test died with
  STATUS_DLL_NOT_FOUND on machines without it
- add a python-win tool package that unzips the official python.org
  nuget package into the pkgroot (venv and ensurepip included)
- meson uses it to build its venv and only falls back to a system
  python, so no manual environment setup is needed
…dle hash storage for both file and directory targets
@crazywhalecc

Copy link
Copy Markdown
Owner

Even in C:\im, we still have long command line issue: https://github.com/crazywhalecc/static-php-cli/actions/runs/28992053641/job/86034014713

@henderkes

Copy link
Copy Markdown
Collaborator Author

@crazywhalecc

crazywhalecc commented Jul 9, 2026

Copy link
Copy Markdown
Owner

DigitalOcean spaces exceeds 1024GB/month bandwidth and RackNerd VPS looks not stable though. Perhaps it's worth considering switching to Cloudflare R2 and enabling CDN.

@henderkes

Copy link
Copy Markdown
Collaborator Author

Digital Ocean is limited to just 1TB? I exceed that on just my package delivery.

If Cloudflare R2 isn't too expensive, perhaps. Though we don't really need CDN, just stable connection for the GH runners.

@m-this

m-this commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Maybe using a response file like in php-src’s Makefile would work for the command length limit on Windows ?clang and lld both accept @libs.rsp, php-src's Windows Makefile already does that for its lists (the *_RESP variables).

- with big extension stacks (imagick) the link command lines exceed what
  cmd.exe allows and fail with 'The command line is too long'
- pass the collected LIBS_CLI/LIBS_CGI/LIBS_MICRO lib lists to link.exe
  through @response files, like php-src already does for its object lists
- compile the frankenphp -mthreads shim instead of generating a .bat:
  batch files run through cmd.exe and cap cgo link lines at 8191 chars,
  a real executable gets the full 32K and past that go writes a response
  file by itself; still probe-gated, still a stopgap for golang/go#80290
@m-this

m-this commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Opened #1209 for the cmd command line limit that killed the imagick [frankenphp] job.

m-this and others added 2 commits July 10, 2026 10:52
- C:\im was outside the project so bin/spc reset could not clean it
- with the command line limit fixed a short base path is no longer
  needed; keep SPC_IMAGEMAGICK_BUILD_DIR as an override
@henderkes henderkes merged commit 422323a into v3 Jul 10, 2026
78 of 80 checks passed
@henderkes henderkes deleted the fable-v3-windows branch July 10, 2026 16:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

need-test This PR has not been tested yet, cannot merge now sapi/frankenphp

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants