简体   繁体   中英

Problems compile phalcon on osx 10.9

Trying to follow instruction from documentation:

running

$ sudo ./install

and get this:

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

Any guess?

Mac os x ships with PHP 5.x preinstalled for a long time but installing not pre-installed extensions and solving library dependencies steals lot of free time and requires extra effort, getting lost in un-relevant google results. My experience has showed me that, the hard way. I strongly recommend using Homebrew on Mac OS X to eliminate really unnecessary pains like this.

After you have successfully installed Homebrew, having Phalcon extension (and thousands of other open source libs/tools/apps) as simple as this:

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

When you need another extension or library, just type:

$ brew search <whatever>

To learn more about a formula or installing options:

$ brew info <whatever>

Note: Homebrew requires installing Xcode . Make sure that Xcode is installed on your mac before brewing. If something went wrong, use brew doctor command to get an idea about what's happening.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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