【发布时间】:2021-12-26 18:28:52
【问题描述】:
MacOS M1 上 PHP 的 Firebird 扩展
我安装了 PHP7.4 和 homebrew 和 Xcode 命令行工具。
我按照此处的源存储库https://github.com/FirebirdSQL/php-firebird 使用以下方法按照说明进行操作,我已根据此处的答案更改了 Linux 公式以适应 MacOS 库位置 Issues compiling firebird driver for PHP-7.4 on macos:
git clone https://github.com/FirebirdSQL/php-firebird.git
cd php-firebird
phpize
CPPFLAGS=-I/Library/Frameworks/Firebird.framework/Headers LDFLAGS=-L/Library/Frameworks/Firebird.framework/Resources/lib ./configure
make
我得到的错误是
configure: error: libfbclient, libgds or libib_util not found! Check config.log for more information.
在日志文件中它指的是以下问题的症结
ld: warning: ignoring file /opt/firebird/lib/libib_util.dylib, building for macOS-arm64 but attempting to link with file built for macOS-x86_64
问题在于 Mac 的 Firebird 包仅针对 64 位架构而非 ARM 架构构建。
【问题讨论】:
-
我建议您在 github.com/FirebirdSQL/firebird/issues 上创建一个关于缺少 Firebird M1 版本的问题,并在 github.com/FirebirdSQL/php-firebird/issues 上为 php-firebird 创建一个问题。