We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

I can't install phalcon on my mac

I want to install phalcon with the php that the osx come with. My system is 10.10.1, php version is 5.5.14. Phalcon source code is checked out via github.

When I do 'sudo ./install', it display like this below:

cphalcon/build/64bits/phalcon.c:19939:2: warning: implicit declaration of function 'zend_hash_get_current_key_zval_ex' is invalid in C99
      [-Wimplicit-function-declaration]
        zend_hash_get_current_key_zval_ex(Z_ARRVAL_P(obj->properties), key, &obj->pos);
        ^
cphalcon/build/64bits/phalcon.c:19965:2: warning: incompatible pointer types initializing 'int (*)(zend_object_iterator *, char **, uint *, unsigned long *)'
      with an expression of type 'void (zend_object_iterator *, zval *)' [-Wincompatible-pointer-types]
        phalcon_registry_iterator_get_current_key,
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cphalcon/build/64bits/phalcon.c:48768:2: warning: incompatible pointer types initializing 'int (*)(zend_object_iterator *, char **, uint *, unsigned long *)'
      with an expression of type 'void (zend_object_iterator *, zval *)' [-Wincompatible-pointer-types]
        phalcon_forms_form_get_current_key,
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cphalcon/build/64bits/phalcon.c:49534:79: error: too few arguments to function call, expected 4, have 2
        phalcon_forms_form_iterator_funcs.get_current_key(&it, return_value TSRMLS_CC);
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~                            ^
cphalcon/build/64bits/phalcon.c:95084:41: warning: \U used with no following hex digits; treating as '\' followed by identifier [-Wunicode]
        PHALCON_REGISTER_CLASS_EX(Phalcon\\Mvc\\Url, Exception, mvc_url_exception, phalcon_exception_ce, NULL, 0);
                                               ^
cphalcon/build/64bits/phalcon.c:95097:41: warning: \U used with no following hex digits; treating as '\' followed by identifier [-Wunicode]
        PHALCON_REGISTER_CLASS_EX(Phalcon\\Mvc\\User, Component, mvc_user_component, phalcon_di_injectable_ce, NULL, 0);
                                               ^
cphalcon/build/64bits/phalcon.c:95110:41: warning: \U used with no following hex digits; treating as '\' followed by identifier [-Wunicode]
        PHALCON_REGISTER_CLASS_EX(Phalcon\\Mvc\\User, Module, mvc_user_module, phalcon_di_injectable_ce, NULL, 0);
                                               ^
cphalcon/build/64bits/phalcon.c:95123:41: warning: \U used with no following hex digits; treating as '\' followed by identifier [-Wunicode]
        PHALCON_REGISTER_CLASS_EX(Phalcon\\Mvc\\User, Plugin, mvc_user_plugin, phalcon_di_injectable_ce, NULL, 0);
                                               ^
cphalcon/build/64bits/phalcon.c:109942:2: warning: incompatible pointer types initializing 'int (*)(zend_object_iterator *, char **, uint *, unsigned long *)'
      with an expression of type 'void (zend_object_iterator *, zval *)' [-Wincompatible-pointer-types]
        phalcon_validation_message_group_get_current_key,
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cphalcon/build/64bits/phalcon.c:110318:93: error: too few arguments to function call, expected 4, have 2
        phalcon_validation_message_group_iterator_funcs.get_current_key(&it, return_value TSRMLS_CC);
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~                            ^
8 warnings and 2 errors generated.
make: *** [phalcon.lo] Error 1

Can someone tell me how to solve this problem? Thank you

Please install from brew or macports

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


987

So that means I can't install phalcon from source code? I feel some confused.. Need I install php from homebrew ?Or just install phalcon from homebrew

Please install from brew or macports

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


987
edited Jan '15

Perhaps there is something wrong with my phpize. The problem version is :

Configuring for: PHP Api Version: 20121113 Zend Module Api No: 20121212 Zend Extension Api No: 220121212

I changed my php version to 5.4.36 and changed the phpize verison to :

Configuring for: PHP Api Version: 20100412 Zend Module Api No: 20100525 Zend Extension Api No: 220100525

Though the installatin completed with 4 warnings, it worked.

But I want to know the reason about this problem, and I want to find more clever way to deal it

@GotTou maybe something wrong with a PHP headers of this version



2.8k
Accepted
answer

@GotTou when you get it from Homebrew - u will built if from source!

edited Jan '16

I'm the same as you,Did you solved it?



47.7k

Hi,

I have phalcon built from source code in mac 10.10.5. This is the solution I had for the issue I had. This may help you understand the problems with building phalcon in osx.

Homebrew will help you quickly overcome those problems.