Skip to content

[BUG]: Phalcon 5.14.0 Compile Failed #17078

@kgrammer

Description

@kgrammer

Describe the bug
Building Phalcon 5.14.0 using the alternative build steps fails with the following error message in the log file:

/usr/local/src/cphalcon/ext/kernel/file.c: In function 'zephir_fclose':
/usr/local/src/cphalcon/ext/kernel/file.c:181:53: warning: format '%d' expects argument of type 'int', but argument 4 has type 'zend_long' {aka 'long int'} [-Wformat=]
  181 |                 php_error_docref(NULL, E_WARNING, "%d is not a valid stream resource", stream->res->handle);
      |                                                    ~^                                  ~~~~~~~~~~~~~~~~~~~
      |                                                     |                                             |
      |                                                     int                                           zend_long {aka long int}
      |                                                    %ld
In file included from /usr/include/php/20240924/main/php.h:35,
                 from /usr/local/src/cphalcon/ext/phalcon/container/container.zep.c:6:
/usr/local/src/cphalcon/ext/phalcon/container/container.zep.c: In function 'zim_Phalcon_Container_Container_callableGet':
/usr/include/php/20240924/Zend/zend_API.h:957:34: warning: initialization of 'const char *' from incompatible pointer type 'zend_string *' {aka 'struct _zend_string *'} [-Wincompatible-pointer-types]
  957 |                 const char *_s = (s);                                   \
      |                                  ^
/usr/local/src/cphalcon/ext/phalcon/container/container.zep.c:203:9: note: in expansion of macro 'ZVAL_STRING'
  203 |         ZVAL_STRING(&_0, name);
      |         ^~~~~~~~~~~
/usr/local/src/cphalcon/ext/phalcon/container/container.zep.c: In function 'zim_Phalcon_Container_Container_callableNew':
/usr/include/php/20240924/Zend/zend_API.h:957:34: warning: initialization of 'const char *' from incompatible pointer type 'zend_string *' {aka 'struct _zend_string *'} [-Wincompatible-pointer-types]
  957 |                 const char *_s = (s);                                   \
      |                                  ^
/usr/local/src/cphalcon/ext/phalcon/container/container.zep.c:228:9: note: in expansion of macro 'ZVAL_STRING'
  228 |         ZVAL_STRING(&_0, name);
      |         ^~~~~~~~~~~
In file included from /usr/local/src/cphalcon/ext/phalcon/7__closure.zep.c:15:
/usr/local/src/cphalcon/ext/phalcon/7__closure.zep.c: In function 'zim_phalcon_7__closure___invoke':
/usr/local/src/cphalcon/ext/phalcon/7__closure.zep.c:40:62: error: 'name_zv' undeclared (first use in this function); did you mean 'name'?
   40 |         ZEPHIR_RETURN_CALL_METHOD(this_ptr, "get", NULL, 0, &name_zv);
      |                                                              ^~~~~~~
./kernel/fcall.h:165:57: note: in definition of macro 'ZEPHIR_RETURN_CALL_METHOD'
  165 |                 zval *params_[] = {ZEPHIR_FETCH_VA_ARGS __VA_ARGS__}; \
      |                                                         ^~~~~~~~~~~
/usr/local/src/cphalcon/ext/phalcon/7__closure.zep.c:40:62: note: each undeclared identifier is reported only once for each function it appears in
   40 |         ZEPHIR_RETURN_CALL_METHOD(this_ptr, "get", NULL, 0, &name_zv);
      |                                                              ^~~~~~~
./kernel/fcall.h:165:57: note: in definition of macro 'ZEPHIR_RETURN_CALL_METHOD'
  165 |                 zval *params_[] = {ZEPHIR_FETCH_VA_ARGS __VA_ARGS__}; \
      |                                                         ^~~~~~~~~~~
make: *** [Makefile:3880: phalcon/7__closure.lo] Error 1
make: *** Waiting for unfinished jobs....
In file included from /usr/local/src/cphalcon/ext/phalcon/8__closure.zep.c:15:
/usr/local/src/cphalcon/ext/phalcon/8__closure.zep.c: In function 'zim_phalcon_8__closure___invoke':
/usr/local/src/cphalcon/ext/phalcon/8__closure.zep.c:40:62: error: 'name_zv' undeclared (first use in this function); did you mean 'name'?
   40 |         ZEPHIR_RETURN_CALL_METHOD(this_ptr, "new", NULL, 0, &name_zv);
      |                                                              ^~~~~~~
./kernel/fcall.h:165:57: note: in definition of macro 'ZEPHIR_RETURN_CALL_METHOD'
  165 |                 zval *params_[] = {ZEPHIR_FETCH_VA_ARGS __VA_ARGS__}; \
      |                                                         ^~~~~~~~~~~
/usr/local/src/cphalcon/ext/phalcon/8__closure.zep.c:40:62: note: each undeclared identifier is reported only once for each function it appears in
   40 |         ZEPHIR_RETURN_CALL_METHOD(this_ptr, "new", NULL, 0, &name_zv);
      |                                                              ^~~~~~~
./kernel/fcall.h:165:57: note: in definition of macro 'ZEPHIR_RETURN_CALL_METHOD'
  165 |                 zval *params_[] = {ZEPHIR_FETCH_VA_ARGS __VA_ARGS__}; \
      |                                                         ^~~~~~~~~~~
make: *** [Makefile:3883: phalcon/8__closure.lo] Error 1

To Reproduce
Follow the step outlined in the online docs to build Phalcon.

git clone https://github.com/phalcon/cphalcon
cd cphalcon/
git checkout tags/v5.14.0 ./
zephir fullclean
zephir build

Expected behavior
The expected behavour would be for Phalcon 5.14.0 to be successfully built.

Details

  • Phalcon version: N/A since the build failed.
  • PHP Version: PHP 8.4.21 (cli) (built: May 14 2026 16:00:58) (NTS)
  • Operating System: Ubuntu 24.04.4
  • Installation type: "Alternative installation" method
  • Zephir version (if any): 0.22.0 (zephir_parser version is 2.0.4)
  • Server: Apache

Metadata

Metadata

Assignees

Labels

5.0The issues we want to solve in the 5.0 releasebugA bug reportstatus: mediumMedium

Type

No fields configured for Bug.

Projects

Status
Implemented

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions