Skip to content

Conversation

henderkes
Copy link
Collaborator

@henderkes henderkes commented Aug 25, 2025

What does this PR do?

enable swoole features as possible

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.

@henderkes henderkes changed the title swoole hooks can be compiled if pgsql/sqlite are not compiled in stacally swoole hooks can be compiled if pgsql/sqlite are not compiled in statically Aug 25, 2025
@henderkes henderkes marked this pull request as ready for review August 25, 2025 04:11
@henderkes henderkes requested a review from crazywhalecc August 25, 2025 04:23
@jingjingxyk
Copy link
Contributor

new feature:

@henderkes
Copy link
Collaborator Author

henderkes commented Aug 25, 2025

new feature:

What is swoole-stdext?

Edit: Oh damn, I wished for that for a long time. Too bad I can't personally use swoole, we're making use of too many caddy features.

@henderkes
Copy link
Collaborator Author

edit: it's v6.1+ only, the stable release is still v6.0.2, so that will need a feature request that we can do later

@henderkes
Copy link
Collaborator Author

Looks like the swoole fails are not introduced by this pr (they still happen when I disable the new --enable options), but by Swoole src not checking for extended posix support before using it? Hard to track down without a mac.

@crazywhalecc
Copy link
Owner

I'll check it tomorrow evening.

@henderkes
Copy link
Collaborator Author

@crazywhalecc good for merge?

@crazywhalecc
Copy link
Owner

Haven't tested on linux yet, after my day job is finished I'll look into it. I've been a bit busy at work lately.

@crazywhalecc
Copy link
Owner

crazywhalecc commented Aug 27, 2025

The macOS bug reason:

  • macOS doesn't implement pthread_barrier_* function in pthread.
  • The pg_pthread has pthread_barrier port.
  • When configuring pthread_barrier_init, this includes pg libs for conftest, and it will pass the check.
  • Making does not contain the pg libs, that is, the posix thread barrier obviously not implemented and got failed build.

The root cause is that the configure built in spc will bring other libraries into a separate AC_CHECK_LIB additional library, which leads to this problem.

@crazywhalecc
Copy link
Owner

crazywhalecc commented Aug 27, 2025

And for linux liburing, I dont' see anything wrong, but I recommend triggering full extension tests and all versions of bulk build tests with swoole's hooks at the end.

@henderkes
Copy link
Collaborator Author

Ah, it's pgsql again...

@henderkes
Copy link
Collaborator Author

And for linux liburing, I dont' see anything wrong, but I recommend triggering full extension tests and all versions of bulk build tests with swoole's hooks at the end.

https://github.com/static-php/spc-packages/actions/runs/17260452046

Already tested!

@henderkes
Copy link
Collaborator Author

I think we need to disable opcache jit with zts builds for php < 8.4 on alpine. It was fixed, but apparently not backported.

Copy link
Owner

@crazywhalecc crazywhalecc left a comment

Choose a reason for hiding this comment

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

I added missing notes and updated the cli generator, good to me now. But I don't think we should add pkg-config things in this PR.

Actually I also prefer hosting pkg-config musl-static binaries in dl.static-php.dev without building in doctor. The pkg-config build actions would be in static-php-cli-hosted.

@henderkes
Copy link
Collaborator Author

Yes, you can change that in the other branch. I don't have access to the dl.static-php so I can't upload a prebuilt version of it.

@henderkes
Copy link
Collaborator Author

Oh, as a side note, what is supposed to happen if swoole-pgsql and pdo_pgsql extension are both loaded shared? Does one need to initialise first to get it working correctly?

@henderkes henderkes merged commit 5a30d50 into main Aug 29, 2025
33 checks passed
@henderkes henderkes deleted the swoolehooks branch August 29, 2025 01:46
@crazywhalecc
Copy link
Owner

Oh, as a side note, what is supposed to happen if swoole-pgsql and pdo_pgsql extension are both loaded shared? Does one need to initialise first to get it working correctly?

I haven't tested shared build for swoole extension yet, but theoretically it should work together.

@henderkes
Copy link
Collaborator Author

I've tested it and it works fine, but only the general pdo_pgsql. I have never worked with swoole.

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.

3 participants