Skip to content

Having trouble with the openswoole extenstion instalation #47

@voodooism

Description

@voodooism

Describe the bug
It's impossible to install the openswoole extension with cache-extensions action. But without cache everything works well.

Version

  • I have checked releases and the bug exists in the latest patch version of v1.
  • v1
  • v2

Runners

  • GitHub Hosted
  • Self Hosted

Operating systems
Ubuntu 24.04.1 LTS

Runner Image:
Image: ubuntu-24.04
Version: 20250209.1.0

PHP versions
8.2

To Reproduce

name: PHP-CI

on: [push, pull_request]

jobs:
  coding_standards:
    runs-on: ubuntu-latest
    env:
      PHP_EXTENSIONS: openswoole
      PHP_EXTENSIONS_CACHE_KEY: cache-extensions-openswoole

    steps:
      -   name: Checkout.
          uses: actions/checkout@v4

      -   name: Setup cache environment
          id: cache-extensions
          uses: shivammathur/cache-extensions@v2
          with:
            php-version: '8.2'
            extensions: ${{ env.PHP_EXTENSIONS }}
            key: ${{ env.PHP_EXTENSIONS_CACHE_KEY }}

      -   name: Cache extensions
          uses: actions/cache@v4
          with:
            path: ${{ steps.cache-extensions.outputs.dir }}
            key: ${{ steps.cache-extensions.outputs.key }}

      -   name: Setup PHP ${{ matrix.php }}
          uses: shivammathur/setup-php@verbose
          with:
            php-version: '8.2'
            coverage: 'none'
            extensions: ${{ env.PHP_EXTENSIONS }}

First workflow run (miss cache): https://github.com/voodooism/ci-test/actions/runs/13388694325/job/37391196626
Second run (cache hit): https://github.com/voodooism/ci-test/actions/runs/13388723274

Expected behavior
Openswoole should be smoothly installed in both cases. But it is not, in the second run.
It works well without using the cache-extensions action: https://github.com/voodooism/ci-test/actions/runs/13388885399/job/37391805958

Additional context
Logs with error description:

PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php/20220829/openswoole.so' (tried: /usr/lib/php/20220829/openswoole.so (/usr/lib/php/20220829/openswoole.so: undefined symbol: socket_ce), /usr/lib/php/20220829//usr/lib/php/20220829/openswoole.so.so (/usr/lib/php/20220829//usr/lib/php/20220829/openswoole.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
✗ openswoole Could not install openswoole on PHP 8.2.27

I see in the warning message something about socket_ce. I've tried to install the sockets extension before the openswoole, but no impact.

Are you willing to submit a PR?
No problem, if anybody explains me how to fix the issue :)

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions