Segmentation fault when compiling Phalcon 2.1 on Ubuntu 16.04 for PHP7

When installing Phalcon on fresh Ubuntu 16.04, I'm getting the 'Segmentation fault (core dumped)'.

Note the 16.04 comes with PHP7 by default.

Installing Phalcon with Zephir

# apt-get install php-dev re2c libpcre3-dev
# php -v
PHP 7.0.4-7ubuntu2 (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.6-dev, Copyright (c) 1999-2016, by Zend Technologies
# git clone https://github.com/phalcon/zephir.git
# cd zephir
# ./install -c
# cd ..
# git clone http://github.com/phalcon/cphalcon
# cd cphalcon/
# git checkout 2.1.x
# zephir build --backend=ZendEngine3
Segmentation fault (core dumped)

when trying to run zephir again, getting the message:

PHP Warning:  Illegal offset type in /root/zephir/Library/Passes/StaticTypeInference.php on line 284
PHP Parse error:  syntax error, unexpected 'f' (T_STRING), expecting ')' in /root/cphalcon/.temp/0.9.2a-dev/_root_cphalcon_phalcon_assets_filterinterface.zep.js.php on line 14


66.4k

true that

We should wait final version of Phalcon 2.1. But anyway I had to install PHP 5.6 alongside PHP 7.0.4 which is now default on Ubuntu 16.04 LTS, since ionCube does not yet support PHP 7 and they've already invested 50K US$ in development of their loader for PHP 7. Still they have no clue when they will provide working version for PHP7.

My comment above with compile instructions gives segfaults.

The Phalcon updated from repo today compiled and worked OK with this script

https://gist.github.com/Tosyn/fef6437dd3906ff200e471e478eaae95

Why in the world you would add PPA in unauthenticated mode just to install PHP7, when Ubuntu 16.04 LTS comes preloaded with PHP7 in default repo?!