View Issue Details

IDProjectCategoryView StatusLast Update
0002091XdebugInstallationpublic2022-05-11 08:42
Reporterdjallen1289 Assigned Toderick  
PriorityhighSeveritymajorReproducibilityalways
Status resolvedResolutionnot fixable 
Product Version3.1.4 
Summary0002091: Xdebug 3.1.4 Fails to Compile on Ubuntu 18.04 with Php 8.1.0-dev
Description

Using Php version 8.1.0-dev Xdebug cannot be installed. Produces following output:

/home/user/xdebug/src/base/base.c: In function ‘xdebug_fiber_switch_observer’:
/home/user/xdebug/src/base/base.c:1102:12: error: ‘zend_fiber_context {aka struct _zend_fiber_context}’ has no member named ‘status’; did you mean ‘stack’?
  if (from->status == ZEND_FIBER_STATUS_DEAD) {
            ^~~~~~
            stack
/home/user/xdebug/src/base/base.c:1102:22: error: ‘ZEND_FIBER_STATUS_DEAD’ undeclared (first use in this function); did you mean ‘ZEND_FIBER_STATUS_INIT’?
  if (from->status == ZEND_FIBER_STATUS_DEAD) {
                      ^~~~~~~~~~~~~~~~~~~~~~
                      ZEND_FIBER_STATUS_INIT
/home/user/xdebug/src/base/base.c:1102:22: note: each undeclared identifier is reported only once for each function it appears in
/home/user/xdebug/src/base/base.c:1105:10: error: ‘zend_fiber_context {aka struct _zend_fiber_context}’ has no member named ‘status’; did you mean ‘stack’?
  if (to->status == ZEND_FIBER_STATUS_INIT) {
          ^~~~~~
          stack
/home/user/xdebug/src/base/base.c:1112:10: error: ‘zend_fiber_context {aka struct _zend_fiber_context}’ has no member named ‘status’; did you mean ‘stack’?
  if (to->status == ZEND_FIBER_STATUS_INIT) {
          ^~~~~~
          stack
/home/user/xdebug/src/base/base.c: In function ‘xdebug_base_minit’:
/home/user/xdebug/src/base/base.c:1143:38: warning: passing argument 1 of ‘zend_observer_fiber_switch_register’ from incompatible pointer type [-Wincompatible-pointer-types]
  zend_observer_fiber_switch_register(xdebug_fiber_switch_observer);
                                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/user/xdebug/src/base/base.c:27:0:
/etc/php8/include/php/Zend/zend_observer.h:83:15: note: expected ‘zend_observer_fiber_switch_handler {aka void (*)(struct _zend_fiber *, struct _zend_fiber *)}’ but argument is of type ‘void (*)(zend_fiber_context *, zend_fiber_context *) {aka void (*)(struct _zend_fiber_context *, struct _zend_fiber_context *)}’
 ZEND_API void zend_observer_fiber_switch_register(zend_observer_fiber_switch_handler handler);
               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /etc/php8/include/php/Zend/zend_portability.h:47:0,
                 from /etc/php8/include/php/Zend/zend_types.h:25,
                 from /etc/php8/include/php/Zend/zend.h:27,
                 from /etc/php8/include/php/main/php.h:31,
                 from /home/user/xdebug/src/base/base.c:17:
/home/user/xdebug/src/base/base.c: In function ‘xdebug_base_rinit’:
/etc/php8/include/php/Zend/../TSRM/TSRM.h:163:73: error: ‘zend_executor_globals {aka struct _zend_executor_globals}’ has no member named ‘main_fiber_context’
 #define TSRMG_FAST(offset, type, element) (TSRMG_FAST_BULK(offset, type)->element)
                                                                         ^
/etc/php8/include/php/Zend/zend.h:65:25: note: in expansion of macro ‘TSRMG_FAST’
 #define ZEND_TSRMG_FAST TSRMG_FAST
                         ^~~~~~~~~~
/etc/php8/include/php/Zend/zend_globals_macros.h:42:16: note: in expansion of macro ‘ZEND_TSRMG_FAST’
 # define EG(v) ZEND_TSRMG_FAST(executor_globals_offset, zend_executor_globals *, v)
                ^~~~~~~~~~~~~~~
/home/user/xdebug/src/base/base.c:1177:42: note: in expansion of macro ‘EG’
  XG_BASE(stack) = create_stack_for_fiber(EG(main_fiber_context));
                                          ^~
Makefile:255: recipe for target 'src/base/base.lo' failed
make: *** [src/base/base.lo] Error 1
Steps To Reproduce
  1. Download Xdebug 3.1.4
  2. cd to extracted directory
  3. Run phpize (my case below)
    /etc/php8/bin/phpize
  4. configure using php configuration of current version (my case below)
    ./configure --with-php-config='/etc/php8/bin/php-config'
  5. run make
  6. see above output for errors
TagsNo tags attached.
Operating SystemUbuntu 18.04
PHP Version8.1-dev

Activities

derick

2022-05-11 08:42

administrator   ~0006294

Hi,

I don't support non-release versions of PHP, so please upgrade to an actual 8.1 release, and not a -dev release.

There are many different variants of 8.1-dev, all with different support for fibers, with no way of knowing which one it is.

cheers,
Derick

Issue History

Date Modified Username Field Change
2022-05-11 00:53 djallen1289 New Issue
2022-05-11 08:42 derick Assigned To => derick
2022-05-11 08:42 derick Status new => resolved
2022-05-11 08:42 derick Resolution open => not fixable
2022-05-11 08:42 derick Note Added: 0006294
2022-05-11 08:42 derick Description Updated