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

Compilation of cphalcon fails with gcc-7.2. #13076

Closed
Fisiu opened this issue Sep 19, 2017 · 4 comments
Closed

Compilation of cphalcon fails with gcc-7.2. #13076

Fisiu opened this issue Sep 19, 2017 · 4 comments

Comments

@Fisiu
Copy link

Fisiu commented Sep 19, 2017

I'm trying to compile phalcon-3.2.2 with with the latest zephir-0.9.11 using gcc-7.2 however I have some issues. Here is a build log:
phalcon-3.2.2-gcc-7.2.txt

Compilation of zephir didn't return any errors, but cphalcon.

[   86s] libtool: compile:  cc -I. -I/home/abuild/rpmbuild/BUILD/cphalcon-3.2.2/ext -DPHP_ATOM_INC -I/home/abuild/rpmbuild/BUILD/cphalcon-3.2.2/ext/include -I/home/abuild/rpmbuild/BUILD/cphalcon-3.2.2/ext/main -I/home/abuild/rpmbuild/BUILD/cphalcon-3.2.2/ext -I/usr/include/php7 -I/usr/include/php7/main -I/usr/include/php7/TSRM -I/usr/include/php7/Zend -I/usr/include/php7/ext -I/usr/include/php7/ext/date/lib -DHAVE_CONFIG_H -fmessage-length=0 -grecord-gcc-switches -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -g3 -O1 -std=gnu90 -DZEPHIR_RELEASE=1 -c /home/abuild/rpmbuild/BUILD/cphalcon-3.2.2/ext/phalcon/events/eventsawareinterface.zep.c  -fPIC -DPIC -o phalcon/events/.libs/eventsawareinterface.o
[   86s] /home/abuild/rpmbuild/BUILD/cphalcon-3.2.2/ext/phalcon/di/injectionawareinterface.zep.c:16:11: error: stray '\' in program
[   86s]   * Phalcon\Di\InjectionAwareInterface
[   86s]            ^
[   86s] /home/abuild/rpmbuild/BUILD/cphalcon-3.2.2/ext/phalcon/di/injectionawareinterface.zep.c:16:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'Di'
[   86s]   * Phalcon\Di\InjectionAwareInterface
[   86s]             ^~
[   86s] /home/abuild/rpmbuild/BUILD/cphalcon-3.2.2/ext/phalcon/di/injectionawareinterface.zep.c:16:14: error: stray '\' in program
[   86s]   * Phalcon\Di\InjectionAwareInterface
[   86s]               ^
[   86s] /home/abuild/rpmbuild/BUILD/cphalcon-3.2.2/ext/phalcon/di/injectionawareinterface.zep.c:16:12: error: unknown type name 'Di'
[   86s]   * Phalcon\Di\InjectionAwareInterface
[   86s]             ^~
[   86s] /home/abuild/rpmbuild/BUILD/cphalcon-3.2.2/ext/phalcon/di/injectionawareinterface.zep.c:18:88: error: stray '\' in program
[   86s]   * This interface must be implemented in those classes that uses internally the Phalcon\Di that creates them
[   86s]                                                                                         ^
[   86s] /home/abuild/rpmbuild/BUILD/cphalcon-3.2.2/ext/phalcon/di/injectionawareinterface.zep.c:29:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'the'
[   86s]   * Sets the dependency injector
[   86s]          ^~~
[   86s] /home/abuild/rpmbuild/BUILD/cphalcon-3.2.2/ext/phalcon/di/injectionawareinterface.zep.c:29:9: error: unknown type name 'the'
[   86s] /home/abuild/rpmbuild/BUILD/cphalcon-3.2.2/ext/phalcon/di/injectionawareinterface.zep.c:34:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'the'
[   86s]   * Returns the internal dependency injector
[   86s]             ^~~
[   86s] /home/abuild/rpmbuild/BUILD/cphalcon-3.2.2/ext/phalcon/di/injectionawareinterface.zep.c:34:12: error: unknown type name 'the'
[   86s] make: *** [Makefile:234: phalcon/di/injectionawareinterface.lo] Error 1
[   86s] make: *** Waiting for unfinished jobs....
[   86s] /home/abuild/rpmbuild/BUILD/cphalcon-3.2.2/ext/phalcon/exception.zep.c:18:11: error: stray '\' in program
[   86s]   * Phalcon\Exception
[   86s]            ^
[   86s] /home/abuild/rpmbuild/BUILD/cphalcon-3.2.2/ext/phalcon/exception.zep.c:18:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'Exception'
[   86s]   * Phalcon\Exception
[   86s]             ^~~~~~~~~
[   86s] /home/abuild/rpmbuild/BUILD/cphalcon-3.2.2/ext/phalcon/exception.zep.c:18:12: error: unknown type name 'Exception'
[   86s] make: *** [Makefile:236: phalcon/exception.lo] Error 1
[   87s] /home/abuild/rpmbuild/BUILD/cphalcon-3.2.2/ext/phalcon/events/eventsawareinterface.zep.c:16:11: error: stray '\' in program
[   87s]   * Phalcon\Events\EventsAwareInterface
[   87s]            ^
[   87s] /home/abuild/rpmbuild/BUILD/cphalcon-3.2.2/ext/phalcon/events/eventsawareinterface.zep.c:16:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'Events'
[   87s]   * Phalcon\Events\EventsAwareInterface
[   87s]             ^~~~~~
[   87s] /home/abuild/rpmbuild/BUILD/cphalcon-3.2.2/ext/phalcon/events/eventsawareinterface.zep.c:16:18: error: stray '\' in program
[   87s]   * Phalcon\Events\EventsAwareInterface
[   87s]                   ^
[   87s] /home/abuild/rpmbuild/BUILD/cphalcon-3.2.2/ext/phalcon/events/eventsawareinterface.zep.c:16:12: error: unknown type name 'Events'
[   87s]   * Phalcon\Events\EventsAwareInterface
[   87s]             ^~~~~~
[   87s] /home/abuild/rpmbuild/BUILD/cphalcon-3.2.2/ext/phalcon/events/eventsawareinterface.zep.c:29:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'the'
[   87s]   * Sets the events manager
[   87s]          ^~~
[   87s] /home/abuild/rpmbuild/BUILD/cphalcon-3.2.2/ext/phalcon/events/eventsawareinterface.zep.c:29:9: error: unknown type name 'the'
[   87s] /home/abuild/rpmbuild/BUILD/cphalcon-3.2.2/ext/phalcon/events/eventsawareinterface.zep.c:34:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'the'
[   87s]   * Returns the internal event manager
[   87s]             ^~~
[   87s] /home/abuild/rpmbuild/BUILD/cphalcon-3.2.2/ext/phalcon/events/eventsawareinterface.zep.c:34:12: error: unknown type name 'the'
[   87s] make: *** [Makefile:238: phalcon/events/eventsawareinterface.lo] Error 1
@sergeyklay
Copy link
Member

sergeyklay commented Sep 19, 2017

There is no support yet for PHP 7.2. We'll plan to introduce 7.2 support in the Phalcon 4.0.0.

@phalcon phalcon locked and limited conversation to collaborators Sep 19, 2017
@sergeyklay sergeyklay added the not a bug Reported issue is not a bug label Sep 19, 2017
@phalcon phalcon unlocked this conversation Sep 21, 2017
@sergeyklay sergeyklay removed the not a bug Reported issue is not a bug label Sep 21, 2017
@sergeyklay sergeyklay reopened this Sep 21, 2017
@Fisiu
Copy link
Author

Fisiu commented Oct 11, 2017

I played around that issue. I build php-zephir-parser, invoked zephir compiler and passed generate option. Once C code has been generated, I tried to compile it and I get errors posted above.

However, if I try to compile extension directly from build/php7/$arch directory → it succeeds.

In both cases I used the same toolchain with gcc 7.2.

@sergeyklay
Copy link
Member

Well, as I can see the first version of GCC 7.x was released on May 2, 2017. I did a little research and made sure that most of LTS OS don't use even the 6.x branch. I'm sorry, but I want to close this issue for now. There are several reasons for this:

  • This issue is related to Zephir not Phalcon
  • It would be rash right now to waste time to solve this (not trivial) problem
  • Users always can have multiple versions of the compiler - it is not hard to install one more GCC (for example 5.x)

I'd like to add support for anything/everything at some point, but keeping the issue open doesn't help that. If anyone wants to get started, I'd love that.

Thank you for contributing

@sergeyklay
Copy link
Member

This issue was moved to zephir-lang/zephir#1591

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants