how compile phalcon with zephir

Hi. I want customize phalcon framework with zephir and then compile it.

try this but not work ! in bult time get some error !

git clone https://github.com/phalcon/cphalcon cd cphalcon zephir build

edited Oct '17

What is your OS & PHP version? Also, what is the output of those commands? We cant help you if you dont provide adequate info ;]

What is your OS & PHP version? Also, what is the output of those commands? We cant help you if you dont provide adequate info ;]

Thank's for reply. my os is Arch Linux with php version 7.1

this exactly i do :

cd cphalcon zephir build

it's show a lot of Warning. for example

Warning: Function "apcu_fetch" does not exist at compile time in /home/hashem/drive/hashem/workspace/php/customPhalcon/cphalcon/phalcon/annotations/adapter/apcu.zep on 67 [nonexistent-function]

return apcu_fetch(strtolower("_PHAN" . this->_prefix . key));

--------------------------------------------------------------^

You can ignore "does not exist at compile time" warnings, those modules will still work, it just warns you that CURRENTLY they are not intsalled on the system.

Is there any other type of error?

You can ignore "does not exist at compile time" warnings, those modules will still work, it just warns you that CURRENTLY they are not intsalled on the system.

Is there any other type of error?

yes.

Copying new kernel files... Preparing for PHP compilation... Preparing configuration file... Compiling... Installing... Zephir\CompilerException: Internal extension compilation failed. Check compile-errors.log for more information

in compile-errors.log file :

/home/workspace/php/c_cphalcon/ext/phalcon/di/injectionawareinterface.zep.c:29:9: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘the’

  • Sets the dependency injector ^~~ /home/workspace/php/c_cphalcon/ext/phalcon/di/injectionawareinterface.zep.c:29:9: error: unknown type name ‘the’ /home/workspace/php/c_cphalcon/ext/phalcon/di/injectionawareinterface.zep.c:34:12: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘the’
  • Returns the internal dependency injector ^~~ /home/workspace/php/c_cphalcon/ext/phalcon/di/injectionawareinterface.zep.c:34:12: error: unknown type name ‘the’ make: *** [Makefile:234: phalcon/di/injectionawareinterface.lo] Error 1