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

[BUG]: Unable to install using pecl on PHP 8.2 #16293

Closed
yu-shiba opened this issue Feb 27, 2023 · 3 comments · Fixed by #16296
Closed

[BUG]: Unable to install using pecl on PHP 8.2 #16293

yu-shiba opened this issue Feb 27, 2023 · 3 comments · Fixed by #16296
Assignees
Labels
5.0 The issues we want to solve in the 5.0 release bug A bug report status: high High

Comments

@yu-shiba
Copy link

yu-shiba commented Feb 27, 2023

Describe the bug

Unable to install using pecl on PHP 8.2

To Reproduce

docker run -it --rm php:8.2 bash
pecl install phalcon-5.2.0
...
make: *** [Makefile:210: phalcon.lo] Error 1
ERROR: `make' failed

Expected behavior

Phalcon must be able to be installed using pecl.

Screenshots

Part of the build log

downloading phalcon-5.2.0.tgz ...
Starting to download phalcon-5.2.0.tgz (954,435 bytes)
...............................................................................................................................................................
..............................done: 954,435 bytes
5 source files, building
running: phpize
Configuring for:
PHP Api Version:         20220829
Zend Module Api No:      20220829
Zend Extension Api No:   420220829
building in /tmp/pear/temp/pear-build-defaultuserNSBfOD/phalcon-5.2.0
running: /tmp/pear/temp/phalcon/configure --with-php-config=/usr/local/bin/php-config
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for a sed that does not truncate output... /bin/sed
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for cc... cc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether cc accepts -g... yes
checking for cc option to accept ISO C89... none needed
checking how to run the C preprocessor... cc -E
checking for icc... no
checking for suncc... no
checking for system library directory... lib
checking if compiler supports -Wl,-rpath,... yes
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking target system type... x86_64-pc-linux-gnu
checking for PHP prefix... /usr/local
checking for PHP includes... -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/in
clude/php/ext -I/usr/local/include/php/ext/date/lib
checking for PHP extension directory... /usr/local/lib/php/extensions/no-debug-non-zts-20220829
checking for PHP installed headers prefix... /usr/local/include/php
checking if debug is enabled... no
checking if zts is enabled... no
checking for gawk... no
checking for nawk... nawk
checking if nawk is broken... no
checking whether to enable phalcon... yes, shared
checking PHP version... checking whether HAVE_BUNDLED_PCRE is declared... yes
checking for ext/pcre/php_pcre.h... yes
checking whether HAVE_JSON is declared... yes
checking for ext/json/php_json.h... yes
checking for a sed that does not truncate output... /bin/sed
checking for ld used by cc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for /usr/bin/ld option to reload object files... -r
checking for BSD-compatible nm... /usr/bin/nm -B
checking whether ln -s works... yes
checking how to recognize dependent libraries... pass_all
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking the maximum length of command line arguments... 1572864
checking command to parse /usr/bin/nm -B output from cc object... ok
checking for objdir... .libs
checking for ar... ar
checking for ranlib... ranlib
checking for strip... strip
checking if cc supports -fno-rtti -fno-exceptions... no
checking for cc option to produce PIC... -fPIC
checking if cc PIC flag -fPIC works... yes
checking if cc static flag -static works... yes
checking if cc supports -c -o file.o... yes
checking whether the cc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no

creating libtool
appending configuration tag "CXX" to libtool
configure: patching config.h.in
configure: creating ./config.status
config.status: creating config.h
running: make
/bin/bash /tmp/pear/temp/pear-build-defaultuserNSBfOD/phalcon-5.2.0/libtool --mode=compile cc -I. -I/tmp/pear/temp/phalcon -I/tmp/pear/temp/pear-build-defaultu
serNSBfOD/phalcon-5.2.0/include -I/tmp/pear/temp/pear-build-defaultuserNSBfOD/phalcon-5.2.0/main -I/tmp/pear/temp/phalcon -I/usr/local/include/php -I/usr/local
/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -DHAVE_CONFIG
_H -g -O2 -D_GNU_SOURCE -DZEND_COMPILE_DL_EXT=1 -c /tmp/pear/temp/phalcon/phalcon.zep.c -o phalcon.lo -MMD -MF phalcon.dep -MT phalcon.lo
mkdir .libs
cc -I. -I/tmp/pear/temp/phalcon -I/tmp/pear/temp/pear-build-defaultuserNSBfOD/phalcon-5.2.0/include -I/tmp/pear/temp/pear-build-defaultuserNSBfOD/phalcon-5.2.
0/main -I/tmp/pear/temp/phalcon -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local
/include/php/ext -I/usr/local/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -D_GNU_SOURCE -DZEND_COMPILE_DL_EXT=1 -c /tmp/pear/temp/phalcon/phalcon.zep.c -MM
D -MF phalcon.dep -MT phalcon.lo -fPIC -DPIC -o .libs/phalcon.o
/tmp/pear/temp/phalcon/phalcon.zep.c: In function 'zephir_function_exists':
/tmp/pear/temp/phalcon/phalcon.zep.c:4070:101: warning: comparison between pointer and integer
4070 | if (zend_hash_str_exists(CG(function_table), Z_STRVAL_P(function_name), Z_STRLEN_P(function_name)) != NULL) {
| ^~
/tmp/pear/temp/phalcon/phalcon.zep.c: In function 'zephir_function_exists_ex':
/tmp/pear/temp/phalcon/phalcon.zep.c:4079:76: warning: comparison between pointer and integer
4079 | if (zend_hash_str_exists(CG(function_table), function_name, function_len) != NULL) {
| ^~
/tmp/pear/temp/phalcon/phalcon.zep.c: In function 'zephir_preg_match':
/tmp/pear/temp/phalcon/phalcon.zep.c:8054:2: error: unknown type name 'pcre_cache_entry'
8054 | pcre_cache_entry *pce;
| ^~~~~~~~~~~~~~~~
/tmp/pear/temp/phalcon/phalcon.zep.c:8069:13: warning: implicit declaration of function 'pcre_get_compiled_regex_cache' [-Wimplicit-function-declaration]
8069 | if ((pce = pcre_get_compiled_regex_cache(Z_STR_P(regex))) == NULL) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/pear/temp/phalcon/phalcon.zep.c:8069:11: warning: assignment to 'int *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
8069 | if ((pce = pcre_get_compiled_regex_cache(Z_STR_P(regex))) == NULL) {
| ^
/tmp/pear/temp/phalcon/phalcon.zep.c:8081:3: warning: implicit declaration of function 'php_pcre_match_impl' [-Wimplicit-function-declaration]
8081 | php_pcre_match_impl(pce, Z_STR_P(subject), return_value, &tmp_matches, global, 1, flags, offset);
| ^~~~~~~~~~~~~~~~~~~
/tmp/pear/temp/phalcon/phalcon.zep.c: In function 'zephir_require_ret':
/tmp/pear/temp/phalcon/phalcon.zep.c:9138:19: warning: passing argument 1 of 'zval_ptr_dtor' from incompatible pointer type [-Wincompatible-pointer-types]
9138 | zval_ptr_dtor(zend_string_path);
| ^~~~~~~~~~~~~~~~
| |
| zend_string * {aka struct _zend_string *}
In file included from /usr/local/include/php/Zend/zend.h:36,
from /usr/local/include/php/main/php.h:31,
from /tmp/pear/temp/phalcon/phalcon.zep.c:46:
/usr/local/include/php/Zend/zend_variables.h:79:35: note: expected 'zval *' {aka 'struct _zval_struct *'} but argument is of type 'zend_string *' {aka 'struct
_zend_string *'}
79 | ZEND_API void zval_ptr_dtor(zval *zval_ptr);
...

Details

  • Phalcon version: 5.2.0
  • PHP Version: 8.2
  • Operating System: Windows w/ docker

Additional context

In configure command is detected HAVE_BUNDLED_PCRE(ZEPHIR_USE_PHP_PCRE) , but ext/pcre/php_pcre.h is not included in make, which may cause an error.
When running on PHP 8.2, it may be necessary to include it in php_phalcon.h.

@yu-shiba yu-shiba added bug A bug report status: unverified Unverified labels Feb 27, 2023
@yu-shiba
Copy link
Author

Related issues #15973

@Jeckerson Jeckerson self-assigned this Feb 27, 2023
@Jeckerson Jeckerson added 5.0 The issues we want to solve in the 5.0 release and removed status: unverified Unverified labels Feb 27, 2023
@remicollet
Copy link
Contributor

Also see #16295 with build error message

Jeckerson added a commit that referenced this issue Feb 28, 2023
@Jeckerson Jeckerson linked a pull request Feb 28, 2023 that will close this issue
5 tasks
Jeckerson added a commit that referenced this issue Feb 28, 2023
niden added a commit that referenced this issue Feb 28, 2023
#16293 - Add `ext/pcre/php_pcre.h` header for PHP8.2
@niden niden added the status: high High label Feb 28, 2023
@niden niden added this to Phalcon v5 Feb 28, 2023
@github-project-automation github-project-automation bot moved this to Backlog in Phalcon v5 Feb 28, 2023
@niden niden moved this from Backlog to In Progress in Phalcon v5 Feb 28, 2023
Jeckerson added a commit that referenced this issue Feb 28, 2023
@niden
Copy link
Member

niden commented Feb 28, 2023

Resolved in #16296

Thank you @yu-shiba and @remicollet

@niden niden closed this as completed Feb 28, 2023
@github-project-automation github-project-automation bot moved this from In Progress to Implemented in Phalcon v5 Feb 28, 2023
rudiservo pushed a commit to rudiservo/cphalcon that referenced this issue Jun 19, 2023
rudiservo pushed a commit to rudiservo/cphalcon that referenced this issue Jun 19, 2023
rudiservo pushed a commit to rudiservo/cphalcon that referenced this issue Jun 19, 2023
rudiservo pushed a commit to rudiservo/cphalcon that referenced this issue Jun 19, 2023
@niden niden moved this from Implemented to Released in Phalcon v5 Jul 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
5.0 The issues we want to solve in the 5.0 release bug A bug report status: high High
Projects
Status: Released
Development

Successfully merging a pull request may close this issue.

4 participants