我正在尝试通过 pecl 安装 ibm_db2 。我没有运气。下面是我获得的控制台输出的示例。我错过了编译器库吗?看起来好像我。
...
/Applications/MAMP/bin/php/php7.2.1/include/php/Zend/zend_API.h:593:36: note: expanded from macro 'ZVAL_STRINGL'
ZVAL_NEW_STR(z, zend_string_init(s, l, 0)); \
^
/Applications/MAMP/bin/php/php7.2.1/include/php/Zend/zend_types.h:705:23: note: expanded from macro 'ZVAL_NEW_STR'
zend_string *__s = (s); \
^
/Applications/MAMP/bin/php/php7.2.1/include/php/Zend/zend_string.h:168:69: note: passing argument to parameter 'str' here
static zend_always_inline zend_string *zend_string_init(const char *str, size_t len, int persistent)
^
/Users/mcroteau/Downloads/tmp/pear/ibm_db2/ibm_db2.c:7688:77: warning: passing 'SQLUINTEGER *' (aka 'unsigned int *') to parameter of type 'SQLINTEGER *' (aka 'int *') converts between pointers to integer types with different sign [-Wpointer-sign]
rc = SQLBindCol(hstmt, 1, SQL_C_CHAR, last_id, MAX_IDENTITY_DIGITS, &out_length);
^~~~~~~~~~~
/Applications/dsdriver/include/sqlcli.h:669:60: note: passing argument to parameter 'pcbValue' here
SQLLEN FAR *pcbValue);
^
/Users/mcroteau/Downloads/tmp/pear/ibm_db2/ibm_db2.c:7702:20: warning: result of comparison against a string literal is unspecified (use strncmp instead) [-Wstring-compare]
if(last_id != "") {
^ ~~
/Users/mcroteau/Downloads/tmp/pear/ibm_db2/ibm_db2.c:7820:77: error: use of undeclared identifier 'IS_TYPE_IMMUTABLE'
if (params && Z_TYPE_P(params) == IS_ARRAY && (Z_TYPE_FLAGS_P(params) & IS_TYPE_IMMUTABLE)) {
^
62 warnings and 2 errors generated.
make: *** [ibm_db2.lo] Error 1
ERROR: `make' failed`