Broken build with PHP 7.1 #12055

Open
remicollet opened this Issue Jul 30, 2016 · 36 comments

Projects

None yet
@remicollet
Contributor

With 7.1.0beta1

/builddir/build/BUILD/cphalcon-5372ac7972218b10fd9f08027a7718ea10f191b5/build/NTS/phalcon.zep.c: In function 'zephir_get_called_class':
/builddir/build/BUILD/cphalcon-5372ac7972218b10fd9f08027a7718ea10f191b5/build/NTS/phalcon.zep.c:4764:45: error: 'struct _zend_execute_data' has no member named 'called_scope'
  if (EG(current_execute_data)->called_scope) {
                                             ^
/builddir/build/BUILD/cphalcon-5372ac7972218b10fd9f08027a7718ea10f191b5/build/NTS/phalcon.zep.c:4765:61: error: 'struct _zend_execute_data' has no member named 'called_scope'
   zend_string *ret = EG(current_execute_data)->called_scope->name;
                                                             ^
/builddir/build/BUILD/cphalcon-5372ac7972218b10fd9f08027a7718ea10f191b5/build/NTS/phalcon.zep.c:4770:24: error: 'zend_executor_globals {aka struct _zend_executor_globals}' has no member named 'scope'
/builddir/build/BUILD/cphalcon-5372ac7972218b10fd9f08027a7718ea10f191b5/build/NTS/phalcon.zep.c: In function 'zephir_read_property':
/builddir/build/BUILD/cphalcon-5372ac7972218b10fd9f08027a7718ea10f191b5/build/NTS/phalcon.zep.c:5069:31: error: 'zend_executor_globals {aka struct _zend_executor_globals}' has no member named 'scope'
/builddir/build/BUILD/cphalcon-5372ac7972218b10fd9f08027a7718ea10f191b5/build/NTS/phalcon.zep.c:5070:19: error: 'zend_executor_globals {aka struct _zend_executor_globals}' has no member named 'scope'
/builddir/build/BUILD/cphalcon-5372ac7972218b10fd9f08027a7718ea10f191b5/build/NTS/phalcon.zep.c:5090:19: error: 'zend_executor_globals {aka struct _zend_executor_globals}' has no member named 'scope'
  EG(scope) = old_scope;
                   ^
...

@remicollet
Contributor
remicollet commented Jul 30, 2016 edited

This fix in yaf extension gives a part of solution ;)

laruence/yaf@bd6ffea

@sergeyklay sergeyklay added this to the 3.1.0 milestone Aug 1, 2016
@dreamsxin
Contributor

Can upgrade zephir, rebuild phalcon it's ok.

@sergeyklay sergeyklay added the PHP 7 label Oct 10, 2016
@remicollet
Contributor
remicollet commented Oct 10, 2016 edited

Better, but still broken with latest zephy snapshot (22f6632)

Build:

/builddir/build/BUILD/cphalcon-23b4100faa3ef91863d7f05de3f1c7a450cd52bc/build/ZTS/phalcon.zep.c: In function 'zephir_call_func_aparams_fast':
/builddir/build/BUILD/cphalcon-23b4100faa3ef91863d7f05de3f1c7a450cd52bc/build/ZTS/phalcon.zep.c:6828:4: warning: implicit declaration of function 'zend_generator_create_zval' [-Wimplicit-fun

Load:
PHP Warning: PHP Startup: Unable to load dynamic library '/builddir/build/BUILDROOT/php-phalcon3-3.0.1-1.fc23.remi.7.1.x86_64/usr/lib64/php/modules/phalcon.so' - /builddir/build/BUILDROOT/php-phalcon3-3.0.1-1.fc23.remi.7.1.x86_64/usr/lib64/php/modules/phalcon.so: undefined symbol: zend_generator_create_zval in Unknown on line 0

@dreamsxin
Contributor

@remicollet Whether delete ext/kernel directory in phalcon source

@remicollet
Contributor

@dreamsxin same error.

@dreamsxin
Contributor

@sergeyklay Get it.

@dreamsxin dreamsxin referenced this issue in phalcon/zephir Oct 14, 2016
Merged

Fixed #1337 #12055 #1338

@sergeyklay
Collaborator
sergeyklay commented Oct 14, 2016 edited

@remicollet Could you please try now by using the latest Zephir from master branch?

git clone git@github.com:phalcon/cphalcon.git
cd cphalcon
git checkout 3.0.x

zephir fullclean
zephir build
@remicollet
Contributor

Tagged version 3.0.1 NTS build fine with latest zephyr (0.9.4 rev 23856e1)

$ /usr/bin/php --no-php-ini -d extension=json.so -d extension=pdo.so --define extension=/builddir/build/BUILDROOT/php-phalcon3-3.0.1-1.fc23.remi.7.1.x86_64/usr/lib64/php/modules/phalcon.so --modules
+ grep -i phalcon
phalcon

But not the ZTS one

+ /usr/bin/zts-php --no-php-ini -d extension=json.so -d extension=pdo.so --define extension=/builddir/build/BUILDROOT/php-phalcon3-3.0.1-1.fc23.remi.7.1.x86_64/usr/lib64/php-zts/modules/phalcon.so --modules
+ grep -i phalcon

Strange... no error message...

@Jurigag
Contributor
Jurigag commented Oct 14, 2016 edited

Did you compile phalcon for zts ? ZTS php is totally different php and you need to install phalcon separately for it. I mean you sure this path even exists like /builddir/build/BUILDROOT/php-phalcon3-3.0.1-1.fc23.remi.7.1.x86_64/usr/lib64/php-zts/modules/phalcon.so ?

Check syslog or something then.

@remicollet
Contributor

Did you compile phalcon for zts ?

Yes, like all other >160 extensions I build ;)

@Jurigag
Contributor
Jurigag commented Oct 14, 2016

Then check any logs maybe ? Maybe some seg fault or something.

@remicollet
Contributor

This also happen for NTS build on some distro (RHEL-6 and 7, not on Fedora...)

@Jurigag
Contributor
Jurigag commented Oct 14, 2016

Anything in logs ?

@remicollet
Contributor

Read previous comments => "no error message."

@Jurigag
Contributor
Jurigag commented Oct 14, 2016

I wasn't asking for error message, i was asking for logs, like syslog etc.

@remicollet
Contributor

v3.0.2 using latest zephyr cae68c4205a93a7a1ea6165bcd5ce5cb470f5bdd still broken.

PHP 7.1.0 is planed for Dec 1st.

@sergeyklay
Collaborator

@remicollet https://seld.be/notes/php-versions-stats-2016-2-edition

In my opinion there are many enterprise/corporate projects. They use Composer more rarely. So the proportion of the 5th version is bigger.

And when someone asks me about 7.1 (before release) it sounds strange to me.

The time is our resource; We can spend it either for fixing bugs and stabilizing the work, or for supporting 7.1 (which will be used by 1% of users)

@Jurigag
Contributor
Jurigag commented Nov 27, 2016 edited

First of all, is there any really crucial and needed advantage in php 7.1 so we need to support it as soon as possible ?

@Izopi4a
Contributor
Izopi4a commented Dec 5, 2016

I agree with @sergeyklay, just one thing is that "new users" that are seeking for php framework might get pushed away by a fact that a specific framework doesn`t support the "latest php".

While i don`t say this is the most important issue i still think it should be fixed at early stage so people can see framework is always up to date and they have nothing to worry about.

At least , this is what i think

@temuri416
Contributor

@Jurigag @sergeyklay Do I understand it correctly that at the moment Phalcon 3.0,2 will not compile with PHP 7.1?

I did try it, and got segfaults - so that's not a good sign. Prevents us from moving to PHP 7.1.

@Jurigag
Contributor
Jurigag commented Dec 6, 2016

Yes. Just stay at php 7 until this is fixed.

@kornrunner

We're using phalcon in production on PHP 7 and we'd like to upgrade to 7.1, so looking forward to these changes.

Thanks!

@luispabon

Waiting on this so that we can support it at phpdocker.io on PHP 7.1 ๐Ÿ‘

@toastyghost

+1 for a fix, would like to go to 7.1

@hzxie
hzxie commented Jan 22, 2017

+1 for a fix, would like to go to 7.1

@fpietka
fpietka commented Jan 23, 2017

+1 for a fix, would like to go to 7.1

@nmapx
nmapx commented Jan 24, 2017

+1 for a fix, would like to go to 7.1

@temuri416
Contributor

@sergeyklay I'll be happy to contribute. But can I trade stickers and privileges for implementing a feature that I need most?

@Jurigag
Contributor
Jurigag commented Jan 24, 2017 edited

Then someone could say implement eager loading which is really bad. It doesn't work like this. But i would like some poll about what should be implemented or something like this for backers.

@kenikori

+1 for a fix, would like to go to 7.1

@nottellyou

+1 for a fix, would like to go to 7.1

@Alex8552
Alex8552 commented Feb 9, 2017

+1

@dropu
dropu commented Feb 21, 2017

+1

@qingliangcn

+1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment