前言
灭霸终于集齐了七颗原石,消灭了妇联,打死了老爹,饿死了王境泽,正准备打响指的时候,突然传来一声sks的枪声:“嘭”,灭霸不甘心的应声倒地,这时从远处传来:“我卢本伟打死不开挂”
引申
今天就只针对yaf安装的一个坑做文章------着急的童鞋可以直接看后面的解决方法,不着急的可以看看如何出现这个错误的
yaf_config.c:81:9: error: use of undeclared identifier 'IS_CONSTANT_ARRAY
大家如果遇到这个坑可以看看这个文章
当大家遇到这个坑的时候要小心了
这个坑是官方的坑
yaf 版本2.3.3 之前用编译安装的时候出现的一个坑
/var/tmp/APC/apc_cache.c: In function '_apc_cache_user_update':
/var/tmp/APC/apc_cache.c:818: error: 'IS_CONSTANT_INDEX' undeclared (first use in this function)
/var/tmp/APC/apc_cache.c:818: error: (Each undeclared identifier is reported only once
/var/tmp/APC/apc_cache.c:818: error: for each function it appears in.)
/var/tmp/APC/apc_cache.c:820: error: 'IS_CONSTANT_ARRAY' undeclared (first use in this function)
make: *** [apc_cache.lo] Error 1
ERROR: `make' failed
这个要看yaf的扩展的源码了
Description:
------------
Compile time error during Make
/home/chaz/PHP_BUILDS/EXT/yaf-2.3.2/yaf_config.c:222:8: error: ‘IS_CONSTANT_ARRAY’ undeclared (first use in this function)
make: *** [yaf_config.lo] Error 1
Test script:
---------------
make
Expected result:
----------------
Successful compilation
Actual result:
--------------
/bin/bash /home/chaz/PHP_BUILDS/EXT/yaf-2.3.2/libtool --mode=compile cc -I. -I/home/chaz/PHP_BUILDS/EXT/yaf-2.3.2 -DPHP_ATOM_INC -I/home/chaz/PHP_BUILDS/EXT/yaf-2.3.2/include -I/home/chaz/PHP_BUILDS/EXT/yaf-2.3.2/main -I/home/chaz/PHP_BUILDS/EXT/yaf-2.3.2 -I/opt/local/include/php -I/opt/local/include/php/main -I/opt/local/include/php/TSRM -I/opt/local/include/php/Zend -I/opt/local/include/php/ext -I/opt/local/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /home/chaz/PHP_BUILDS/EXT/yaf-2.3.2/yaf_config.c -o yaf_config.lo
cc -I. -I/home/chaz/PHP_BUILDS/EXT/yaf-2.3.2 -DPHP_ATOM_INC -I/home/chaz/PHP_BUILDS/EXT/yaf-2.3.2/include -I/home/chaz/PHP_BUILDS/EXT/yaf-2.3.2/main -I/home/chaz/PHP_BUILDS/EXT/yaf-2.3.2 -I/opt/local/include/php -I/opt/local/include/php/main -I/opt/local/include/php/TSRM -I/opt/local/include/php/Zend -I/opt/local/include/php/ext -I/opt/local/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /home/chaz/PHP_BUILDS/EXT/yaf-2.3.2/yaf_config.c -fPIC -DPIC -o .libs/yaf_config.o
/home/chaz/PHP_BUILDS/EXT/yaf-2.3.2/yaf_config.c: In function ‘yaf_config_zval_dtor’:
/home/chaz/PHP_BUILDS/EXT/yaf-2.3.2/yaf_config.c:81:9: error: ‘IS_CONSTANT_ARRAY’ undeclared (first use in this function)
/home/chaz/PHP_BUILDS/EXT/yaf-2.3.2/yaf_config.c:81:9: note: each undeclared identifier is reported only once for each function it appears in
/home/chaz/PHP_BUILDS/EXT/yaf-2.3.2/yaf_config.c: In function ‘yaf_config_ini_zval_persistent’:
/home/chaz/PHP_BUILDS/EXT/yaf-2.3.2/yaf_config.c:183:8: error: ‘IS_CONSTANT_ARRAY’ undeclared (first use in this function)
/home/chaz/PHP_BUILDS/EXT/yaf-2.3.2/yaf_config.c: In function ‘yaf_config_ini_zval_losable’:
/home/chaz/PHP_BUILDS/EXT/yaf-2.3.2/yaf_config.c:222:8: error: ‘IS_CONSTANT_ARRAY’ undeclared (first use in this function)
make: *** [yaf_config.lo] Error 1
错误解释:
描述:
------------
在Make期间编译时间错误
/home/chaz/PHP_BUILDS/EXT/yaf-2.3.2/yaf_config.c:222:8:错误:“_IS_CONSTANT_ARRAY”未声明(首次使用此功能)
make:*** [yaf_config.lo]错误1
------------
在Make期间编译时间错误
/home/chaz/PHP_BUILDS/EXT/yaf-2.3.2/yaf_config.c:222:8:错误:“_IS_CONSTANT_ARRAY”未声明(首次使用此功能)
make:*** [yaf_config.lo]错误1
从Yaf 2.3.3开始修复此错误,请参阅
https://github.com/laruence/yaf/commit/d5878063d8c654419f27d958134a1bf220e2344b
解决方法:
非常简单,安装2.3.3(含)以上版本即可