Solved thread

This post is marked as solved. If you think the information contained on this thread must be part of the official documentation, please contribute submitting a pull request to its repository.

Problem with the installation on php7.0 trough zephir

Hi! Tired to install phalcon with php7

zephir build --backend=ZendEngine3 / some warnings... / Compiling... Installing... Zephir\CompilerException: Internal extension compilation failed. Check compile-errors.log for more information

in compile-errors.log i see

/var/www/cphalcon/ext/kernel/object.c: In function 'zephir_get_called_class': /var/www/cphalcon/ext/kernel/object.c:104:30: error: 'struct _zend_execute_data' has no member named 'called_scope' if (EG(current_execute_data)->called_scope) { ^ /var/www/cphalcon/ext/kernel/object.c:105:46: error: 'struct _zend_execute_data' has no member named 'called_scope' zend_string *ret = EG(current_execute_data)->called_scope->name; ^ In file included from /usr/include/php/20160303/Zend/zend_globals.h:28:0, from /usr/include/php/20160303/Zend/zend_compile.h:687, from /usr/include/php/20160303/Zend/zend_modules.h:26, from /usr/include/php/20160303/Zend/zend_API.h:27, from /usr/include/php/20160303/main/php.h:40, from /var/www/cphalcon/ext/kernel/object.c:25: /usr/include/php/20160303/Zend/zend_globals_macros.h:46:33: error: 'zend_executor_globals' has no member named 'scope'

define EG(v) (executor_globals.v)

                             ^

/var/www/cphalcon/ext/kernel/object.c:110:7: note: in expansion of macro 'EG' if (!EG(scope)) { ^ /var/www/cphalcon/ext/kernel/object.c: In function 'zephir_read_property': /usr/include/php/20160303/Zend/zend_globals_macros.h:46:33: error: 'zend_executor_globals' has no member named 'scope'

define EG(v) (executor_globals.v)

                             ^

/var/www/cphalcon/ext/kernel/object.c:439:14: note: in expansion of macro 'EG' old_scope = EG(scope); ^ /usr/include/php/20160303/Zend/zend_globals_macros.h:46:33: error: 'zend_executor_globals' has no member named 'scope'

define EG(v) (executor_globals.v)

                             ^

/var/www/cphalcon/ext/kernel/object.c:440:2: note: in expansion of macro 'EG' EG(scope) = ce; ^ /usr/include/php/20160303/Zend/zend_globals_macros.h:46:33: error: 'zend_executor_globals' has no member named 'scope'

define EG(v) (executor_globals.v)

                             ^

/var/www/cphalcon/ext/kernel/object.c:460:2: note: in expansion of macro 'EG' EG(scope) = old_scope; ^ /var/www/cphalcon/ext/kernel/object.c: In function 'zephir_update_property_zval': /usr/include/php/20160303/Zend/zend_globals_macros.h:46:33: error: 'zend_executor_globals' has no member named 'scope'

define EG(v) (executor_globals.v)

                             ^

/var/www/cphalcon/ext/kernel/object.c:530:14: note: in expansion of macro 'EG' old_scope = EG(scope); ^ /usr/include/php/20160303/Zend/zend_globals_macros.h:46:33: error: 'zend_executor_globals' has no member named 'scope'

define EG(v) (executor_globals.v)

                             ^

/var/www/cphalcon/ext/kernel/object.c:541:2: note: in expansion of macro 'EG' EG(scope) = ce; ^ /var/www/cphalcon/ext/kernel/array.c: In function 'zephir_array_keys': /var/www/cphalcon/ext/kernel/array.c:558:8: warning: variable 'entry' set but not used [-Wunused-but-set-variable] zval *entry, new_val; ^ /usr/include/php/20160303/Zend/zend_globals_macros.h:46:33: error: 'zend_executor_globals' has no member named 'scope'

define EG(v) (executor_globals.v)

                             ^

/var/www/cphalcon/ext/kernel/object.c:556:2: note: in expansion of macro 'EG' EG(scope) = old_scope; ^ /var/www/cphalcon/ext/kernel/object.c: In function 'zephir_unset_property': /usr/include/php/20160303/Zend/zend_globals_macros.h:46:33: error: 'zend_executor_globals' has no member named 'scope'

define EG(v) (executor_globals.v)

                             ^

/var/www/cphalcon/ext/kernel/object.c:739:15: note: in expansion of macro 'EG' old_scope = EG(scope); ^ /usr/include/php/20160303/Zend/zend_globals_macros.h:46:33: error: 'zend_executor_globals' has no member named 'scope'

define EG(v) (executor_globals.v)

                             ^

/var/www/cphalcon/ext/kernel/object.c:740:3: note: in expansion of macro 'EG' EG(scope) = Z_OBJCE_P(object); ^ /usr/include/php/20160303/Zend/zend_globals_macros.h:46:33: error: 'zend_executor_globals' has no member named 'scope'

define EG(v) (executor_globals.v)

                             ^

/var/www/cphalcon/ext/kernel/object.c:744:3: note: in expansion of macro 'EG' EG(scope) = old_scope; ^ /var/www/cphalcon/ext/kernel/array.c: In function 'zephir_fast_in_array': /var/www/cphalcon/ext/kernel/array.c:821:15: warning: variable 'str_idx' set but not used [-Wunused-but-set-variable] zend_string *str_idx; ^ /var/www/cphalcon/ext/kernel/array.c:820:13: warning: variable 'num_idx' set but not used [-Wunused-but-set-variable] zend_ulong num_idx; ^ /var/www/cphalcon/ext/kernel/object.c: In function 'zephir_update_static_property_ex': /usr/include/php/20160303/Zend/zend_globals_macros.h:46:33: error: 'zend_executor_globals' has no member named 'scope'

define EG(v) (executor_globals.v)

                             ^

/var/www/cphalcon/ext/kernel/object.c:893:32: note: in expansion of macro 'EG' zend_class_entry *old_scope = EG(scope); ^ /usr/include/php/20160303/Zend/zend_globals_macros.h:46:33: error: 'zend_executor_globals' has no member named 'scope'

define EG(v) (executor_globals.v)

                             ^

/var/www/cphalcon/ext/kernel/object.c:895:2: note: in expansion of macro 'EG' EG(scope) = scope; ^ /usr/include/php/20160303/Zend/zend_globals_macros.h:46:33: error: 'zend_executor_globals' has no member named 'scope'

define EG(v) (executor_globals.v)

                             ^

/var/www/cphalcon/ext/kernel/object.c:897:2: note: in expansion of macro 'EG' EG(scope) = old_scope; ^ make: [kernel/object.lo] Ошибка 1 make: Ожидание завершения заданий... Assembler messages: Fatal error: can't create kernel/.libs/array.o: Permission denied make: ** [kernel/array.lo] Ошибка 1 /var/www/cphalcon/ext/kernel/object.c: In function 'zephir_get_called_class': /var/www/cphalcon/ext/kernel/object.c:104:30: error: 'struct _zend_execute_data' has no member named 'called_scope' if (EG(current_execute_data)->called_scope) { ^ /var/www/cphalcon/ext/kernel/object.c:105:46: error: 'struct _zend_execute_data' has no member named 'called_scope' zend_string ret = EG(current_execute_data)->called_scope->name; ^ In file included from /usr/include/php/20160303/Zend/zend_globals.h:28:0, from /usr/include/php/20160303/Zend/zend_compile.h:687, from /usr/include/php/20160303/Zend/zend_modules.h:26, from /usr/include/php/20160303/Zend/zend_API.h:27, from /usr/include/php/20160303/main/php.h:40, from /var/www/cphalcon/ext/kernel/object.c:25: /usr/include/php/20160303/Zend/zend_globals_macros.h:46:33: error: 'zend_executor_globals' has no member named 'scope'

define EG(v) (executor_globals.v)

                             ^

/var/www/cphalcon/ext/kernel/object.c:110:7: note: in expansion of macro 'EG' if (!EG(scope)) { ^ /var/www/cphalcon/ext/kernel/object.c: In function 'zephir_read_property': /usr/include/php/20160303/Zend/zend_globals_macros.h:46:33: error: 'zend_executor_globals' has no member named 'scope'

define EG(v) (executor_globals.v)

                             ^

/var/www/cphalcon/ext/kernel/object.c:439:14: note: in expansion of macro 'EG' old_scope = EG(scope); ^ /usr/include/php/20160303/Zend/zend_globals_macros.h:46:33: error: 'zend_executor_globals' has no member named 'scope'

define EG(v) (executor_globals.v)

                             ^

/var/www/cphalcon/ext/kernel/object.c:440:2: note: in expansion of macro 'EG' EG(scope) = ce; ^ /usr/include/php/20160303/Zend/zend_globals_macros.h:46:33: error: 'zend_executor_globals' has no member named 'scope'

define EG(v) (executor_globals.v)

                             ^

/var/www/cphalcon/ext/kernel/object.c:460:2: note: in expansion of macro 'EG' EG(scope) = old_scope; ^ /var/www/cphalcon/ext/kernel/object.c: In function 'zephir_update_property_zval': /usr/include/php/20160303/Zend/zend_globals_macros.h:46:33: error: 'zend_executor_globals' has no member named 'scope'

define EG(v) (executor_globals.v)

                             ^

/var/www/cphalcon/ext/kernel/object.c:530:14: note: in expansion of macro 'EG' old_scope = EG(scope); ^ /usr/include/php/20160303/Zend/zend_globals_macros.h:46:33: error: 'zend_executor_globals' has no member named 'scope'

define EG(v) (executor_globals.v)

                             ^

/var/www/cphalcon/ext/kernel/object.c:541:2: note: in expansion of macro 'EG' EG(scope) = ce; ^ /usr/include/php/20160303/Zend/zend_globals_macros.h:46:33: error: 'zend_executor_globals' has no member named 'scope'

define EG(v) (executor_globals.v)

                             ^

/var/www/cphalcon/ext/kernel/object.c:556:2: note: in expansion of macro 'EG' EG(scope) = old_scope; ^ /var/www/cphalcon/ext/kernel/object.c: In function 'zephir_unset_property': /usr/include/php/20160303/Zend/zend_globals_macros.h:46:33: error: 'zend_executor_globals' has no member named 'scope'

define EG(v) (executor_globals.v)

                             ^

/var/www/cphalcon/ext/kernel/object.c:739:15: note: in expansion of macro 'EG' old_scope = EG(scope); ^ /usr/include/php/20160303/Zend/zend_globals_macros.h:46:33: error: 'zend_executor_globals' has no member named 'scope'

define EG(v) (executor_globals.v)

                             ^

/var/www/cphalcon/ext/kernel/object.c:740:3: note: in expansion of macro 'EG' EG(scope) = Z_OBJCE_P(object); ^ /usr/include/php/20160303/Zend/zend_globals_macros.h:46:33: error: 'zend_executor_globals' has no member named 'scope'

define EG(v) (executor_globals.v)

                             ^

/var/www/cphalcon/ext/kernel/object.c:744:3: note: in expansion of macro 'EG' EG(scope) = old_scope; ^ /var/www/cphalcon/ext/kernel/object.c: In function 'zephir_update_static_property_ex': /usr/include/php/20160303/Zend/zend_globals_macros.h:46:33: error: 'zend_executor_globals' has no member named 'scope'

define EG(v) (executor_globals.v)

                             ^

/var/www/cphalcon/ext/kernel/object.c:893:32: note: in expansion of macro 'EG' zend_class_entry *old_scope = EG(scope); ^ /usr/include/php/20160303/Zend/zend_globals_macros.h:46:33: error: 'zend_executor_globals' has no member named 'scope'

define EG(v) (executor_globals.v)

                             ^

/var/www/cphalcon/ext/kernel/object.c:895:2: note: in expansion of macro 'EG' EG(scope) = scope; ^ /usr/include/php/20160303/Zend/zend_globals_macros.h:46:33: error: 'zend_executor_globals' has no member named 'scope'

define EG(v) (executor_globals.v)

                             ^

/var/www/cphalcon/ext/kernel/object.c:897:2: note: in expansion of macro 'EG' EG(scope) = old_scope; ^ make: *** [kernel/object.lo] Ошибка 1

Please tell me what am I doing wrong? php -v: PHP 7.1.0alpha3 Zephir version 0.9.3a-dev-2fba6d7a44

And phpize -v returns what ? Also you are trying to compile 2.1.x right ? Try to zephir fullclean before build.



792
edited Jul '16

phpize -v

Configuring for:

PHP Api Version: 20151012

Zend Module Api No: 20160303

Zend Extension Api No: 320160303

yes, i'm try to compile 2.1.x

zephir fullclean don't help

Then try maybe to go to ext and here do

make clean
phpize --clean

Also to make sure try to do apt-get install php7-dev.

Also you could try check if it's building on php 7.0.



792

i'm try your operations, and receive same result can it be because i have installed php7.0-dev and php7.1-dev packages?

It's possible. Uninstall both and install only one.

Which distro are you running?



792
edited Jul '16

removed php7.1-*, got another error:

zephir build --backend=ZendEngine3 PHP Warning: PHP Startup: zephir_parser: Unable to initialize module Module compiled with module API=20160303 PHP compiled with module API=20151012 These options need to match in Unknown on line 0 Zephir\Exception: Parser extension couldn't be loaded

i'm try build after fullclean

i'm using linux mint 17.3



114.4k
Accepted
answer

You need to clean zephir parser now, just go into zephir/parser and type:

make clean
phpize --clean


792

thanks! your instructions are helpfull for me!

Is it's working now ? I will have to check later myself if it's builiding on php 7.1



792

yes, it's working now i think, problem was because i have php7.0 and php7.1 installed maybee phalcon don't want compile with php7.1 me helped: remove php7.1, and clean zephir parser