Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • aports aports
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 721
    • Issues 721
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 372
    • Merge requests 372
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • alpine
  • aportsaports
  • Issues
  • #13323

Closed
Open
Created Dec 17, 2021 by Džuris@tontonsb

php8-pecl-swoole not getting loaded

Here's a minimal dockerfile that sets up php8 with swoole. The container should print out the package list and exit.

FROM alpine

RUN set -eux; \
    apk add --clean-protected --no-cache \
		-X http://dl-cdn.alpinelinux.org/alpine/edge/testing \
		php8 \
		php8-pecl-swoole; \
	ln -s /usr/bin/php8 /usr/bin/php

# Launch
CMD ["php", "-m"]

Here's the output, swoole is not among the loaded modules and instead is mentioned in a warning:

PHP Warning:  PHP Startup: Unable to load dynamic library 'swoole' (tried: /usr/lib/php8/modules/swoole (Error loading shared library /usr/lib/php8/modules/swoole: No such file or directory), /usr/lib/php8/modules/swoole.so (Error relocating /usr/lib/php8/modules/swoole.so: _ZSt28__throw_bad_array_new_lengthv: symbol not found)) in Unknown on line 0

[PHP Modules]
Core
curl
date
filter
hash
json
libxml
mysqlnd
openssl
pcre
phpdbg_webhelper
readline
Reflection
sockets
SPL
standard
zlib

[Zend Modules]

The file /usr/lib/php8/modules/swoole.so actually exists, but there's some error with loading it.

A similar setup worked fine a while ago when I used alpine:3.13 image and got the php8-pecl-swoole-4.7.1-r0 package which doesn't seem available anymore. The issue with the current php8-pecl-swoole package is present when using alpine 3.13, 3.14 and 3.15.

Edited Dec 17, 2021 by Džuris
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking