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

compile error ‘ZEND_EXIT’ was not declared in this scope #5638

Closed
tiket18 opened this issue Dec 25, 2024 · 1 comment
Closed

compile error ‘ZEND_EXIT’ was not declared in this scope #5638

tiket18 opened this issue Dec 25, 2024 · 1 comment

Comments

@tiket18
Copy link

tiket18 commented Dec 25, 2024

Please answer these questions before submitting your issue.

  1. What did you do? If possible, provide a simple script for reproducing the error.
    AlmaLinux 9.4 + pecl install openswoole-22.1.2

  2. What did you expect to see?
    OK

  3. What did you see instead?

/var/tmp/openswoole/ext-src/swoole_client_coro.cc: In function ‘void zim_swoole_client_coro_peek(zend_execute_data*, zval*)’:
/opt/remi/php84/root/usr/include/php/Zend/zend_alloc.h:100:16: warning: comparison of integer expressions of different signedness: ‘zend_long’ {aka ‘long int’} and ‘size_t’ {aka ‘long unsigned int’} [-Wsign-compare]
100 | ((size <= ZEND_MM_MAX_LARGE_SIZE) ? _emalloc_large(size) : _emalloc_huge(size))
/opt/remi/php84/root/usr/include/php/Zend/zend_alloc.h:105:17: note: in expansion of macro ‘ZEND_ALLOCATOR’
105 | ZEND_ALLOCATOR(size)
| ^~~~~~~~~~~~~~
/opt/remi/php84/root/usr/include/php/Zend/zend_alloc.h:151:65: note: in expansion of macro ‘_emalloc’
151 | #define emalloc(size) _emalloc((size) ZEND_FILE_LINE_CC ZEND_FILE_LINE_EMPTY_CC)
| ^~~~~~~~
/var/tmp/openswoole/ext-src/swoole_client_coro.cc:740:20: note: in expansion of macro ‘emalloc’
740 | buf = (char *) emalloc(buf_len + 1);
| ^~~~~~~
/bin/sh /var/tmp/pear-build-rootacrou7hijil2ciLnPGA/openswoole-22.1.2/libtool --tag=CXX --mode=compile g++ -I. -I/var/tmp/openswoole -I/opt/remi/php84/root/usr/include/php -I/opt/remi/php84/root/usr/include/php/main -I/opt/remi/php84/root/usr/include/php/TSRM -I/opt/remi/php84/root/usr/include/php/Zend -I/opt/remi/php84/root/usr/include/php/ext -I/opt/remi/php84/root/usr/include/php/ext/date/lib -I/var/tmp/openswoole -I/var/tmp/openswoole/include -I/var/tmp/openswoole/ext-src -I/var/tmp/openswoole/thirdparty/hiredis -DHAVE_CONFIG_H -g -O2 -Wall -Wno-unused-function -Wno-deprecated -Wno-deprecated-declarations -std=c++11 -DENABLE_PHP_SWOOLE -DZEND_COMPILE_DL_EXT=1 -c /var/tmp/openswoole/ext-src/swoole_coroutine.cc -o ext-src/swoole_coroutine.lo -MMD -MF ext-src/swoole_coroutine.dep -MT ext-src/swoole_coroutine.lo
libtool: compile: g++ -I. -I/var/tmp/openswoole -I/opt/remi/php84/root/usr/include/php -I/opt/remi/php84/root/usr/include/php/main -I/opt/remi/php84/root/usr/include/php/TSRM -I/opt/remi/php84/root/usr/include/php/Zend -I/opt/remi/php84/root/usr/include/php/ext -I/opt/remi/php84/root/usr/include/php/ext/date/lib -I/var/tmp/openswoole -I/var/tmp/openswoole/include -I/var/tmp/openswoole/ext-src -I/var/tmp/openswoole/thirdparty/hiredis -DHAVE_CONFIG_H -g -O2 -Wall -Wno-unused-function -Wno-deprecated -Wno-deprecated-declarations -std=c++11 -DENABLE_PHP_SWOOLE -DZEND_COMPILE_DL_EXT=1 -c /var/tmp/openswoole/ext-src/swoole_coroutine.cc -MMD -MF ext-src/swoole_coroutine.dep -MT ext-src/swoole_coroutine.lo -fPIC -DPIC -o ext-src/.libs/swoole_coroutine.o
/var/tmp/openswoole/ext-src/swoole_coroutine.cc: In function ‘void php_swoole_coroutine_rinit()’:
/var/tmp/openswoole/ext-src/swoole_coroutine.cc:922:57: error: ‘ZEND_EXIT’ was not declared in this scope; did you mean ‘ZEND_CAST’?
922 | ori_exit_handler = zend_get_user_opcode_handler(ZEND_EXIT);
| ^~~~~~~~~
| ZEND_CAST
/var/tmp/openswoole/ext-src/swoole_coroutine.cc: At global scope:
/var/tmp/openswoole/ext-src/swoole_coroutine.cc:72:26: warning: ‘zend_vm_interrupt’ defined but not used [-Wunused-variable]
72 | static zend_atomic_bool *zend_vm_interrupt = nullptr;
| ^~~~~~~~~~~~~~~~~
make: *** [Makefile:233: ext-src/swoole_coroutine.lo] Error 1
ERROR: `make' failed

  1. What version of Swoole are you using (show your php --ri swoole)?

php --ri swoole
Extension 'swoole' not present.

  1. What is your machine environment used (show your uname -a & php -v & gcc -v) ?

Linux 5.14.0-427.42.1.el9_4.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Nov 1 14:58:02 EDT 2024 x86_64 x86_64 x86_64 GNU/Linux
php -v
PHP 8.4.2 (cli) (built: Dec 17 2024 15:31:31) (NTS gcc x86_64)
Copyright (c) The PHP Group
Built by Remi's RPM repository https://rpms.remirepo.net/ #StandWithUkraine
Zend Engine v4.4.2, Copyright (c) Zend Technologies

gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/11/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-redhat-linux
Configured with: ../configure --enable-bootstrap --enable-host-pie --enable-host-bind-now --enable-languages=c,c++,fortran,lto --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugs.almalinux.org/ --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-gcc-major-version-only --enable-plugin --enable-initfini-array --without-isl --enable-multilib --with-linker-hash-style=gnu --enable-offload-targets=nvptx-none --without-cuda-driver --enable-gnu-indirect-function --enable-cet --with-tune=generic --with-arch_64=x86-64-v2 --with-arch_32=x86-64 --build=x86_64-redhat-linux --with-build-config=bootstrap-lto --enable-link-serialization=1
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 11.5.0 20240719 (Red Hat 11.5.0-2) (GCC)

@matyhtf
Copy link
Member

matyhtf commented Dec 26, 2024

Openswoole is a branch of Swoole; it's a different extension that appears to be no longer under active development and maintenance. It has not been adapted for PHP 8.4. You can use the Swoole extension instead.

@matyhtf matyhtf closed this as completed Dec 26, 2024
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