通过PECL
安装SCA_SDO时出现错误 -MacBook-Pro:SCA_SDO-1.2.4 roland$ sudo pecl install SCA_SDO
downloading SCA_SDO-1.2.4.tgz ...
Starting to download SCA_SDO-1.2.4.tgz (576,531 bytes)
..............................................................................................done: 576,531 bytes
194 source files, building
running: phpize
Cannot find config.m4.
Make sure that you run '/usr/local/Cellar/php55/5.5.22/bin/phpize' in the top level source directory of the module
ERROR: `phpize' failed
然后当我尝试手动下载和安装时,我得到以下
/Users/roland/Documents/sca_sdo/SCA_SDO-1.2.4/sdo.cpp:310:1: error: unknown type
name 'function_entry'
function_entry sdo_model_propertyimpl_methods[] = {
^
/Users/roland/Documents/sca_sdo/SCA_SDO-1.2.4/sdo.cpp:325:8: warning: duplicate
'static' declaration specifier [-Wduplicate-decl-specifier]
static ZEND_BEGIN_ARG_INFO_EX(arginfo_sdo_model_reflectiondataobject_exp...
^
/usr/local/Cellar/php55/5.5.22/include/php/Zend/zend_API.h:107:2: note:
expanded from macro 'ZEND_BEGIN_ARG_INFO_EX'
static const zend_arg_info name[] = ...
^
/Users/roland/Documents/sca_sdo/SCA_SDO-1.2.4/sdo.cpp:330:1: error: unknown type
name 'function_entry'
function_entry sdo_model_reflectiondataobject_methods[] = {
^
/Users/roland/Documents/sca_sdo/SCA_SDO-1.2.4/sdo.cpp:352:1: error: unknown type
name 'function_entry'
function_entry sdo_exception_methods[] = {
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
15 warnings and 20 errors generated.
有关为何无法编译的任何想法?
答案 0 :(得分:0)
用“zend_function_entry”替换“function_entry”对于我在OS X 10.9.5上使用PHP 5.4.30运行的简单测试就足够了,使用此处发布的代码:http://php.webtutor.pl/en/2011/07/07/how-to-create-php-extensions-in-c-part-i-adding-simple-function/
对https://bugs.php.net/bug.php?id=61479的评论也建议在源代码中用“zval”替换“pval”,但是如果你在扩展中使用复杂的数据类型那么整个故事可能会有点复杂。 / p>