Skip to content

Conversation

henderkes
Copy link
Collaborator

What does this PR do?

removes the icu backend from libxml2, because it is not recommended and will not be used if iconv is present, which we have as a depencency

this lead to roughly 32mb (before upx) of useless icu data floating around in the php binary when libxml2 was built, but intl wasn't

Checklist before merging

If your PR involves the changes mentioned below and completed the action, please tick the corresponding option.
If a modification is not involved, please skip it directly.

  • If you modified *.php or *.json, run them locally to ensure your changes are valid:
    • composer cs-fix
    • composer analyse
    • composer test
    • bin/spc dev:sort-config
  • If it's an extension or dependency update, please ensure the following:
    • Add your test combination to src/globals/test-extensions.php.
    • If adding new or fixing bugs, add commit message containing extension test or test extensions to trigger full test suite.

@henderkes henderkes changed the title Remove icu backend Remove icu backend from libxml2 Sep 16, 2025
@henderkes henderkes added the bug Something isn't working label Sep 16, 2025
@henderkes
Copy link
Collaborator Author

This fixes errors in the gettext test when the en_US.utf-8 locale is not available on the system.

[15:27:54] [D] testing ext: gettext
[15:27:54] [I] [EXEC] /opt/static-php-cli/buildroot/bin/php -n -d "extension_dir=/opt/static-php-cli/buildroot/modules" -d "extension=gettext" --ri "gettext"
[15:27:54] [I] [EXEC] /opt/static-php-cli/buildroot/bin/php -n -d "extension_dir=/opt/static-php-cli/buildroot/modules" -d "    \$mo = '3hIElQAAAAACAAAAHAAAACwAAAAFAAAAPAAAAAAAAABQAAAABgAAAFEAAAAXAQAAWAAAAAcAAABwAQAAAQAAAAAAAAAAAAAAAgAAAAAAAAAA56S65L6LAFByb2plY3QtSWQtVmVyc2lvbjogUEFDS0FHRSBWRVJTSU9OClJlcG9ydC1Nc2dpZC1CdWdzLVRvOiAKUE8tUmV2aXNpb24tRGF0ZTogWUVBUi1NTy1EQSBITzpNSStaT05FCkxhc3QtVHJhbnNsYXRvcjogRlVMTCBOQU1FIDxFTUFJTEBBRERSRVNTPgpMYW5ndWFnZS1UZWFtOiBMQU5HVUFHRSA8TExAbGkub3JnPgpMYW5ndWFnZTogCk1JTUUtVmVyc2lvbjogMS4wCkNvbnRlbnQtVHlwZTogdGV4dC9wbGFpbjsgY2hhcnNldD1VVEYtOApDb250ZW50LVRyYW5zZmVyLUVuY29kaW5nOiA4assert(gettext(json_decode('\"\u793a\u4f8b\"', true)) === 'Example');"e(\$mo));
⚠ Validation failed: extension gettext failed sanity check. Code: 255, output:
Fatal error: Uncaught AssertionError: assert(setlocale(LC_ALL, 'en_US.utf-8') === 'en_US.utf-8') in Command line code:13
Stack trace:
#0 Command line code(13): assert(false, 'assert(setlocal...')
#1 {main}
  thrown in Command line code on line 13
----------------------------------------

Failed module: Builder for Linux
Failed validation module: Extension gettext function check

@henderkes henderkes added the kind/extension Issues related to extensions label Sep 16, 2025
@henderkes henderkes merged commit 3198cc4 into main Sep 17, 2025
10 checks passed
@henderkes henderkes deleted the remove-icu-backend branch September 17, 2025 08:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working kind/extension Issues related to extensions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants