Unable to use ev library
Kovah opened this issue · comments
Describe the bug
i was trying to use the ev library in a pipeline, but I am unable to install it with the Setup PHP action.
Version
- I have checked releases, and the bug exists in the latest patch version of
v1
orv2
. -
v2
-
v1
Runners
- GitHub Hosted
- Self Hosted
Operating systems
ubuntu-latest
PHP versions
8.3.7
To Reproduce
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.3
extensions: mbstring, bcmath, redis, swoole, ev, sockets
coverage: xdebug
Expected behavior
EV to be installed.
Screenshots/Logs
==> Setup PHP
✓ PHP Installed PHP 8.3.7
==> Setup Extensions
✓ mbstring Enabled
✓ bcmath Enabled
✓ redis Enabled
✓ swoole Enabled
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/20230831/ev.so' (tried: /usr/lib/php/20230831/ev.so (/usr/lib/php/20230831/ev.so: undefined symbol: socket_ce), /usr/lib/php/20230831//usr/lib/php/20230831/ev.so.so (/usr/lib/php/20230831//usr/lib/php/20230831/ev.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
✗ ev Could not install ev on PHP 8.3.7
✓ sockets Enabled
Additional context
I guess that it needs the same fix as the event
extension as described as a fix in #722
Are you willing to submit a PR?
@Kovah
Please specify EVENT_LIBS
env as libev-dev
, then it will install it before installing event extension.
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.3
extensions: mbstring, bcmath, redis, swoole, event, sockets
coverage: xdebug
env:
EVENT_LIBS: libev-dev
Test workflow: https://github.com/shivammathur/test-setup-php/actions/runs/9261151718
Sorry my bad, it's not about the event
library, but ev
. I corrected the yaml in the original post. Does this fix also apply to ev
?
Awesome! Many thanks!
Released https://github.com/shivammathur/setup-php/releases/tag/2.30.5 with the fix