0

通过 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.

关于为什么这不会编译的任何想法?

4

1 回答 1

0

将“function_entry”替换为“zend_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的评论还建议在源代码中将“pval”替换为“zval”,但如果您在扩展中使用复杂的数据类型,那么整个故事可能有点复杂。

于 2015-03-16T20:02:07.600 回答