我一直试图在macos上安装/编译php7.4的php7.4驱动程序,但到目前为止没有成功。
在司机回购中存在一个问题,但在帮助方面没有太多进展。https://github.com/FirebirdSQL/php-firebird/issues/6
到目前为止我这么做了:
php-firebird
php-firebird
phpize
CPPFLAGS=-I/Library/Frameworks/Firebird.framework/Versions/Current/Headers LDFLAGS=-L/Library/Frameworks/Firebird.framework/Versions/Current/Libraries ./configure
make .https://github.com/FirebirdSQL/firebird/releases/download/R2_5_9/FirebirdCS-2.5.9-27139-x86_64.pkg (也尝试使用firebird 3.x),
/Users/bonovski/Sandbox/php-firebird/ibase_query.c:159:24: warning: equality comparison result unused [-Wunused-comparison]
ib_result->stmt_res == NULL;
~~~~~~~~~~~~~~~~~~~~^~~~~~~
/Users/bonovski/Sandbox/php-firebird/ibase_query.c:159:24: note: use '=' to turn this equality comparison into an assignment
ib_result->stmt_res == NULL;
^~
=
/Users/bonovski/Sandbox/php-firebird/ibase_query.c:178:22: warning: equality comparison result unused [-Wunused-comparison]
ib_query->stmt_res == NULL;
~~~~~~~~~~~~~~~~~~~^~~~~~~
/Users/bonovski/Sandbox/php-firebird/ibase_query.c:178:22: note: use '=' to turn this equality comparison into an assignment
ib_query->stmt_res == NULL;
^~
=
/Users/bonovski/Sandbox/php-firebird/ibase_query.c:253:22: error: use of undeclared identifier 'blr_bool'
case blr_bool:
^
/Users/bonovskiSandbox/php-firebird/ibase_query.c:254:34: error: use of undeclared identifier 'SQL_BOOLEAN'
a->el_type = SQL_BOOLEAN;
^
/Users/bonovski/Sandbox/php-firebird/ibase_query.c:598:22: error: use of undeclared identifier 'SQL_BOOLEAN'
case SQL_BOOLEAN:
^
/Users/bonovski/Sandbox/php-firebird/ibase_query.c:724:25: warning: incompatible pointer types passing 'zend_long *' (aka 'long long *') to parameter of type 'const time_t *' (aka 'const long *')
[-Wincompatible-pointer-types]
res = php_gmtime_r(&Z_LVAL_P(b_var), &t);
^~~~~~~~~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/time.h:127:46: note: passing argument to parameter here
struct tm *gmtime_r(const time_t * __restrict, struct tm * __restrict);
^
/Users/bonovski/Sandbox/php-firebird/ibase_query.c:790:18: error: use of undeclared identifier 'SQL_BOOLEAN'
case SQL_BOOLEAN:
^
/Users/bonovski/Sandbox/php-firebird/ibase_query.c:795:32: error: use of undeclared identifier 'SQL_BOOLEAN'
var->sqltype = SQL_BOOLEAN;
^
/Users/bonovski/Sandbox/php-firebird/ibase_query.c:883:18: error: use of undeclared identifier 'SQL_BOOLEAN'
case SQL_BOOLEAN:
^
/Users/bonovski/Sandbox/php-firebird/ibase_query.c:1386:14: error: use of undeclared identifier 'SQL_BOOLEAN'
case SQL_BOOLEAN:
^
/Users/bonovski/Sandbox/php-firebird/ibase_query.c:1985:18: error: use of undeclared identifier 'SQL_BOOLEAN'
case SQL_BOOLEAN:
^
/Users/bonovski/Sandbox/php-firebird/ibase_query.c:2012:18: error: use of undeclared identifier 'SQL_BOOLEAN'
case SQL_BOOLEAN:
^
3 warnings and 9 errors generated.
make: *** [ibase_query.lo] Error 1发布于 2021-05-20 17:06:52
有关布尔型数据类型的错误--在FireBird3.0中引入--清楚地表明您的PHP库期望Firebird 3+,但是您给它提供了FB2.5或更早的源代码。
CPPFLAGS=-I/Library/Frameworks/Firebird.framework/Versions/Current/Headers
LDFLAGS=-L/Library/Frameworks/Firebird.framework/Versions/Current/Libraries 我认为在您安装FB2.5之后,您提到的Versions/Current是作为指向2.5源的符号链接创建的。如果您确实安装了3.0源代码-然后检查Versions/Current符号链接指向的位置,并在需要时将其更改为3.0源代码( Linux上的ln -s,在BSD命令行实用程序上猜相同)
快速检查可能会在该位置打开ibase.h,并检查API版本声明:现在在我的Windows上,第三行非评论行如下:该文件中的#define FB_API_VER 21位于安装了FireBird2.1.7的文件夹中。
或者,调整CPPFLAGS和LDFLAGS以及其他变量以指向特定的3.x版本源,而不是一些模糊的“默认”或“当前”。
当然,这个标志的调整只有在您需要FB2.5源安装为“当前”源的情况下才有意义,因为FB3源有其他一些用途。我不知道UNIX的喜好,但至少在Windows上,安装/运行不同版本甚至相同版本的Firebird服务器是微不足道的,有时也很方便。对一些未来的读者来说,情况可能也是如此。
https://stackoverflow.com/questions/67614393
复制相似问题