Feat/pgo v3#1138
Conversation
|
StaticPHP Test Bot Detected: Extensions: |
|
(I tested with static-php/packages v3 branch, php 8.5 zig on rpm. Tests with Alpine and gcc are still to finish in a few hours when ci runs.) |
|
Wair, why is curl a target like php and not a package/library? We don't compile the exe right? |
We could compile curl.exe, which shows that StaticPHP is not only suitable for building static PHP, but also for other projects. Just like we already support building pkg-config and re2c. Making them targets simply makes reasonable.
|
…ith different pkg_root_path set
…fined behaviour sanitizer)
Okay, added curl.exe on Windows too. Also figured out the root cause of the BUILD_CC patch minilua crash (zigs undefined behaviour sanitizer tripping up, if you run |
|
Oh, there's even an issue running the binaries despite no undefined sanitizer that I can't reproduce locally or in docker. Very weird. |
|
wtf I have no idea what failed in the tests and why. it passes locally and looking for php-config there makes no sense, neither of the new extensions does it |
|
had claude pull everything and this is what it thinks the problem is with CI I'll get a PR up with the fix and we'll see if it's right |
mongo-php-driver 2.3.3 added a config.m4 check that falls back to
php-config when PHP_VERSION_ID is unset in the shell env. In-tree
PHP source builds have no php-config, so configure fails with:
checking PHP version... configure: error: php-config not found
Set PHP_VERSION_ID from main/php_version.h before configureForUnix
so the lookup short-circuits.
… (bleeds libpq polyfills into php configure, poisoning e.g. have_strlcat results)
|
(current CI failures are because I didn't forward the temporary fixes for fastchart and clickhouse extensions, iliaa will probably release versions with my fixes upstreamed in a few days) |
|
I'd like to merge some easily split parts of this branch into v3 first, so that the branch doesn't become too large and make reviews troublesome. |
|
Yes, I'm getting to a point where building static-php/packages based on this branch is possible. The majority of changes here are really just behaviour fixes that can be applied independently. |
Forward-port the genuinely-new fixes from feat/pgo (2026-06-09 .. 07-09) into v3's reorganized layout: - zig-cc.sh: prefix runtime-lib appends with `-x none` so the profile/crt/ cpu_model archives don't poison the following files as `-x c` sources - ZigToolchain: set ax_cv_have_func_attribute_ifunc=no under -flto (an ifunc in LTO bitcode crashes zig 0.16's lld during thin-link) - php configure: add --with-sysconfdir option; strip build-time env vars from phpinfo's "Configure Command" - ext-brotli / ext-zstd: switch to stable release/tag tarballs; brotli configures with --with-libbrotli - ext-event: patch libevent http_connection.c to use a const peer address (both static and shared builds) - ghrel downloader: prefer GitHub's /releases/latest (the semantically latest stable release) over publish-order iteration, so a newer-tagged prerelease (e.g. libevent 2.2.x-alpha) can't win over 2.1.x-stable Commits already present in v3 were skipped: protobuf-latest + libaom ENABLE_*=OFF (9398a66), the clang runtime -target flag (2adedc0), the runtime-bits fail-hard half of 3823631, and github prefer-stable's prerelease skip (incl. the ghtar /releases/latest path, already in v3).
What does this PR do?
Checklist before merging
*.phpor*.json, run them locally to ensure your changes are valid:composer cs-fixcomposer analysecomposer testbin/spc dev:sort-configsrc/globals/test-extensions.php.extension testortest extensionsto trigger full test suite.