PHP 8 support

Issue #64 resolved
Jáchym Toušek created an issue

Trying to install this extension under PHP 8 stable, using the 3.0.0 beta version:

pecl install event-beta

I’m getting this error:

/bin/sh /tmp/pear/temp/pear-build-defaultuserFKLEOF/event-3.0.0/libtool --mode=compile cc -I. -I/tmp/pear/temp/event -I/tmp/pear/temp/pear-build-defaultuserFKLEOF/event-3.0.0/include -I/tmp/pear/temp/pear-build-defaultuserFKLEOF/event-3.0.0/main -I/tmp/pear/temp/event -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -I/php8 -I/tmp/pear/temp/pear-build-defaultuserFKLEOF/event-3.0.0/php8/src -I/tmp/pear/temp/pear-build-defaultuserFKLEOF/event-3.0.0/php8/classes -I/tmp/pear/temp/pear-build-defaultuserFKLEOF/event-3.0.0/php8  -DHAVE_CONFIG_H  -g -O2   -g -O2 -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -c /tmp/pear/temp/event/php8/php_event.c -o php8/php_event.lo
mkdir php8/.libs
 cc -I. -I/tmp/pear/temp/event -I/tmp/pear/temp/pear-build-defaultuserFKLEOF/event-3.0.0/include -I/tmp/pear/temp/pear-build-defaultuserFKLEOF/event-3.0.0/main -I/tmp/pear/temp/event -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -I/php8 -I/tmp/pear/temp/pear-build-defaultuserFKLEOF/event-3.0.0/php8/src -I/tmp/pear/temp/pear-build-defaultuserFKLEOF/event-3.0.0/php8/classes -I/tmp/pear/temp/pear-build-defaultuserFKLEOF/event-3.0.0/php8 -DHAVE_CONFIG_H -g -O2 -g -O2 -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -c /tmp/pear/temp/event/php8/php_event.c  -fPIC -DPIC -o php8/.libs/php_event.o
/bin/sh /tmp/pear/temp/pear-build-defaultuserFKLEOF/event-3.0.0/libtool --mode=compile cc -I. -I/tmp/pear/temp/event -I/tmp/pear/temp/pear-build-defaultuserFKLEOF/event-3.0.0/include -I/tmp/pear/temp/pear-build-defaultuserFKLEOF/event-3.0.0/main -I/tmp/pear/temp/event -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -I/php8 -I/tmp/pear/temp/pear-build-defaultuserFKLEOF/event-3.0.0/php8/src -I/tmp/pear/temp/pear-build-defaultuserFKLEOF/event-3.0.0/php8/classes -I/tmp/pear/temp/pear-build-defaultuserFKLEOF/event-3.0.0/php8  -DHAVE_CONFIG_H  -g -O2   -g -O2 -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -c /tmp/pear/temp/event/php8/src/util.c -o php8/src/util.lo
mkdir php8/src/.libs
 cc -I. -I/tmp/pear/temp/event -I/tmp/pear/temp/pear-build-defaultuserFKLEOF/event-3.0.0/include -I/tmp/pear/temp/pear-build-defaultuserFKLEOF/event-3.0.0/main -I/tmp/pear/temp/event -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -I/php8 -I/tmp/pear/temp/pear-build-defaultuserFKLEOF/event-3.0.0/php8/src -I/tmp/pear/temp/pear-build-defaultuserFKLEOF/event-3.0.0/php8/classes -I/tmp/pear/temp/pear-build-defaultuserFKLEOF/event-3.0.0/php8 -DHAVE_CONFIG_H -g -O2 -g -O2 -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -c /tmp/pear/temp/event/php8/src/util.c  -fPIC -DPIC -o php8/src/.libs/util.o
/bin/sh /tmp/pear/temp/pear-build-defaultuserFKLEOF/event-3.0.0/libtool --mode=compile cc -I. -I/tmp/pear/temp/event -I/tmp/pear/temp/pear-build-defaultuserFKLEOF/event-3.0.0/include -I/tmp/pear/temp/pear-build-defaultuserFKLEOF/event-3.0.0/main -I/tmp/pear/temp/event -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -I/php8 -I/tmp/pear/temp/pear-build-defaultuserFKLEOF/event-3.0.0/php8/src -I/tmp/pear/temp/pear-build-defaultuserFKLEOF/event-3.0.0/php8/classes -I/tmp/pear/temp/pear-build-defaultuserFKLEOF/event-3.0.0/php8  -DHAVE_CONFIG_H  -g -O2   -g -O2 -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -c /tmp/pear/temp/event/php8/src/fe.c -o php8/src/fe.lo
 cc -I. -I/tmp/pear/temp/event -I/tmp/pear/temp/pear-build-defaultuserFKLEOF/event-3.0.0/include -I/tmp/pear/temp/pear-build-defaultuserFKLEOF/event-3.0.0/main -I/tmp/pear/temp/event -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -I/php8 -I/tmp/pear/temp/pear-build-defaultuserFKLEOF/event-3.0.0/php8/src -I/tmp/pear/temp/pear-build-defaultuserFKLEOF/event-3.0.0/php8/classes -I/tmp/pear/temp/pear-build-defaultuserFKLEOF/event-3.0.0/php8 -DHAVE_CONFIG_H -g -O2 -g -O2 -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -c /tmp/pear/temp/event/php8/src/fe.c  -fPIC -DPIC -o php8/src/.libs/fe.o
/tmp/pear/temp/event/php8/src/fe.c:21:10: fatal error: arginfo.h: No such file or directory
   21 | #include "arginfo.h"
      |          ^~~~~~~~~~~
compilation terminated.
make: *** [Makefile:213: php8/src/fe.lo] Error 1
ERROR: `make' failed

Comments (12)

  1. Ruslan Osmanov repo owner

    Do you get the same error when compiling it manually? E.g.

    git clone git@bitbucket.org:osmanov/pecl-event.git
    cd pecl-event/
    ./rebuild.sh
    

  2. Jáchym Toušek reporter

    Yeah it seems to compile alright (after I installed several missing packages + sockets extension). I’m not exactly sure how to enable it but I guess that’s just me not being used to compiling extensions myself without pecl.

    So I guess master is already compatible and it’s just a matter of making a release eh?

  3. Chingis Sandanov

    I get the following error trying to install event 3.0.0 via pecl with php 8.0.0 on alpine:

    /tmp/pear/temp/event/php8/src/fe.c:21:10: fatal error: arginfo.h: No such file or directory
       21 | #include "arginfo.h"
          |          ^~~~~~~~~~~
    compilation terminated.
    make: *** [Makefile:213: php8/src/fe.lo] Error 1
    

  4. Ruslan Osmanov repo owner

    @Jáchym Toušek , There is still a lack of PHP 8 support in eio 😕 I’ll try to update the ext soon, but can't give any promises, sorry.

  5. Jáchym Toušek reporter

    I understand… I just noticed that reactphp decided to drop ext-eio integration so it might need even more work than just PHP 8 compatibility sadly. https://github.com/reactphp/filesystem/pull/79#pullrequestreview-363090553
    The sad thing is that the only extensions implementing async filesystem access without relying on child processes are eio and uv. And uv seems a bit dead considering the still unfixed segfault I reported several months ago.

  6. Ruslan Osmanov repo owner

    @Jáchym Toušek , I’m not sure what exactly did they mean by the following:

    Seems reasonable considering how this extension has turned out to be somewhat unreliable 

    There was no single bug report on pecl-eio from them, so they might be referring to their own implementation. I don’t know. So I still don’t see anything to be fixed in pecl-eio besides adding PHP 8 compatibility.

  7. Ruslan Osmanov repo owner

    @Burhan Ali , No, there is no timeline. I think it is stable enough now, so I’ve uploaded a stable version to PECL.

  8. Log in to comment