Can't compile Phalcon 2.0.0 under CentOS
I tried to compile last version of Phalcon 2.0.0 [fee47546] with last version of Zephir [d2098f3], but got only several compiler warnings and
../zephir/bin/zephir: line 39: 12558 Segmentation fault php $ZEPHIRDIR/compiler.php $*
After caling
../zephir/bin/zephir generate
CentOS release 6.6 64bit
Can you provide the full output please (ie. warnings too)?
Warning: Class "APCIterator" does not exist at compile time in /root/git/cphalcon/phalcon/cache/backend/apc.zep on 224 [nonexistent-class]
apc = new \APCIterator("user", prefixPattern);
------------------------------------------------^
Warning: Function "imagescale" does not exist at compile time in /root/git/cphalcon/phalcon/image/adapter/gd.zep on 158 [nonexistent-function]
let image = imagescale(this->_image, width, height);
------------------------------------------------------^
Warning: Function "imagecrop" does not exist at compile time in /root/git/cphalcon/phalcon/image/adapter/gd.zep on 180 [nonexistent-function]
let image = imagecrop(this->_image, rect);
--------------------------------------------^
Warning: Function "imageflip" does not exist at compile time in /root/git/cphalcon/phalcon/image/adapter/gd.zep on 238 [nonexistent-function]
imageflip(this->_image, IMG_FLIP_HORIZONTAL);
------------------------------------------------^
Warning: Constant 'IMG_FLIP_HORIZONTAL' does not exist at compile time in /root/git/cphalcon/phalcon/image/adapter/gd.zep on 238 [nonexistent-constant]
imageflip(this->_image, IMG_FLIP_HORIZONTAL);
-----------------------------------------------^
Warning: Function "imageflip" does not exist at compile time in /root/git/cphalcon/phalcon/image/adapter/gd.zep on 240 [nonexistent-function]
imageflip(this->_image, IMG_FLIP_VERTICAL);
----------------------------------------------^
Warning: Constant 'IMG_FLIP_VERTICAL' does not exist at compile time in /root/git/cphalcon/phalcon/image/adapter/gd.zep on 240 [nonexistent-constant]
imageflip(this->_image, IMG_FLIP_VERTICAL);
---------------------------------------------^
Warning: Function "phalcon_orm_singlequotes" does not exist at compile time in /root/git/cphalcon/phalcon/mvc/model/query.zep on 513 [nonexistent-function]
let escapedValue = phalcon_orm_singlequotes(value);
---------------------------------------------------------^
Warning: Possible attempt to append elements on a non-array dynamic variable in /root/git/cphalcon/phalcon/mvc/router.zep on 109 [non-array-append]
]);
-----^
Warning: Possible attempt to append elements on a non-array dynamic variable in /root/git/cphalcon/phalcon/mvc/router.zep on 115 [non-array-append]
]);
-----^
../zephir/bin/zephir: line 39: 6809 Segmentation fault php $ZEPHIRDIR/compiler.php $*
PHP 5.4.37
Can you try to run the command with gdb?
From Phalcon dir, first run:
gdb php
At gdb prompt:
run/compiler.php generate
Once the segfault occurs, type:
bt
Then, can you give me the output please?
after fault:
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff53774a2 in _int_free () from /lib64/libc.so.6
bt:
#0 0x00007ffff53774a2 in _int_free () from /lib64/libc.so.6
#1 0x00000000005c0563 in zend_hash_destroy ()
#2 0x00000000005aa329 in destroy_zend_class ()
#3 0x00000000005c054b in zend_hash_destroy ()
#4 0x00000000005b3b4a in ?? ()
#5 0x000000000055528a in php_module_shutdown ()
#6 0x000000000065ec55 in ?? ()
#7 0x00007ffff531dd5d in __libc_start_main () from /lib64/libc.so.6
#8 0x0000000000421129 in _start ()
After updating to actual versions (cphalcon to 41478c3 and zephir to 6536304) the compilation log got little changes:
Warning: Class "APCIterator" does not exist at compile time in /root/git/cphalcon/phalcon/cache/backend/apc.zep on 224 [nonexistent-class]
apc = new \APCIterator("user", prefixPattern);
------------------------------------------------^
Warning: Function "imagescale" does not exist at compile time in /root/git/cphalcon/phalcon/image/adapter/gd.zep on 158 [nonexistent-function]
let image = imagescale(this->_image, width, height);
------------------------------------------------------^
Warning: Function "imagecrop" does not exist at compile time in /root/git/cphalcon/phalcon/image/adapter/gd.zep on 180 [nonexistent-function]
let image = imagecrop(this->_image, rect);
--------------------------------------------^
Warning: Function "imageflip" does not exist at compile time in /root/git/cphalcon/phalcon/image/adapter/gd.zep on 238 [nonexistent-function]
imageflip(this->_image, IMG_FLIP_HORIZONTAL);
------------------------------------------------^
Warning: Constant 'IMG_FLIP_HORIZONTAL' does not exist at compile time in /root/git/cphalcon/phalcon/image/adapter/gd.zep on 238 [nonexistent-constant]
imageflip(this->_image, IMG_FLIP_HORIZONTAL);
-----------------------------------------------^
Warning: Function "imageflip" does not exist at compile time in /root/git/cphalcon/phalcon/image/adapter/gd.zep on 240 [nonexistent-function]
imageflip(this->_image, IMG_FLIP_VERTICAL);
----------------------------------------------^
Warning: Constant 'IMG_FLIP_VERTICAL' does not exist at compile time in /root/git/cphalcon/phalcon/image/adapter/gd.zep on 240 [nonexistent-constant]
imageflip(this->_image, IMG_FLIP_VERTICAL);
---------------------------------------------^
Warning: Function "phalcon_orm_singlequotes" does not exist at compile time in /root/git/cphalcon/phalcon/mvc/model/query.zep on 513 [nonexistent-function]
let escapedValue = phalcon_orm_singlequotes(value);
---------------------------------------------------------^
Warning: Possible attempt to append elements on a non-array dynamic variable in /root/git/cphalcon/phalcon/mvc/router.zep on 110 [non-array-append]
]);
-----^
Warning: Possible attempt to append elements on a non-array dynamic variable in /root/git/cphalcon/phalcon/mvc/router.zep on 116 [non-array-append]
]);
-----^
Copying new kernel files...
../zephir/bin/zephir: line 39: 6593 Segmentation fault php $ZEPHIRDIR/compiler.php $*
But gdb log doesn't change.