longxinH / xhprof

PHP7/PHP8 support
http://pecl.php.net/package/xhprof
Apache License 2.0
1.09k stars 167 forks source link

php7.1 with latest osx I can't compile your version. #2

Closed Webonaute closed 7 years ago

Webonaute commented 7 years ago

`make /bin/sh /Users/mathieudelisle/Downloads/xhprof/extension/libtool --mode=compile cc -I. -I/Users/mathieudelisle/Downloads/xhprof/extension -DPHP_ATOM_INC -I/Users/mathieudelisle/Downloads/xhprof/extension/include -I/Users/mathieudelisle/Downloads/xhprof/extension/main -I/Users/mathieudelisle/Downloads/xhprof/extension -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /Users/mathieudelisle/Downloads/xhprof/extension/xhprof.c -o xhprof.lo mkdir .libs cc -I. -I/Users/mathieudelisle/Downloads/xhprof/extension -DPHP_ATOM_INC -I/Users/mathieudelisle/Downloads/xhprof/extension/include -I/Users/mathieudelisle/Downloads/xhprof/extension/main -I/Users/mathieudelisle/Downloads/xhprof/extension -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /Users/mathieudelisle/Downloads/xhprof/extension/xhprof.c -fno-common -DPIC -o .libs/xhprof.o /Users/mathieudelisle/Downloads/xhprof/extension/xhprof.c:413:9: warning: implicit declaration of function 'RETVAL_ARR' is invalid in C99 [-Wimplicit-function-declaration] RETVAL_ARR(Z_ARR(hp_globals.stats_count)); ^ /Users/mathieudelisle/Downloads/xhprof/extension/xhprof.c:413:20: warning: implicit declaration of function 'Z_ARR' is invalid in C99 [-Wimplicit-function-declaration] RETVAL_ARR(Z_ARR(hp_globals.stats_count)); ^ /Users/mathieudelisle/Downloads/xhprof/extension/xhprof.c:414:9: warning: implicit declaration of function 'ZVAL_UNDEF' is invalid in C99 [-Wimplicit-function-declaration] ZVAL_UNDEF(&hp_globals.stats_count); ^ /Users/mathieudelisle/Downloads/xhprof/extension/xhprof.c:693:43: error: use of undeclared identifier 'IS_UNDEF' if (Z_TYPE(hp_globals.stats_count) == IS_UNDEF) { ^ /Users/mathieudelisle/Downloads/xhprof/extension/xhprof.c:726:43: error: use of undeclared identifier 'IS_UNDEF' if (Z_TYPE(hp_globals.stats_count) != IS_UNDEF) { ^ /Users/mathieudelisle/Downloads/xhprof/extension/xhprof.c:727:9: warning: incompatible pointer types passing 'zval ' (aka 'struct _zval_struct ') to parameter of type 'zval ' (aka 'struct _zval_struct ') [-Wincompatible-pointer-types] zval_ptr_dtor(&hp_globals.stats_count); ^~~~~~~~~~ /usr/include/php/Zend/zend_variables.h:57:48: note: expanded from macro 'zval_ptr_dtor'

define zval_ptr_dtor(zval_ptr) _zval_ptr_dtor((zval_ptr) ZEND_FILE_LINE_CC)

                                           ^~~~~~~~~~

/usr/include/php/Zend/zend_variables.h:51:37: note: passing argument to parameter 'zval_ptr' here ZEND_API void _zval_ptr_dtor(zval *zval_ptr ZEND_FILE_LINE_DC); ^ /Users/mathieudelisle/Downloads/xhprof/extension/xhprof.c:811:15: warning: implicit declaration of function 'ZEND_CALL_ARG' is invalid in C99 [-Wimplicit-function-declaration] arg = ZEND_CALL_ARG(data, 1); ^ /Users/mathieudelisle/Downloads/xhprof/extension/xhprof.c:811:13: warning: incompatible integer to pointer conversion assigning to 'zval ' (aka 'struct _zval_struct ') from 'int' [-Wint-conversion] arg = ZEND_CALL_ARG(data, 1); ^ ~~~~~~ /Users/mathieudelisle/Downloads/xhprof/extension/xhprof.c:815:31: error: no member named 'This' in 'struct _zend_execute_data' zval object = (data->This.value.obj) ? &(data->This) : NULL;


/Users/mathieudelisle/Downloads/xhprof/extension/xhprof.c:815:57: error: no member named 'This' in 'struct _zend_execute_data'
        zval *object = (data->This.value.obj) ? &(data->This) : NULL;
                                                  ~~~~  ^
/Users/mathieudelisle/Downloads/xhprof/extension/xhprof.c:821:13: warning: implicit declaration of function 'ZVAL_COPY' is invalid in C99 [-Wimplicit-function-declaration]
            ZVAL_COPY(&tmp_obj, object);
            ^
/Users/mathieudelisle/Downloads/xhprof/extension/xhprof.c:824:26: warning: implicit declaration of function 'zend_hash_str_find' is invalid in C99 [-Wimplicit-function-declaration]
            if ((value = zend_hash_str_find(Z_ARRVAL(tmp_obj), ZEND_STRL("queryString"))) != NULL) {
                         ^
/Users/mathieudelisle/Downloads/xhprof/extension/xhprof.c:824:24: warning: incompatible integer to pointer conversion assigning to 'zval *' (aka 'struct _zval_struct *') from 'int' [-Wint-conversion]
            if ((value = zend_hash_str_find(Z_ARRVAL(tmp_obj), ZEND_STRL("queryString"))) != NULL) {
                       ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/mathieudelisle/Downloads/xhprof/extension/xhprof.c:827:17: error: use of undeclared identifier 'zend_string'; did you mean 'zend_strtod'?
                zend_string *pattern_str = NULL;
                ^~~~~~~~~~~
                zend_strtod
/usr/include/php/Zend/zend_strtod.h:30:17: note: 'zend_strtod' declared here
ZEND_API double zend_strtod(const char *s00, const char **se);
                ^
/Users/mathieudelisle/Downloads/xhprof/extension/xhprof.c:827:30: error: use of undeclared identifier 'pattern_str'
                zend_string *pattern_str = NULL;
                             ^
/Users/mathieudelisle/Downloads/xhprof/extension/xhprof.c:829:21: warning: incompatible integer to pointer conversion assigning to 'zval *' (aka 'struct _zval_struct *') from 'int' [-Wint-conversion]
                arg = ZEND_CALL_ARG(data, 1);
                    ^ ~~~~~~~~~~~~~~~~~~~~~~
/Users/mathieudelisle/Downloads/xhprof/extension/xhprof.c:833:21: warning: incompatible pointer types passing 'zval *' (aka 'struct _zval_struct *') to parameter of type 'zval **' (aka 'struct _zval_struct **') [-Wincompatible-pointer-types]
                    zval_ptr_dtor(&tmp_obj);
                    ^~~~~~~~~~~~~~~~~~~~~~~
/usr/include/php/Zend/zend_variables.h:57:48: note: expanded from macro 'zval_ptr_dtor'
#define zval_ptr_dtor(zval_ptr) _zval_ptr_dtor((zval_ptr) ZEND_FILE_LINE_CC)
                                               ^~~~~~~~~~
/usr/include/php/Zend/zend_variables.h:51:37: note: passing argument to parameter 'zval_ptr' here
ZEND_API void _zval_ptr_dtor(zval **zval_ptr ZEND_FILE_LINE_DC);
                                    ^
/Users/mathieudelisle/Downloads/xhprof/extension/xhprof.c:839:17: warning: implicit declaration of function 'ZVAL_STR' is invalid in C99 [-Wimplicit-function-declaration]
                ZVAL_STR(&tmp_zv, zval_get_string(value));
                ^
/Users/mathieudelisle/Downloads/xhprof/extension/xhprof.c:839:35: warning: implicit declaration of function 'zval_get_string' is invalid in C99 [-Wimplicit-function-declaration]
                ZVAL_STR(&tmp_zv, zval_get_string(value));
                                  ^
/Users/mathieudelisle/Downloads/xhprof/extension/xhprof.c:842:21: error: use of undeclared identifier 'pattern_str'
                    pattern_str = zend_string_init("([\?])", sizeof("([\?])") - 1, 0);
                    ^
/Users/mathieudelisle/Downloads/xhprof/extension/xhprof.c:842:35: warning: implicit declaration of function 'zend_string_init' is invalid in C99 [-Wimplicit-function-declaration]
                    pattern_str = zend_string_init("([\?])", sizeof("([\?])") - 1, 0);
                                  ^
/Users/mathieudelisle/Downloads/xhprof/extension/xhprof.c:844:21: error: use of undeclared identifier 'pattern_str'
                    pattern_str = zend_string_init("(:([^\\s]+))", sizeof("(:([^\\s]+))") - 1, 0);
                    ^
/Users/mathieudelisle/Downloads/xhprof/extension/xhprof.c:847:21: error: use of undeclared identifier 'pattern_str'
                if (pattern_str) {
                    ^
/Users/mathieudelisle/Downloads/xhprof/extension/xhprof.c:848:69: error: use of undeclared identifier 'pattern_str'
                    if ((pce_regexp = pcre_get_compiled_regex_cache(pattern_str)) == NULL) {
                                                                    ^
/Users/mathieudelisle/Downloads/xhprof/extension/xhprof.c:856:21: error: use of undeclared identifier 'zend_string'; did you mean 'zend_strtod'?
                    zend_string *key;
                    ^~~~~~~~~~~
                    zend_strtod
/usr/include/php/Zend/zend_strtod.h:30:17: note: 'zend_strtod' declared here
ZEND_API double zend_strtod(const char *s00, const char **se);
                ^
/Users/mathieudelisle/Downloads/xhprof/extension/xhprof.c:856:34: error: use of undeclared identifier 'key'
                    zend_string *key;
                                 ^
/Users/mathieudelisle/Downloads/xhprof/extension/xhprof.c:859:21: warning: implicit declaration of function 'ZEND_HASH_FOREACH_KEY_VAL' is invalid in C99 [-Wimplicit-function-declaration]
                    ZEND_HASH_FOREACH_KEY_VAL(Z_ARRVAL_P(arg), num_key, key, val)
                    ^
/Users/mathieudelisle/Downloads/xhprof/extension/xhprof.c:859:73: error: use of undeclared identifier 'key'
                    ZEND_HASH_FOREACH_KEY_VAL(Z_ARRVAL_P(arg), num_key, key, val)
                                                                        ^
/Users/mathieudelisle/Downloads/xhprof/extension/xhprof.c:875:21: warning: implicit declaration of function 'zend_string_release' is invalid in C99 [-Wimplicit-function-declaration]
                    zend_string_release(pattern_str);
                    ^
/Users/mathieudelisle/Downloads/xhprof/extension/xhprof.c:875:41: error: use of undeclared identifier 'pattern_str'
                    zend_string_release(pattern_str);
                                        ^
/Users/mathieudelisle/Downloads/xhprof/extension/xhprof.c:883:17: warning: incompatible pointer types passing 'zval *' (aka 'struct _zval_struct *') to parameter of type 'zval **' (aka 'struct _zval_struct **') [-Wincompatible-pointer-types]
                zval_ptr_dtor(&tmp_zv);
                ^~~~~~~~~~~~~~~~~~~~~~
/usr/include/php/Zend/zend_variables.h:57:48: note: expanded from macro 'zval_ptr_dtor'
#define zval_ptr_dtor(zval_ptr) _zval_ptr_dtor((zval_ptr) ZEND_FILE_LINE_CC)
                                               ^~~~~~~~~~
/usr/include/php/Zend/zend_variables.h:51:37: note: passing argument to parameter 'zval_ptr' here
ZEND_API void _zval_ptr_dtor(zval **zval_ptr ZEND_FILE_LINE_DC);
                                    ^
/Users/mathieudelisle/Downloads/xhprof/extension/xhprof.c:887:13: warning: incompatible pointer types passing 'zval *' (aka 'struct _zval_struct *') to parameter of type 'zval **' (aka 'struct _zval_struct **') [-Wincompatible-pointer-types]
            zval_ptr_dtor(&tmp_obj);
            ^~~~~~~~~~~~~~~~~~~~~~~
/usr/include/php/Zend/zend_variables.h:57:48: note: expanded from macro 'zval_ptr_dtor'
#define zval_ptr_dtor(zval_ptr) _zval_ptr_dtor((zval_ptr) ZEND_FILE_LINE_CC)
                                               ^~~~~~~~~~
/usr/include/php/Zend/zend_variables.h:51:37: note: passing argument to parameter 'zval_ptr' here
ZEND_API void _zval_ptr_dtor(zval **zval_ptr ZEND_FILE_LINE_DC);
                                    ^
/Users/mathieudelisle/Downloads/xhprof/extension/xhprof.c:891:15: warning: incompatible integer to pointer conversion initializing 'zval *' (aka 'struct _zval_struct *') with an expression of type 'int' [-Wint-conversion]
        zval *argument = ZEND_CALL_ARG(data, 1);
              ^          ~~~~~~~~~~~~~~~~~~~~~~
/Users/mathieudelisle/Downloads/xhprof/extension/xhprof.c:898:43: error: too few arguments provided to function-like macro invocation
        ZVAL_STRING(&fname, "curl_getinfo");
                                          ^
/usr/include/php/Zend/zend_API.h:578:9: note: macro 'ZVAL_STRING' defined here
#define ZVAL_STRING(z, s, duplicate) do {       \
        ^
/Users/mathieudelisle/Downloads/xhprof/extension/xhprof.c:898:9: error: use of undeclared identifier 'ZVAL_STRING'; did you mean 'ZVAL_STR'?
        ZVAL_STRING(&fname, "curl_getinfo");
        ^~~~~~~~~~~
        ZVAL_STR
/Users/mathieudelisle/Downloads/xhprof/extension/xhprof.c:839:17: note: 'ZVAL_STR' declared here
                ZVAL_STR(&tmp_zv, zval_get_string(value));
                ^
/Users/mathieudelisle/Downloads/xhprof/extension/xhprof.c:900:9: warning: implicit declaration of function 'ZVAL_RES' is invalid in C99 [-Wimplicit-function-declaration]
        ZVAL_RES(&params[0], Z_RES_P(argument));
        ^
/Users/mathieudelisle/Downloads/xhprof/extension/xhprof.c:900:30: warning: implicit declaration of function 'Z_RES_P' is invalid in C99 [-Wimplicit-function-declaration]
        ZVAL_RES(&params[0], Z_RES_P(argument));
                             ^
/Users/mathieudelisle/Downloads/xhprof/extension/xhprof.c:902:80: warning: incompatible pointer types passing 'zval *' (aka 'struct _zval_struct *') to parameter of type 'zval **' (aka 'struct _zval_struct **') [-Wincompatible-pointer-types]
        if (SUCCESS == call_user_function_ex(EG(function_table), NULL, &fname, &retval_ptr, 1, params, 1, NULL)) {
                                                                               ^~~~~~~~~~~
/usr/include/php/Zend/zend_API.h:455:109: note: passing argument to parameter 'retval_ptr_ptr' here
ZEND_API int call_user_function_ex(HashTable *function_table, zval **object_pp, zval *function_name, zval **retval_ptr_ptr, zend_uint param_count, zval **params[], int no_separation, HashTable *symbol_table TSRMLS_DC);
                                                                                                            ^
/Users/mathieudelisle/Downloads/xhprof/extension/xhprof.c:902:96: warning: incompatible pointer types passing 'zval [1]' to parameter of type 'zval ***' (aka 'struct _zval_struct ***') [-Wincompatible-pointer-types]
        if (SUCCESS == call_user_function_ex(EG(function_table), NULL, &fname, &retval_ptr, 1, params, 1, NULL)) {
                                                                                               ^~~~~~
/usr/include/php/Zend/zend_API.h:455:155: note: passing argument to parameter 'params' here
ZEND_API int call_user_function_ex(HashTable *function_table, zval **object_pp, zval *function_name, zval **retval_ptr_ptr, zend_uint param_count, zval **params[], int no_separation, HashTable *symbol_table TSRMLS_DC);
                                                                                                                                                          ^
/Users/mathieudelisle/Downloads/xhprof/extension/xhprof.c:903:20: warning: incompatible integer to pointer conversion assigning to 'zval *' (aka 'struct _zval_struct *') from 'int' [-Wint-conversion]
            option = zend_hash_str_find(Z_ARRVAL(retval_ptr), ZEND_STRL("url"));
                   ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/mathieudelisle/Downloads/xhprof/extension/xhprof.c:906:13: warning: incompatible pointer types passing 'zval *' (aka 'struct _zval_struct *') to parameter of type 'zval **' (aka 'struct _zval_struct **') [-Wincompatible-pointer-types]
            zval_ptr_dtor(&retval_ptr);
            ^~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/php/Zend/zend_variables.h:57:48: note: expanded from macro 'zval_ptr_dtor'
#define zval_ptr_dtor(zval_ptr) _zval_ptr_dtor((zval_ptr) ZEND_FILE_LINE_CC)
                                               ^~~~~~~~~~
/usr/include/php/Zend/zend_variables.h:51:37: note: passing argument to parameter 'zval_ptr' here
ZEND_API void _zval_ptr_dtor(zval **zval_ptr ZEND_FILE_LINE_DC);
                                    ^
/Users/mathieudelisle/Downloads/xhprof/extension/xhprof.c:911:9: warning: incompatible pointer types passing 'zval *' (aka 'struct _zval_struct *') to parameter of type 'zval **' (aka 'struct _zval_struct **') [-Wincompatible-pointer-types]
        zval_ptr_dtor(&fname);
        ^~~~~~~~~~~~~~~~~~~~~
/usr/include/php/Zend/zend_variables.h:57:48: note: expanded from macro 'zval_ptr_dtor'
#define zval_ptr_dtor(zval_ptr) _zval_ptr_dtor((zval_ptr) ZEND_FILE_LINE_CC)
                                               ^~~~~~~~~~
/usr/include/php/Zend/zend_variables.h:51:37: note: passing argument to parameter 'zval_ptr' here
ZEND_API void _zval_ptr_dtor(zval **zval_ptr ZEND_FILE_LINE_DC);
                                    ^
/Users/mathieudelisle/Downloads/xhprof/extension/xhprof.c:898:9: warning: expression result unused [-Wunused-value]
        ZVAL_STRING(&fname, "curl_getinfo");
        ^~~~~~~~~~~
/Users/mathieudelisle/Downloads/xhprof/extension/xhprof.c:1079:5: error: use of undeclared identifier 'zend_string'; did you mean 'zend_strtod'?
    zend_string       *func = NULL;
    ^~~~~~~~~~~
    zend_strtod
/usr/include/php/Zend/zend_strtod.h:30:17: note: 'zend_strtod' declared here
ZEND_API double zend_strtod(const char *s00, const char **se);
                ^
/Users/mathieudelisle/Downloads/xhprof/extension/xhprof.c:1079:24: error: use of undeclared identifier 'func'
    zend_string       *func = NULL;
                       ^
/Users/mathieudelisle/Downloads/xhprof/extension/xhprof.c:1086:31: error: no member named 'func' in 'struct _zend_execute_data'
    curr_func = execute_data->func;
                ~~~~~~~~~~~~  ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
27 warnings and 20 errors generated.
make: *** [xhprof.lo] Error 1
`
longxinH commented 7 years ago

@Webonaute oh! php7.1 has not been tried yet. Will support php7.1 as soon as possible. thank you

longxinH commented 7 years ago

@Webonaute hello!I can php7.1.2 version can be compiled, you can provide the next detailed version of php and osx version?