Unable to install phalcon 2.1.0r (error)

I'm getting the following error while attempting to install phalcon 2.1.0r

In file included from /root/cphalcon/build/php5/64bits/phalcon.zep.c:175:0:
/root/cphalcon/build/php5/64bits/phalcon.zep.h:298:1: error: unknown type name 'zend_object_value'
 zend_object_value zephir_init_properties_Phalcon_Forms_Element(zend_class_entry *class_type TSRMLS_DC);
 ^
/root/cphalcon/build/php5/64bits/phalcon.zep.h:429:1: error: unknown type name 'zend_object_value'
 zend_object_value zephir_init_properties_Phalcon_Mvc_Model_Validator(zend_class_entry *class_type TSRMLS_DC);
 ^
/root/cphalcon/build/php5/64bits/phalcon.zep.h:2473:1: error: unknown type name 'zend_object_value'
 zend_object_value zephir_init_properties_Phalcon_Logger_Adapter(zend_class_entry *class_type TSRMLS_DC);
 ^
/root/cphalcon/build/php5/64bits/phalcon.zep.h:3189:1: error: unknown type name 'zend_object_value'
 zend_object_value zephir_init_properties_Phalcon_Application(zend_class_entry *class_type TSRMLS_DC);
 ^
/root/cphalcon/build/php5/64bits/phalcon.zep.h:3583:1: error: unknown type name 'zend_object_value'
 zend_object_value zephir_init_properties_Phalcon_Dispatcher(zend_class_entry *class_type TSRMLS_DC);
 ^
/root/cphalcon/build/php5/64bits/phalcon.zep.h:6223:1: error: unknown type name 'zend_object_value'
 zend_object_value zephir_init_properties_Phalcon_Mvc_Router(zend_class_entry *class_type TSRMLS_DC);
 ^
/root/cphalcon/build/php5/64bits/phalcon.zep.h:7274:1: error: unknown type name 'zend_object_value'
 zend_object_value zephir_init_properties_Phalcon_Assets_Collection(zend_class_entry *class_type TSRMLS_DC);
 ^
/root/cphalcon/build/php5/64bits/phalcon.zep.h:8519:1: error: unknown type name 'zend_object_value'
 zend_object_value zephir_init_properties_Phalcon_Cli_Console(zend_class_entry *class_type TSRMLS_DC);
 ^
/root/cphalcon/build/php5/64bits/phalcon.zep.h:8562:1: error: unknown type name 'zend_object_value'
 zend_object_value zephir_init_properties_Phalcon_Cli_Dispatcher(zend_class_entry *class_type TSRMLS_DC);
 ^
/root/cphalcon/build/php5/64bits/phalcon.zep.h:8638:1: error: unknown type name 'zend_object_value'
 zend_object_value zephir_init_properties_Phalcon_Cli_Router(zend_class_entry *class_type TSRMLS_DC);
 ^
/root/cphalcon/build/php5/64bits/phalcon.zep.h:10359:1: error: unknown type name 'zend_object_value'
 zend_object_value zephir_init_properties_Phalcon_Debug_Dump(zend_class_entry *class_type TSRMLS_DC);
 ^
/root/cphalcon/build/php5/64bits/phalcon.zep.h:11105:1: error: unknown type name 'zend_object_value'
 zend_object_value zephir_init_properties_Phalcon_Forms_Form(zend_class_entry *class_type TSRMLS_DC);
 ^
/root/cphalcon/build/php5/64bits/phalcon.zep.h:11887:1: error: unknown type name 'zend_object_value'
 zend_object_value zephir_init_properties_Phalcon_Http_Response_Headers(zend_class_entry *class_type TSRMLS_DC);
 ^
/root/cphalcon/build/php5/64bits/phalcon.zep.h:12249:1: error: unknown type name 'zend_object_value'
 zend_object_value zephir_init_properties_Phalcon_Loader(zend_class_entry *class_type TSRMLS_DC);
 ^
/root/cphalcon/build/php5/64bits/phalcon.zep.h:12755:1: error: unknown type name 'zend_object_value'
 zend_object_value zephir_init_properties_Phalcon_Mvc_Collection(zend_class_entry *class_type TSRMLS_DC);
 ^
/root/cphalcon/build/php5/64bits/phalcon.zep.h:14885:1: error: unknown type name 'zend_object_value'
 zend_object_value zephir_init_properties_Phalcon_Mvc_Model_MetaData_Apc(zend_class_entry *class_type TSRMLS_DC);
 ^
/root/cphalcon/build/php5/64bits/phalcon.zep.h:14914:1: error: unknown type name 'zend_object_value'
 zend_object_value zephir_init_properties_Phalcon_Mvc_Model_MetaData_Files(zend_class_entry *class_type TSRMLS_DC);
 ^
/root/cphalcon/build/php5/64bits/phalcon.zep.h:14944:1: error: unknown type name 'zend_object_value'
 zend_object_value zephir_init_properties_Phalcon_Mvc_Model_MetaData_Libmemcached(zend_class_entry *class_type TSRMLS_DC);
 ^
/root/cphalcon/build/php5/64bits/phalcon.zep.h:14975:1: error: unknown type name 'zend_object_value'
 zend_object_value zephir_init_properties_Phalcon_Mvc_Model_MetaData_Memcache(zend_class_entry *class_type TSRMLS_DC);
 ^
/root/cphalcon/build/php5/64bits/phalcon.zep.h:15005:1: error: unknown type name 'zend_object_value'
 zend_object_value zephir_init_properties_Phalcon_Mvc_Model_MetaData_Memory(zend_class_entry *class_type TSRMLS_DC);
 ^
/root/cphalcon/build/php5/64bits/phalcon.zep.h:15035:1: error: unknown type name 'zend_object_value'
 zend_object_value zephir_init_properties_Phalcon_Mvc_Model_MetaData_Redis(zend_class_entry *class_type TSRMLS_DC);
 ^
/root/cphalcon/build/php5/64bits/phalcon.zep.h:15139:1: error: unknown type name 'zend_object_value'
 zend_object_value zephir_init_properties_Phalcon_Mvc_Model_MetaData_Xcache(zend_class_entry *class_type TSRMLS_DC);
 ^
/root/cphalcon/build/php5/64bits/phalcon.zep.h:16208:1: error: unknown type name 'zend_object_value'
 zend_object_value zephir_init_properties_Phalcon_Mvc_Router_Annotations(zend_class_entry *class_type TSRMLS_DC);
 ^
/root/cphalcon/build/php5/64bits/phalcon.zep.h:18487:1: error: unknown type name 'zend_object_value'
 zend_object_value zephir_init_properties_Phalcon_Translate_Adapter_Csv(zend_class_entry *class_type TSRMLS_DC);
 ^
/root/cphalcon/build/php5/64bits/phalcon.zep.h:18687:1: error: unknown type name 'zend_object_value'
 zend_object_value zephir_init_properties_Phalcon_Validation(zend_class_entry *class_type TSRMLS_DC);
 ^
/root/cphalcon/build/php5/64bits/phalcon.zep.h:18870:1: error: unknown type name 'zend_object_value'
 zend_object_value zephir_init_properties_Phalcon_Validation_Message_Group(zend_class_entry *class_type TSRMLS_DC);
 ^
/root/cphalcon/build/php5/64bits/phalcon.zep.c:184:40: fatal error: ext/standard/php_smart_str.h: No such file or directory
 #include <ext/standard/php_smart_str.h>
                                        ^
compilation terminated.
make: *** [phalcon.lo] Error 1

I am currently running PHP 7

PHP 7.0.8-2+deb.sury.org~trusty+1 (cli) ( NTS ) Copyright (c) 1997-2016 The PHP Group Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies with Zend OPcache v7.0.8-2+deb.sury.org~trusty+1, Copyright (c) 1999-2016, by Zend Technologies

And I used the following commands to attempt to install the latest version (2.1.0r)

git clone http://github.com/phalcon/cphalcon

cd cphalcon/build

git checkout 2.1.x

sudo ./install

Any help as to why I can't install would be greatly appreciated



67.7k
edited Jun '16

i cant make it work myself like that. So you need zephir.

but you need to make sure 'php -v' in terminal shows php7

if you are running ubuntu take a look in.

ll /etc/alternatives/ | grep "php"

php should be php7 one, php-config should be php7 one, and phpize should be php7 one.


git clone zephir;
cd zephir;
./install -c;

// if you already had it installed
cd parser;
make clean; 
phpize clean;

git clone phalcon;
cd phalcon;
git checkout 2.1.x
git pull origin 2.1.x

zephir fullclean;
zephir build --zendEngine=3

extension should be compiled in your php7 install dir.

To build 2.1.x you need to use zephir.