php5.6编译yaf3.0.6
phpize 没问题
./configure --with-php-config=/usr/local/php5.6/bin/php-config 没问题
make 出现错误
[[email protected] yaf-yaf-3.0.6]# make /bin/sh /usr/local/src/yaf-yaf-3.0.6/libtool --mode=compile cc -I. -I/usr/local/src/yaf-yaf-3.0.6 -DPHP_ATOM_INC -I/usr/local/src/yaf-yaf-3.0.6/include -I/usr/local/src/yaf-yaf-3.0.6/main -I/usr/local/src/yaf-yaf-3.0.6 -I/usr/local/php5.6/include/php -I/usr/local/php5.6/include/php/main -I/usr/local/php5.6/include/php/TSRM -I/usr/local/php5.6/include/php/Zend -I/usr/local/php5.6/include/php/ext -I/usr/local/php5.6/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /usr/local/src/yaf-yaf-3.0.6/yaf.c -o yaf.lo mkdir .libs cc -I. -I/usr/local/src/yaf-yaf-3.0.6 -DPHP_ATOM_INC -I/usr/local/src/yaf-yaf-3.0.6/include -I/usr/local/src/yaf-yaf-3.0.6/main -I/usr/local/src/yaf-yaf-3.0.6 -I/usr/local/php5.6/include/php -I/usr/local/php5.6/include/php/main -I/usr/local/php5.6/include/php/TSRM -I/usr/local/php5.6/include/php/Zend -I/usr/local/php5.6/include/php/ext -I/usr/local/php5.6/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /usr/local/src/yaf-yaf-3.0.6/yaf.c -fPIC -DPIC -o .libs/yaf.o In file included from /usr/local/src/yaf-yaf-3.0.6/yaf.c:28:0: /usr/local/src/yaf-yaf-3.0.6/php_yaf.h:72:2: error: unknown type name ‘zend_string’ zend_string *ext; ^~~~~~~~~~~ /usr/local/src/yaf-yaf-3.0.6/php_yaf.h:73:2: error: unknown type name ‘zend_string’ zend_string *base_uri; ^~~~~~~~~~~ /usr/local/src/yaf-yaf-3.0.6/php_yaf.h:74:2: error: unknown type name ‘zend_string’ zend_string *directory; ^~~~~~~~~~~ /usr/local/src/yaf-yaf-3.0.6/php_yaf.h:75:2: error: unknown type name ‘zend_string’ zend_string *local_library; ^~~~~~~~~~~ /usr/local/src/yaf-yaf-3.0.6/php_yaf.h:76:2: error: unknown type name ‘zend_string’ zend_string *local_namespaces; ^~~~~~~~~~~ /usr/local/src/yaf-yaf-3.0.6/php_yaf.h:77:2: error: unknown type name ‘zend_string’ zend_string *view_directory; ^~~~~~~~~~~ /usr/local/src/yaf-yaf-3.0.6/php_yaf.h:78:2: error: unknown type name ‘zend_string’ zend_string *view_ext; ^~~~~~~~~~~ /usr/local/src/yaf-yaf-3.0.6/php_yaf.h:79:2: error: unknown type name ‘zend_string’ zend_string *default_module; ^~~~~~~~~~~ /usr/local/src/yaf-yaf-3.0.6/php_yaf.h:80:2: error: unknown type name ‘zend_string’ zend_string *default_controller; ^~~~~~~~~~~ /usr/local/src/yaf-yaf-3.0.6/php_yaf.h:81:2: error: unknown type name ‘zend_string’ zend_string *default_action; ^~~~~~~~~~~ /usr/local/src/yaf-yaf-3.0.6/php_yaf.h:82:2: error: unknown type name ‘zend_string’ zend_string *bootstrap; ^~~~~~~~~~~ In file included from /usr/local/src/yaf-yaf-3.0.6/yaf.c:30:0: /usr/local/src/yaf-yaf-3.0.6/yaf_loader.h:69:23: error: unknown type name ‘zend_string’; did you mean ‘zend_stream’? int yaf_loader_import(zend_string *path, int use_path); ^~~~~~~~~~~ zend_stream /usr/local/src/yaf-yaf-3.0.6/yaf_loader.h:72:59: error: unknown type name ‘zend_string’; did you mean ‘zend_stream’? yaf_loader_t *yaf_loader_instance(yaf_loader_t *this_ptr, zend_string *library_path, zend_string *global_path); ^~~~~~~~~~~ zend_stream /usr/local/src/yaf-yaf-3.0.6/yaf_loader.h:72:86: error: unknown type name ‘zend_string’; did you mean ‘zend_stream’? yaf_loader_t *yaf_loader_instance(yaf_loader_t *this_ptr, zend_string *library_path, zend_string *global_path); ^~~~~~~~~~~ zend_stream In file included from /usr/local/src/yaf-yaf-3.0.6/yaf.c:32:0: /usr/local/src/yaf-yaf-3.0.6/yaf_application.h:31:36: error: unknown type name ‘zend_string’; did you mean ‘zend_stream’? int yaf_application_is_module_name(zend_string *name); ^~~~~~~~~~~ zend_stream In file included from /usr/local/src/yaf-yaf-3.0.6/yaf.c:35:0: /usr/local/src/yaf-yaf-3.0.6/yaf_view.h:34:53: error: unknown type name ‘zend_string’; did you mean ‘zend_stream’? void yaf_view_simple_clear_assign(yaf_view_t *view, zend_string *name); ^~~~~~~~~~~ zend_stream In file included from /usr/local/src/yaf-yaf-3.0.6/yaf.c:36:0: /usr/local/src/yaf-yaf-3.0.6/yaf_controller.h:34:1: error: unknown type name ‘zend_string’; did you mean ‘zend_stream’? zend_string * yaf_controller_render(zval *instance, char *action_name, int len, zval *var_array); ^~~~~~~~~~~ zend_stream In file included from /usr/local/src/yaf-yaf-3.0.6/yaf.c:38:0: /usr/local/src/yaf-yaf-3.0.6/yaf_request.h:47:62: error: unknown type name ‘zend_string’; did you mean ‘zend_stream’? yaf_request_t *yaf_request_instance(yaf_request_t *this_ptr, zend_string *info); ^~~~~~~~~~~ zend_stream /usr/local/src/yaf-yaf-3.0.6/yaf_request.h:48:54: error: unknown type name ‘zend_string’; did you mean ‘zend_stream’? int yaf_request_set_base_uri(yaf_request_t *request, zend_string *base_uri, zend_string *request_uri); ^~~~~~~~~~~ zend_stream /usr/local/src/yaf-yaf-3.0.6/yaf_request.h:48:77: error: unknown type name ‘zend_string’; did you mean ‘zend_stream’? int yaf_request_set_base_uri(yaf_request_t *request, zend_string *base_uri, zend_string *request_uri); ^~~~~~~~~~~ zend_stream /usr/local/src/yaf-yaf-3.0.6/yaf_request.h:52:54: error: unknown type name ‘zend_string’; did you mean ‘zend_stream’? zval *yaf_request_get_param(yaf_request_t *instance, zend_string *key); ^~~~~~~~~~~ zend_stream /usr/local/src/yaf-yaf-3.0.6/yaf_request.h:59:60: error: unknown type name ‘zend_string’; did you mean ‘zend_stream’? int yaf_request_set_params_single(yaf_request_t *instance, zend_string *key, zval *value); ^~~~~~~~~~~ zend_stream In file included from /usr/local/src/yaf-yaf-3.0.6/yaf.c:39:0: /usr/local/src/yaf-yaf-3.0.6/yaf_response.h:35:55: error: unknown type name ‘zend_string’; did you mean ‘zend_stream’? int yaf_response_alter_body(yaf_response_t *response, zend_string *name, zend_string *body, int flag); ^~~~~~~~~~~ zend_stream /usr/local/src/yaf-yaf-3.0.6/yaf_response.h:35:74: error: unknown type name ‘zend_string’; did you mean ‘zend_stream’? int yaf_response_alter_body(yaf_response_t *response, zend_string *name, zend_string *body, int flag); ^~~~~~~~~~~ zend_stream /usr/local/src/yaf-yaf-3.0.6/yaf_response.h:38:55: error: unknown type name ‘zend_string’; did you mean ‘zend_stream’? int yaf_response_clear_body(yaf_response_t *response, zend_string *name); ^~~~~~~~~~~ zend_stream /usr/local/src/yaf-yaf-3.0.6/yaf.c: In function ‘OnUpdateSeparator’: /usr/local/src/yaf-yaf-3.0.6/yaf.c:58:26: warning: implicit declaration of function ‘ZSTR_VAL’; did you mean ‘Z_STRVAL’? [-Wimplicit-function-declaration] YAF_G(name_separator) = ZSTR_VAL(new_value); ^~~~~~~~ Z_STRVAL /usr/local/src/yaf-yaf-3.0.6/yaf.c:58:24: warning: assignment makes pointer from integer without a cast [-Wint-conversion] YAF_G(name_separator) = ZSTR_VAL(new_value); ^ /usr/local/src/yaf-yaf-3.0.6/yaf.c:59:30: warning: implicit declaration of function ‘ZSTR_LEN’; did you mean ‘Z_STRLEN’? [-Wimplicit-function-declaration] YAF_G(name_separator_len) = ZSTR_LEN(new_value); ^~~~~~~~ Z_STRLEN /usr/local/src/yaf-yaf-3.0.6/yaf.c: In function ‘zm_activate_yaf’: /usr/local/src/yaf-yaf-3.0.6/yaf.c:169:15: warning: implicit declaration of function ‘zend_string_init’; did you mean ‘zend_stack_init’? [-Wimplicit-function-declaration] YAF_G(ext) = zend_string_init(YAF_DEFAULT_EXT, sizeof(YAF_DEFAULT_EXT) - 1, 0); ^~~~~~~~~~~~~~~~ zend_stack_init /usr/local/src/yaf-yaf-3.0.6/yaf.c:169:13: warning: assignment makes pointer from integer without a cast [-Wint-conversion] YAF_G(ext) = zend_string_init(YAF_DEFAULT_EXT, sizeof(YAF_DEFAULT_EXT) - 1, 0); ^ /usr/local/src/yaf-yaf-3.0.6/yaf.c:170:18: warning: assignment makes pointer from integer without a cast [-Wint-conversion] YAF_G(view_ext) = zend_string_init(YAF_DEFAULT_VIEW_EXT, sizeof(YAF_DEFAULT_VIEW_EXT) - 1, 0); ^ /usr/local/src/yaf-yaf-3.0.6/yaf.c:171:24: warning: assignment makes pointer from integer without a cast [-Wint-conversion] YAF_G(default_module) = zend_string_init( ^ /usr/local/src/yaf-yaf-3.0.6/yaf.c:173:28: warning: assignment makes pointer from integer without a cast [-Wint-conversion] YAF_G(default_controller) = zend_string_init( ^ /usr/local/src/yaf-yaf-3.0.6/yaf.c:175:24: warning: assignment makes pointer from integer without a cast [-Wint-conversion] YAF_G(default_action) = zend_string_init( ^ /usr/local/src/yaf-yaf-3.0.6/yaf.c: In function ‘zm_deactivate_yaf’: /usr/local/src/yaf-yaf-3.0.6/yaf.c:190:3: warning: implicit declaration of function ‘zend_string_release’; did you mean ‘zend_stack_base’? [-Wimplicit-function-declaration] zend_string_release(YAF_G(directory)); ^~~~~~~~~~~~~~~~~~~ zend_stack_base In file included from /usr/local/php5.6/include/php/Zend/zend.h:850:0, from /usr/local/php5.6/include/php/main/php.h:35, from /usr/local/src/yaf-yaf-3.0.6/yaf.c:21: /usr/local/php5.6/include/php/Zend/zend_variables.h:57:48: warning: passing argument 1 of ‘_zval_ptr_dtor’ from incompatible pointer type [-Wincompatible-pointer-types] #define zval_ptr_dtor(zval_ptr) _zval_ptr_dtor((zval_ptr) ZEND_FILE_LINE_CC) ^ /usr/local/src/yaf-yaf-3.0.6/yaf.c:206:3: note: in expansion of macro ‘zval_ptr_dtor’ zval_ptr_dtor(&YAF_G(modules)); ^~~~~~~~~~~~~ /usr/local/php5.6/include/php/Zend/zend_variables.h:51:15: note: expected ‘zval ** {aka struct _zval_struct **}’ but argument is of type ‘zval * {aka struct _zval_struct *}’ ZEND_API void _zval_ptr_dtor(zval **zval_ptr ZEND_FILE_LINE_DC); ^~~~~~~~~~~~~~ /usr/local/src/yaf-yaf-3.0.6/yaf.c:207:3: warning: implicit declaration of function ‘ZVAL_UNDEF’; did you mean ‘ZVAL_TRUE’? [-Wimplicit-function-declaration] ZVAL_UNDEF(&YAF_G(modules)); ^~~~~~~~~~ ZVAL_TRUE make: *** [yaf.lo] Error 1
后来搜索问题,yaf3以上是给PHP7 使用的,所以换成yaf2.3.5,问题解决
原文地址:https://www.cnblogs.com/qinwx/p/8543707.html
时间: 2024-11-05 22:35:45