New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Broken build with PHP 7.1 #12055

Closed
remicollet opened this Issue Jul 30, 2016 · 67 comments

Comments

Projects
None yet
@remicollet
Copy link
Contributor

remicollet commented Jul 30, 2016

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

This comment has been minimized.

Copy link
Contributor Author

remicollet commented Jul 30, 2016

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

laruence/yaf@bd6ffea

@dreamsxin

This comment has been minimized.

Copy link
Contributor

dreamsxin commented Oct 10, 2016

Can upgrade zephir, rebuild phalcon it's ok.

@remicollet

This comment has been minimized.

Copy link
Contributor Author

remicollet commented Oct 10, 2016

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

This comment has been minimized.

Copy link
Contributor

dreamsxin commented Oct 11, 2016

@remicollet Whether delete ext/kernel directory in phalcon source

@remicollet

This comment has been minimized.

Copy link
Contributor Author

remicollet commented Oct 11, 2016

@dreamsxin same error.

@sergeyklay

This comment has been minimized.

Copy link
Member

sergeyklay commented Oct 11, 2016

@dreamsxin

This comment has been minimized.

Copy link
Contributor

dreamsxin commented Oct 11, 2016

@sergeyklay Get it.

@sergeyklay

This comment has been minimized.

Copy link
Member

sergeyklay commented Oct 14, 2016

@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

This comment has been minimized.

Copy link
Contributor Author

remicollet commented Oct 14, 2016

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

This comment has been minimized.

Copy link
Member

Jurigag commented Oct 14, 2016

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

This comment has been minimized.

Copy link
Contributor Author

remicollet commented Oct 14, 2016

Did you compile phalcon for zts ?

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

@Jurigag

This comment has been minimized.

Copy link
Member

Jurigag commented Oct 14, 2016

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

@remicollet

This comment has been minimized.

Copy link
Contributor Author

remicollet commented Oct 14, 2016

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

@Jurigag

This comment has been minimized.

Copy link
Member

Jurigag commented Oct 14, 2016

Anything in logs ?

@remicollet

This comment has been minimized.

Copy link
Contributor Author

remicollet commented Oct 14, 2016

Read previous comments => "no error message."

@Jurigag

This comment has been minimized.

Copy link
Member

Jurigag commented Oct 14, 2016

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

@remicollet

This comment has been minimized.

Copy link
Contributor Author

remicollet commented Nov 27, 2016

v3.0.2 using latest zephyr cae68c4205a93a7a1ea6165bcd5ce5cb470f5bdd still broken.

PHP 7.1.0 is planed for Dec 1st.

@sergeyklay

This comment has been minimized.

Copy link
Member

sergeyklay commented Nov 27, 2016

@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

This comment has been minimized.

Copy link
Member

Jurigag commented Nov 27, 2016

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

This comment has been minimized.

Copy link
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

This comment has been minimized.

Copy link
Contributor

temuri416 commented Dec 6, 2016

@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

This comment has been minimized.

Copy link
Member

Jurigag commented Dec 6, 2016

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

@kornrunner

This comment has been minimized.

Copy link

kornrunner commented Dec 7, 2016

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!

@sergeyklay sergeyklay modified the milestones: 3.1.x, 3.1.0 Mar 22, 2017

@Rid

This comment has been minimized.

Copy link

Rid commented Mar 23, 2017

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

@Jurigag

This comment has been minimized.

Copy link
Member

Jurigag commented Mar 23, 2017

It will be really soon i think.

@drnasin

This comment has been minimized.

Copy link

drnasin commented Mar 23, 2017

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

@sergeyklay sergeyklay modified the milestones: 3.2.0, 3.1.x Mar 23, 2017

@sergeyklay sergeyklay referenced this issue Mar 24, 2017

Merged

Remove php 7.1 from allowed failures #12747

3 of 3 tasks complete
@Jurigag

This comment has been minimized.

Copy link
Member

Jurigag commented Mar 27, 2017

It's theoritcally fixed here - #12747 on build using latest zephir

Though it could be nice if someone with big test suite in their application could test it before we release it:

// install php 7.1 and 7.1-dev
git clone https://github.com/phalcon/zephir
cd zephir
./install -c
cd ..
git clone https://github.com/phalcon/cphalcon
cd cphalcon
git checkout 3.1.x
zephir build
// run your tests
@sergeyklay

This comment has been minimized.

Copy link
Member

sergeyklay commented Apr 5, 2017

Fixed in the 3.1.x branch. Note: You have to use latest Zephir from master branch

@sergeyklay sergeyklay closed this Apr 5, 2017

@remicollet

This comment has been minimized.

Copy link
Contributor Author

remicollet commented Apr 5, 2017

@sergeyklay do you plan to tag a new Zephir release ?
(also hard to find which version should be used..., using tag seems the one safe way)

At least before 3.1.x next version

@Jurigag

This comment has been minimized.

Copy link
Member

Jurigag commented Apr 5, 2017

3.1.2 will be released on few days so there will be no need to use zephir. Just use master zephir.

@remicollet

This comment has been minimized.

Copy link
Contributor Author

remicollet commented Apr 5, 2017

Just use master zephir.

Please tag.

@Jurigag

This comment has been minimized.

Copy link
Member

Jurigag commented Apr 5, 2017

What's a problem with master? Zephir is still being fixed etc, changes are happening almost each day so i don't see a point with a tag.

@remicollet

This comment has been minimized.

Copy link
Contributor Author

remicollet commented Apr 5, 2017

What's a problem with master?

Building a stable version (phalcon 3.1.2) with a unstable Zephir snapshot seems... messy, ugly, and terribly bad practice.

@Jurigag

This comment has been minimized.

Copy link
Member

Jurigag commented Apr 5, 2017

But 3.1.x is not stable version either.

@remicollet

This comment has been minimized.

Copy link
Contributor Author

remicollet commented Apr 5, 2017

From https://github.com/phalcon/cphalcon/releases 3.1.1 is Latest Release, so I suppose it is "stable", thus will be upcoming 3.1.2, when tagged...

Definitively, I think I will never understand how this project works.

@Jurigag

This comment has been minimized.

Copy link
Member

Jurigag commented Apr 5, 2017

When 3.1.2 will be released you won't need zephir to install it. To install latest NOT STABLE phalcon you need zephir, what's a difference if you will compile unstable phalcon with stable or non-stable zephir?

@remicollet

This comment has been minimized.

Copy link
Contributor Author

remicollet commented Apr 5, 2017

When 3.1.2 will be released you won't need zephir to install it.

I'm used to rebuild from tagged sources, using zephir, at least because I need to patch sources to drop the damned fucking non-free part (2 years old bug #10118)

@Jurigag

This comment has been minimized.

Copy link
Member

Jurigag commented Apr 5, 2017

Oh okay then.

@sergeyklay

This comment has been minimized.

Copy link
Member

sergeyklay commented Apr 5, 2017

@remicollet No problem. We'll release new Zephir version

@remicollet

This comment has been minimized.

Copy link
Contributor Author

remicollet commented Apr 5, 2017

thanks

@sergeyklay

This comment has been minimized.

Copy link
Member

sergeyklay commented Apr 5, 2017

Released

@remicollet

This comment has been minimized.

Copy link
Contributor Author

remicollet commented Apr 5, 2017

Released

I can even confirm, phalcon 3.1.1 build without any issue using zephir 0.9.7.

So, added to the few extensions list I can provide as RPM in my repo (for Fedora / RHEL and CentOS).

@niden

This comment has been minimized.

Copy link
Member

niden commented Apr 5, 2017

Thank you for all the help @remicollet

@xueron

This comment has been minimized.

Copy link
Contributor

xueron commented Apr 6, 2017

Good news :)

@drnasin

This comment has been minimized.

Copy link

drnasin commented Apr 6, 2017

thank you boys!

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