编译安装SCA_SDO php 扩展报错。make: *** [sdo.lo] Error 1

3年前 (2016-05-13) Jason Liu 故障报错, 运维 0评论 已收录 734℃

在编译安装SCA_SDO出现了两个错误,现在将其列出来,以作备忘

 

tar zxvf SCA_SDO-1.2.4.tgz

 

cd SCA_SDO-1.2.4

 

/usr/bin/phpize

 

./configure --prefix=/usr/local/ --with-php-config=/usr/bin/php-config

 

make

 

注意:  在make 的时候出现了错误.

 

 

错误一:

 

/root/tools/SCA_SDO-1.2.4/sdo.cpp:263: error: multiple storage classes

in declaration of 'arginfo_sdo_model_type_identifier'

/root/tools/SCA_SDO-1.2.4/sdo.cpp:325: error: multiple storage classes

in declaration of 'arginfo_sdo_model_reflectiondataobject_export'

make: *** [sdo.lo] Error 1

ERROR: `make' failed

 

解决办法:

 

将 /root/tools/SCA_SDO-1.2.4/sdo.cpp 所有的 static 全部删掉

是删除"static" 字符串,不是删除这一行

[email protected]:~/tools/SCA_SDO-1.2.4# cat sdo.cpp grep ^static

static char rcs_id[] = "$Id: sdo.cpp,v 1.15 2006/09/29 15:04:22 cem Exp $";

static ZEND_BEGIN_ARG_INFO(arginfo_sdo_dataobject, 0)

static ZEND_BEGIN_ARG_INFO(arginfo___get, 0)

static ZEND_BEGIN_ARG_INFO(arginfo___set, 0)

static ZEND_BEGIN_ARG_INFO(arginfo_sdo_dataobject_createdataobject, 0)

static ZEND_BEGIN_ARG_INFO(arginfo_sdo_sequence_getproperty, 0)

static ZEND_BEGIN_ARG_INFO(arginfo_sdo_sequence_move, 0)

static ZEND_BEGIN_ARG_INFO_EX(arginfo_sdo_sequence_insert, 0, ZEND_RETURN_VALUE, 1)

static ZEND_BEGIN_ARG_INFO_EX(arginfo_sdo_list_insert, 0, ZEND_RETURN_VALUE, 1)

static ZEND_BEGIN_ARG_INFO(arginfo_sdo_datafactory_create, 0)

static ZEND_BEGIN_ARG_INFO_EX(arginfo_sdo_das_datafactory_addType, 0, ZEND_RETURN_VALUE, 2)

static ZEND_BEGIN_ARG_INFO_EX(arginfo_sdo_das_datafactory_addPropertyToType, 0, ZEND_RETURN_VALUE, 5)

static ZEND_BEGIN_ARG_INFO(arginfo_sdo_model_type_identifier, 0)

static ZEND_BEGIN_ARG_INFO_EX(arginfo_sdo_model_reflectiondataobject_export, 0, ZEND_RETURN_VALUE, 1)

static zend_module_dep sdo_deps[] = {

上面列出的是所有含static的行,将所有的static删除,然后再 make

 

问题二:

 

make: *** [commonj/sdo/SDODataConverter.lo] Error 1

 

解决办法:

 

修改 /root/tools/SCA_SDO-1.2.4/commonj/sdo/SDODataConverter.cpp

 

 

#include <string.h>

#include "commonj/sdo/SDODataConverter.h"

#include "commonj/sdo/SDORuntimeException.h"

前加入:

#include <cstdio>

#include <cstdlib>

 

然后再 编译安装

 

安装

 

make install

cp -r SCA /etc/php5/

cp -r DAS /etc/php5/SDO

chmod -R 755 /etc/php5/SCA

chmod -R 755 /etc/php5/SDO

搞定.收工

 

From: http://acgnnote.com/post/1d46c4a6_913cd63

相关推荐

嗨、骚年、快来消灭0回复。