繁体   English   中英

在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命令了解正在发生的事情。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM