Skip to content
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
Closed

Broken build with PHP 7.1 #12055

remicollet opened this issue Jul 30, 2016 · 67 comments
Labels
bug A bug report status: medium Medium
Milestone

Comments

@remicollet
Copy link
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
Copy link
Contributor Author

remicollet commented Jul 30, 2016

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

laruence/yaf@bd6ffea

@dreamsxin
Copy link
Contributor

Can upgrade zephir, rebuild phalcon it's ok.

@remicollet
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
Copy link
Contributor

@remicollet Whether delete ext/kernel directory in phalcon source

@remicollet
Copy link
Contributor Author

@dreamsxin same error.

@sergeyklay
Copy link
Contributor

@dreamsxin
Copy link
Contributor

@sergeyklay Get it.

@sergeyklay
Copy link
Contributor

sergeyklay commented Oct 14, 2016

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

git clone [email protected]:phalcon/cphalcon.git
cd cphalcon
git checkout 3.0.x

zephir fullclean
zephir build

@remicollet
Copy link
Contributor Author

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

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

Did you compile phalcon for zts ?

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

@Jurigag
Copy link
Contributor

Jurigag commented Oct 14, 2016

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

@remicollet
Copy link
Contributor Author

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

@Jurigag
Copy link
Contributor

Jurigag commented Oct 14, 2016

Anything in logs ?

@remicollet
Copy link
Contributor Author

Read previous comments => "no error message."

@Jurigag
Copy link
Contributor

Jurigag commented Oct 14, 2016

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

@remicollet
Copy link
Contributor Author

v3.0.2 using latest zephyr cae68c4205a93a7a1ea6165bcd5ce5cb470f5bdd still broken.

PHP 7.1.0 is planed for Dec 1st.

@sergeyklay
Copy link
Contributor

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

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

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

Jurigag commented Dec 6, 2016

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

@kornrunner
Copy link

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!

@Rid
Copy link

Rid commented Mar 23, 2017

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

@Jurigag
Copy link
Contributor

Jurigag commented Mar 23, 2017

It will be really soon i think.

@drnasin
Copy link

drnasin commented Mar 23, 2017

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

@Jurigag
Copy link
Contributor

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

sergeyklay commented Apr 5, 2017

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

@remicollet
Copy link
Contributor Author

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

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

Just use master zephir.

Please tag.

@Jurigag
Copy link
Contributor

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

Jurigag commented Apr 5, 2017

But 3.1.x is not stable version either.

@remicollet
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
Copy link
Contributor

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

Jurigag commented Apr 5, 2017

Oh okay then.

@sergeyklay
Copy link
Contributor

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

@remicollet
Copy link
Contributor Author

thanks

@sergeyklay
Copy link
Contributor

Released

@remicollet
Copy link
Contributor Author

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

niden commented Apr 5, 2017

Thank you for all the help @remicollet

@xueron
Copy link
Contributor

xueron commented Apr 6, 2017

Good news :)

@drnasin
Copy link

drnasin commented Apr 6, 2017

thank you boys!

@niden niden added bug A bug report status: medium Medium and removed Bug - Medium labels Dec 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A bug report status: medium Medium
Projects
None yet
Development

No branches or pull requests