Skip to content

Add shared-extensions, frankenphp and zts to build-unix workflow#1062

Open
N-Silbernagel wants to merge 2 commits intocrazywhalecc:mainfrom
N-Silbernagel:main
Open

Add shared-extensions, frankenphp and zts to build-unix workflow#1062
N-Silbernagel wants to merge 2 commits intocrazywhalecc:mainfrom
N-Silbernagel:main

Conversation

@N-Silbernagel
Copy link

What does this PR do?

This PR adds options for shared-extensions, build-frankenphp and enable-zts to the build-unix workflow. The change enables me to build a (mostly) static frankenphp together with xdebug without installing any tools. I'm hoping this also benefits others.

Needed to add "getenv('SPC_CMD_VAR_PHP_MAKE_EXTRA_LDFLAGS') ?: ''" because "getenv('SPC_CMD_VAR_PHP_MAKE_EXTRA_LDFLAGS')" returns false in gh action where the env var is not set.

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:

    • [ x ] composer cs-fix
    • [ x ] composer analyse
    • [ x ] composer test
    • [ ] bin/spc dev:sort-config
      This fails, but already does so on commit 4625c6a
  • 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.

ALL_EXTS="$ALL_EXTS,$SHARED_EXTS"
case "${{ inputs.os }}" in
linux-x86_64|linux-aarch64)
echo "Shared extensions (e.g. xdebug) require glibc/macOS targets. Use linux-*-glibc or macos-*."
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that's not true, shared extensions work with musl too if you set SPC_TARGET="x86_64-linux-musl -dynamic".

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

or on alpine with SPC_MUSL_DYNAMIC=true

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! I have now removed this check as to simply let spc itself handle those cases. An example can be seen here https://github.com/N-Silbernagel/static-php-cli/actions/runs/23154572457/job/67265649704 where I tried to build xdebug with linux-x86_64.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, that's better. Could you update that error message to mention SPC_MUSL_DYNAMIC, though?

let SPC handle check for compatible shared extension targets
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants