在OSX 10.9上编译phalcon的问题[英] Problems compile phalcon on osx 10.9

问题描述

尝试遵循文档中的说明:

运行

$ sudo ./install

然后得到这个:

gcc -I. -I/Users/honky/cphalcon/build/64bits -DPHP_ATOM_INC -I/Users/honky/cphalcon/build/64bits/include -I/Users/honky/cphalcon/build/64bits/main -I/Users/honky/cphalcon/build/64bits -I/usr/local/php5/include/php -I/usr/local/php5/include/php/main -I/usr/local/php5/include/php/TSRM -I/usr/local/php5/include/php/Zend -I/usr/local/php5/include/php/ext -I/usr/local/php5/include/php/ext/date/lib -DPHALCON_RELEASE -DHAVE_CONFIG_H -O2 -finline-functions -fomit-frame-pointer -fvisibility=hidden -c /Users/honky/cphalcon/build/64bits/phalcon.c -fno-common -DPIC -o .libs/phalcon.o
/Users/honky/cphalcon/build/64bits/phalcon.c:108409:21: error: libintl.h: No such file or directory
/Users/honky/cphalcon/build/64bits/phalcon.c: In function ‘phalcon_translate_adapter_gettext_read_dimension’:
/Users/honky/cphalcon/build/64bits/phalcon.c:108425: warning: incompatible implicit declaration of built-in function ‘gettext’
/Users/honky/cphalcon/build/64bits/phalcon.c: In function ‘phalcon_translate_adapter_gettext_has_dimension’:
/Users/honky/cphalcon/build/64bits/phalcon.c:108441: warning: incompatible implicit declaration of built-in function ‘gettext’
/Users/honky/cphalcon/build/64bits/phalcon.c: In function ‘zim_Phalcon_Translate_Adapter_Gettext_query’:
/Users/honky/cphalcon/build/64bits/phalcon.c:108553: warning: incompatible implicit declaration of built-in function ‘gettext’
/Users/honky/cphalcon/build/64bits/phalcon.c:108555: warning: incompatible implicit declaration of built-in function ‘dgettext’
/Users/honky/cphalcon/build/64bits/phalcon.c: In function ‘zim_Phalcon_Translate_Adapter_Gettext_exists’:
/Users/honky/cphalcon/build/64bits/phalcon.c:108590: warning: incompatible implicit declaration of built-in function ‘gettext’
/Users/honky/cphalcon/build/64bits/phalcon.c:108592: warning: incompatible implicit declaration of built-in function ‘dgettext’
make: *** [phalcon.lo] Error 1

你猜到了吗?

推荐答案

Mac os x 预装了很长时间的 PHP 5.x,但安装未预装的扩展和解决库依赖关系会占用大量空闲时间并需要额外的努力,迷失在不相关的谷歌搜索结果中.我的经验告诉我,这是一条艰难的道路.我强烈建议在 Mac OS X 上使用 Homebrew 来消除这种真正不必要的痛苦.

在您成功安装 Homebrew 后,拥有 Phalcon 扩展(以及数以千计的其他开源库/工具/应用程序)就这么简单:

$ brew tap josegonzalez/homebrew-php
$ brew install php55-phalcon

当您需要另一个扩展或库时,只需键入:

$ brew search <whatever>

要了解有关公式或安装选项的更多信息:

$ brew info <whatever>

注意: Homebrew 需要安装 Xcode.在酿造之前,请确保您的 Mac 上已安装 Xcode.如果出现问题,请使用 brew doctor 命令了解发生了什么.

本文地址:https://www.itbaoku.cn/post/1739755.html