group-icon
PHP Programming
Group for all things PHP, Coding Help, Problems and Solutions
101 Members
Join this group to post and comment.
01 Feb 2019

xDebug and PHP 7.3 Installation Issues

I'm wondering if xdebug 2.6.1 or xdebug 2.7 (beta) is compatible with PHP 7.3. I'm getting a series of errors; and I'm unable to figure out what's going wrong. 

Here's a sample log of what happens after I run the command -

sudo pecl install xdebug

downloading xdebug-2.6.1.tgz ...

Starting to download xdebug-2.6.1.tgz (283,961 bytes)

.....................................................done: 283,961 bytes

79 source files, building

running: phpize

Configuring for:

PHP Api Version:         20180731

Zend Module Api No:      20180731

Zend Extension Api No:   320180731

building in /private/tmp/pear/temp/pear-build-rootq4tEE1/xdebug-2.6.1

running: /private/tmp/pear/temp/xdebug/configure --with-php-config=/usr/local/opt/php/bin/php-config

checking for grep that handles long lines and -e... /usr/bin/grep

checking for egrep... /usr/bin/grep -E

checking for a sed that does not truncate output... /usr/bin/sed

checking for cc... cc

checking whether the C compiler works... yes

checking for C compiler default output file name... a.out

checking for suffix of executables...

checking whether we are cross compiling... no

checking for suffix of object files... o

checking whether we are using the GNU C compiler... yes

checking whether cc accepts -g... yes

checking for cc option to accept ISO C89... none needed

checking how to run the C preprocessor... cc -E

checking for icc... no

checking for suncc... no

checking whether cc understands -c and -o together... yes

checking for system library directory... lib

checking if compiler supports -R... no

checking if compiler supports -Wl,-rpath,... yes

checking build system type... x86_64-apple-darwin16.7.0

checking host system type... x86_64-apple-darwin16.7.0

checking target system type... x86_64-apple-darwin16.7.0

checking for PHP prefix... /usr/local/Cellar/php/7.3.1

checking for PHP includes... -I/usr/local/Cellar/php/7.3.1/include/php -I/usr/local/Cellar/php/7.3.1/include/php/main -I/usr/local/Cellar/php/7.3.1/include/php/TSRM -I/usr/local/Cellar/php/7.3.1/include/php/Zend -I/usr/local/Cellar/php/7.3.1/include/php/ext -I/usr/local/Cellar/php/7.3.1/include/php/ext/date/lib

checking for PHP extension directory... /usr/local/Cellar/php/7.3.1/pecl/20180731

checking for PHP installed headers prefix... /usr/local/Cellar/php/7.3.1/include/php

checking if debug is enabled... no

checking if zts is enabled... no

checking for re2c... no

configure: WARNING: You will need re2c 0.13.4 or later if you want to regenerate PHP parsers.

checking for gawk... no

checking for nawk... no

checking for awk... awk

checking if awk is broken... no

checking whether to enable Xdebug support... yes, shared

checking whether to enable Xdebug developer build flags... no

checking Check for supported PHP versions... supported (7.3.1)

checking for gettimeofday... yes

checking for ANSI C header files... yes

checking for sys/types.h... yes

checking for sys/stat.h... yes

checking for stdlib.h... yes

checking for string.h... yes

checking for memory.h... yes

checking for strings.h... yes

checking for inttypes.h... yes

checking for stdint.h... yes

checking for unistd.h... yes

checking netinet/in.h usability... yes

checking netinet/in.h presence... yes

checking for netinet/in.h... yes

checking poll.h usability... yes

checking poll.h presence... yes

checking for poll.h... yes

checking sys/poll.h usability... yes

checking sys/poll.h presence... yes

checking for sys/poll.h... yes

checking for cos in -lm... yes

checking for ld used by cc... /Library/Developer/CommandLineTools/usr/bin/ld

checking if the linker (/Library/Developer/CommandLineTools/usr/bin/ld) is GNU ld... no

checking for /Library/Developer/CommandLineTools/usr/bin/ld option to reload object files... -r

checking for BSD-compatible nm... /usr/bin/nm -B

checking whether ln -s works... yes

checking how to recognize dependent libraries... pass_all

checking dlfcn.h usability... yes

checking dlfcn.h presence... yes

checking for dlfcn.h... yes

checking the maximum length of command line arguments... 196608

checking command to parse /usr/bin/nm -B output from cc object... ok

checking for objdir... .libs

checking for ar... ar

checking for ranlib... ranlib

checking for strip... strip

checking for dsymutil... dsymutil

checking for nmedit... nmedit

checking for -single_module linker flag... yes

checking for -exported_symbols_list linker flag... yes

checking if cc supports -fno-rtti -fno-exceptions... yes

checking for cc option to produce PIC... -fno-common

checking if cc PIC flag -fno-common works... yes

checking if cc static flag -static works... no

checking if cc supports -c -o file.o... yes

checking whether the cc linker (/Library/Developer/CommandLineTools/usr/bin/ld) supports shared libraries... yes

checking dynamic linker characteristics... darwin16.7.0 dyld

checking how to hardcode library paths into programs... immediate

checking whether stripping libraries is possible... yes

checking if libtool supports shared libraries... yes

checking whether to build shared libraries... yes

checking whether to build static libraries... no


creating libtool

appending configuration tag "CXX" to libtool

configure: creating ./config.status

config.status: creating config.h

running: make

/bin/sh /private/tmp/pear/temp/pear-build-rootq4tEE1/xdebug-2.6.1/libtool --mode=compile cc   -I. -I/private/tmp/pear/temp/xdebug -DPHP_ATOM_INC -I/private/tmp/pear/temp/pear-build-rootq4tEE1/xdebug-2.6.1/include -I/private/tmp/pear/temp/pear-build-rootq4tEE1/xdebug-2.6.1/main -I/private/tmp/pear/temp/xdebug -I/usr/local/Cellar/php/7.3.1/include/php -I/usr/local/Cellar/php/7.3.1/include/php/main -I/usr/local/Cellar/php/7.3.1/include/php/TSRM -I/usr/local/Cellar/php/7.3.1/include/php/Zend -I/usr/local/Cellar/php/7.3.1/include/php/ext -I/usr/local/Cellar/php/7.3.1/include/php/ext/date/lib  -DHAVE_CONFIG_H  -g -O2   -c /private/tmp/pear/temp/xdebug/xdebug.c -o xdebug.lo

mkdir .libs

 cc -I. -I/private/tmp/pear/temp/xdebug -DPHP_ATOM_INC -I/private/tmp/pear/temp/pear-build-rootq4tEE1/xdebug-2.6.1/include -I/private/tmp/pear/temp/pear-build-rootq4tEE1/xdebug-2.6.1/main -I/private/tmp/pear/temp/xdebug -I/usr/local/Cellar/php/7.3.1/include/php -I/usr/local/Cellar/php/7.3.1/include/php/main -I/usr/local/Cellar/php/7.3.1/include/php/TSRM -I/usr/local/Cellar/php/7.3.1/include/php/Zend -I/usr/local/Cellar/php/7.3.1/include/php/ext -I/usr/local/Cellar/php/7.3.1/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /private/tmp/pear/temp/xdebug/xdebug.c  -fno-common -DPIC -o .libs/xdebug.o

/private/tmp/pear/temp/xdebug/xdebug.c:1831:107: warning: format specifies type 'long' but the argument has type 'zend_long' (aka 'long long') [-Wformat]

                zend_throw_exception_ex(zend_ce_error, 0, "Maximum function nesting level of '%ld' reached, aborting!", XG(max_nesting_level));

                                                                                              ~~~                       ^~~~~~~~~~~~~~~~~~~~~

                                                                                              %lld

/private/tmp/pear/temp/xdebug/php_xdebug.h:323:15: note: expanded from macro 'XG'

#define XG(v) (xdebug_globals.v)

              ^~~~~~~~~~~~~~~~~~

/private/tmp/pear/temp/xdebug/xdebug.c:1987:107: warning: format specifies type 'long' but the argument has type 'zend_long' (aka 'long long') [-Wformat]

                zend_throw_exception_ex(zend_ce_error, 0, "Maximum function nesting level of '%ld' reached, aborting!", XG(max_nesting_level));

                                                                                              ~~~                       ^~~~~~~~~~~~~~~~~~~~~

                                                                                              %lld

/private/tmp/pear/temp/xdebug/php_xdebug.h:323:15: note: expanded from macro 'XG'

#define XG(v) (xdebug_globals.v)

              ^~~~~~~~~~~~~~~~~~

2 warnings generated.

/bin/sh /private/tmp/pear/temp/pear-build-rootq4tEE1/xdebug-2.6.1/libtool --mode=compile cc   -I. -I/private/tmp/pear/temp/xdebug -DPHP_ATOM_INC -I/private/tmp/pear/temp/pear-build-rootq4tEE1/xdebug-2.6.1/include -I/private/tmp/pear/temp/pear-build-rootq4tEE1/xdebug-2.6.1/main -I/private/tmp/pear/temp/xdebug -I/usr/local/Cellar/php/7.3.1/include/php -I/usr/local/Cellar/php/7.3.1/include/php/main -I/usr/local/Cellar/php/7.3.1/include/php/TSRM -I/usr/local/Cellar/php/7.3.1/include/php/Zend -I/usr/local/Cellar/php/7.3.1/include/php/ext -I/usr/local/Cellar/php/7.3.1/include/php/ext/date/lib  -DHAVE_CONFIG_H  -g -O2   -c /private/tmp/pear/temp/xdebug/xdebug_branch_info.c -o xdebug_branch_info.lo

 cc -I. -I/private/tmp/pear/temp/xdebug -DPHP_ATOM_INC -I/private/tmp/pear/temp/pear-build-rootq4tEE1/xdebug-2.6.1/include -I/private/tmp/pear/temp/pear-build-rootq4tEE1/xdebug-2.6.1/main -I/private/tmp/pear/temp/xdebug -I/usr/local/Cellar/php/7.3.1/include/php -I/usr/local/Cellar/php/7.3.1/include/php/main -I/usr/local/Cellar/php/7.3.1/include/php/TSRM -I/usr/local/Cellar/php/7.3.1/include/php/Zend -I/usr/local/Cellar/php/7.3.1/include/php/ext -I/usr/local/Cellar/php/7.3.1/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /private/tmp/pear/temp/xdebug/xdebug_branch_info.c  -fno-common -DPIC -o .libs/xdebug_branch_info.o

/bin/sh /private/tmp/pear/temp/pear-build-rootq4tEE1/xdebug-2.6.1/libtool --mode=compile cc   -I. -I/private/tmp/pear/temp/xdebug -DPHP_ATOM_INC -I/private/tmp/pear/temp/pear-build-rootq4tEE1/xdebug-2.6.1/include -I/private/tmp/pear/temp/pear-build-rootq4tEE1/xdebug-2.6.1/main -I/private/tmp/pear/temp/xdebug -I/usr/local/Cellar/php/7.3.1/include/php -I/usr/local/Cellar/php/7.3.1/include/php/main -I/usr/local/Cellar/php/7.3.1/include/php/TSRM -I/usr/local/Cellar/php/7.3.1/include/php/Zend -I/usr/local/Cellar/php/7.3.1/include/php/ext -I/usr/local/Cellar/php/7.3.1/include/php/ext/date/lib  -DHAVE_CONFIG_H  -g -O2   -c /private/tmp/pear/temp/xdebug/xdebug_code_coverage.c -o xdebug_code_coverage.lo

 cc -I. -I/private/tmp/pear/temp/xdebug -DPHP_ATOM_INC -I/private/tmp/pear/temp/pear-build-rootq4tEE1/xdebug-2.6.1/include -I/private/tmp/pear/temp/pear-build-rootq4tEE1/xdebug-2.6.1/main -I/private/tmp/pear/temp/xdebug -I/usr/local/Cellar/php/7.3.1/include/php -I/usr/local/Cellar/php/7.3.1/include/php/main -I/usr/local/Cellar/php/7.3.1/include/php/TSRM -I/usr/local/Cellar/php/7.3.1/include/php/Zend -I/usr/local/Cellar/php/7.3.1/include/php/ext -I/usr/local/Cellar/php/7.3.1/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /private/tmp/pear/temp/xdebug/xdebug_code_coverage.c  -fno-common -DPIC -o .libs/xdebug_code_coverage.o

/private/tmp/pear/temp/xdebug/xdebug_code_coverage.c:624:17: warning: implicit declaration of function 'RT_CONSTANT_EX' is invalid in C99 [-Wimplicit-function-declaration]

                array_value = RT_CONSTANT_EX(opa->literals, opcode.op2);

                              ^

/private/tmp/pear/temp/xdebug/xdebug_code_coverage.c:624:15: warning: incompatible integer to pointer conversion assigning to 'zval *' (aka 'struct _zval_struct *') from 'int' [-Wint-conversion]

                array_value = RT_CONSTANT_EX(opa->literals, opcode.op2);

                            ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

/private/tmp/pear/temp/xdebug/xdebug_code_coverage.c:882:4: warning: implicit declaration of function 'ZEND_HASH_INC_APPLY_COUNT' is invalid in C99 [-Wimplicit-function-declaration]

                        ZEND_HASH_INC_APPLY_COUNT(&ce->function_table);

                        ^

/private/tmp/pear/temp/xdebug/xdebug_code_coverage.c:886:4: warning: implicit declaration of function 'ZEND_HASH_DEC_APPLY_COUNT' is invalid in C99 [-Wimplicit-function-declaration]

                        ZEND_HASH_DEC_APPLY_COUNT(&ce->function_table);

                        ^

4 warnings generated.

/bin/sh /private/tmp/pear/temp/pear-build-rootq4tEE1/xdebug-2.6.1/libtool --mode=compile cc   -I. -I/private/tmp/pear/temp/xdebug -DPHP_ATOM_INC -I/private/tmp/pear/temp/pear-build-rootq4tEE1/xdebug-2.6.1/include -I/private/tmp/pear/temp/pear-build-rootq4tEE1/xdebug-2.6.1/main -I/private/tmp/pear/temp/xdebug -I/usr/local/Cellar/php/7.3.1/include/php -I/usr/local/Cellar/php/7.3.1/include/php/main -I/usr/local/Cellar/php/7.3.1/include/php/TSRM -I/usr/local/Cellar/php/7.3.1/include/php/Zend -I/usr/local/Cellar/php/7.3.1/include/php/ext -I/usr/local/Cellar/php/7.3.1/include/php/ext/date/lib  -DHAVE_CONFIG_H  -g -O2   -c /private/tmp/pear/temp/xdebug/xdebug_com.c -o xdebug_com.lo

 cc -I. -I/private/tmp/pear/temp/xdebug -DPHP_ATOM_INC -I/private/tmp/pear/temp/pear-build-rootq4tEE1/xdebug-2.6.1/include -I/private/tmp/pear/temp/pear-build-rootq4tEE1/xdebug-2.6.1/main -I/private/tmp/pear/temp/xdebug -I/usr/local/Cellar/php/7.3.1/include/php -I/usr/local/Cellar/php/7.3.1/include/php/main -I/usr/local/Cellar/php/7.3.1/include/php/TSRM -I/usr/local/Cellar/php/7.3.1/include/php/Zend -I/usr/local/Cellar/php/7.3.1/include/php/ext -I/usr/local/Cellar/php/7.3.1/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /private/tmp/pear/temp/xdebug/xdebug_com.c  -fno-common -DPIC -o .libs/xdebug_com.o

/bin/sh /private/tmp/pear/temp/pear-build-rootq4tEE1/xdebug-2.6.1/libtool --mode=compile cc   -I. -I/private/tmp/pear/temp/xdebug -DPHP_ATOM_INC -I/private/tmp/pear/temp/pear-build-rootq4tEE1/xdebug-2.6.1/include -I/private/tmp/pear/temp/pear-build-rootq4tEE1/xdebug-2.6.1/main -I/private/tmp/pear/temp/xdebug -I/usr/local/Cellar/php/7.3.1/include/php -I/usr/local/Cellar/php/7.3.1/include/php/main -I/usr/local/Cellar/php/7.3.1/include/php/TSRM -I/usr/local/Cellar/php/7.3.1/include/php/Zend -I/usr/local/Cellar/php/7.3.1/include/php/ext -I/usr/local/Cellar/php/7.3.1/include/php/ext/date/lib  -DHAVE_CONFIG_H  -g -O2   -c /private/tmp/pear/temp/xdebug/xdebug_compat.c -o xdebug_compat.lo

 cc -I. -I/private/tmp/pear/temp/xdebug -DPHP_ATOM_INC -I/private/tmp/pear/temp/pear-build-rootq4tEE1/xdebug-2.6.1/include -I/private/tmp/pear/temp/pear-build-rootq4tEE1/xdebug-2.6.1/main -I/private/tmp/pear/temp/xdebug -I/usr/local/Cellar/php/7.3.1/include/php -I/usr/local/Cellar/php/7.3.1/include/php/main -I/usr/local/Cellar/php/7.3.1/include/php/TSRM -I/usr/local/Cellar/php/7.3.1/include/php/Zend -I/usr/local/Cellar/php/7.3.1/include/php/ext -I/usr/local/Cellar/php/7.3.1/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /private/tmp/pear/temp/xdebug/xdebug_compat.c  -fno-common -DPIC -o .libs/xdebug_compat.o

/private/tmp/pear/temp/xdebug/xdebug_compat.c:56:71: error: too few arguments to function call, expected 6, have 5

        return zend_get_zval_ptr(op_type, node, zdata, &should_free, BP_VAR_R);

               ~~~~~~~~~~~~~~~~~                                             ^

/usr/local/Cellar/php/7.3.1/include/php/Zend/zend_execute.h:330:1: note: 'zend_get_zval_ptr' declared here

ZEND_API zval *zend_get_zval_ptr(const zend_op *opline, int op_type, const znode_op *node, const zend_execute_data *execute_data, zend_free_op *should_free, int type);

^

/usr/local/Cellar/php/7.3.1/include/php/main/php_config.h:9:19: note: expanded from macro 'ZEND_API'

# define ZEND_API __attribute__ ((visibility("default")))

                  ^

/private/tmp/pear/temp/xdebug/xdebug_compat.c:194:88: error: too few arguments to function call, expected 9, have 8

        php_setcookie(name_s, value_s, expires, path_s, domain_s, secure, url_encode, httponly);

        ~~~~~~~~~~~~~                                                                         ^

/usr/local/Cellar/php/7.3.1/include/php/ext/standard/head.h:40:1: note: 'php_setcookie' declared here

PHPAPI int php_setcookie(zend_string *name, zend_string *value, time_t expires, zend_string *path, zend_string *domain, int secure, int httponly, zend_string *samesite, int url_encode);

^

/usr/local/Cellar/php/7.3.1/include/php/main/php.h:72:18: note: expanded from macro 'PHPAPI'

#               define PHPAPI __attribute__ ((visibility("default")))

                              ^

2 errors generated.

make: *** [xdebug_compat.lo] Error 1

ERROR: `make' failed


1mo ago

Update: 

I was able to fix the issue by installing xDebug 2.7RC1; which seems to be compatible with PHP 7.3.