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

make fails on Ubuntu 20, PHP 8.2 #34

Closed
sneakyimp opened this issue Jan 4, 2023 · 5 comments
Closed

make fails on Ubuntu 20, PHP 8.2 #34

sneakyimp opened this issue Jan 4, 2023 · 5 comments

Comments

@sneakyimp
Copy link

I have carefully followed the instructions for manually compiling the Tensor extension. make failed with output ending in the following errors:

/home/sneakyimp/biz/machine-learning/tensor/Tensor/ext/kernel/main.c: In function ‘zephir_function_exists’:
/home/sneakyimp/biz/machine-learning/tensor/Tensor/ext/kernel/main.c:285:101: warning: comparison between pointer and integer
  285 |  if (zend_hash_str_exists(CG(function_table), Z_STRVAL_P(function_name), Z_STRLEN_P(function_name)) != NULL) {
      |                                                                                                     ^~
/home/sneakyimp/biz/machine-learning/tensor/Tensor/ext/kernel/main.c: In function ‘zephir_function_exists_ex’:
/home/sneakyimp/biz/machine-learning/tensor/Tensor/ext/kernel/main.c:301:76: warning: comparison between pointer and integer
  301 |  if (zend_hash_str_exists(CG(function_table), function_name, function_len) != NULL) {
      |                                                                            ^~
/home/sneakyimp/biz/machine-learning/tensor/Tensor/ext/kernel/main.c: In function ‘zephir_get_arg’:
/home/sneakyimp/biz/machine-learning/tensor/Tensor/ext/kernel/main.c:571:9: error: too many arguments to function ‘zend_forbid_dynamic_call’
  571 |     if (zend_forbid_dynamic_call("func_get_arg()") == FAILURE) {
      |         ^~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/php/20220829/main/php.h:35,
                 from /home/sneakyimp/biz/machine-learning/tensor/Tensor/ext/kernel/main.c:16:
/usr/include/php/20220829/Zend/zend_API.h:782:39: note: declared here
  782 | static zend_always_inline zend_result zend_forbid_dynamic_call(void)
      |                                       ^~~~~~~~~~~~~~~~~~~~~~~~
make: *** [Makefile:213: kernel/main.lo] Error 1

I have also attempted to build the commit described by myfluxi in issue #33 and the make/compile succeeds but the resulting shared library has very strange behavior, segfaulting when certain comments are in place, and producing incorrect dimensions for a matrix multiplication operation.

@erfanmola
Copy link

any support for php 8.2 ?

@sneakyimp
Copy link
Author

any support for php 8.2 ?

It doesn't seem so. I've had no responses at all to my posts here in weeks.

@andrewdalpino
Copy link
Member

Sorry fellas I haven't had alot of time lately. I'll take a look into this as soon as I can.

@andrewdalpino
Copy link
Member

It looks as though Zephir does not support PHP 8.2 yet

https://github.com/zephir-lang/zephir/releases/tag/0.16.3

Having that said, if you have a fix @sneakyimp can you submit a PR?

Otherwise, you could try the latest code on master, I recompiled the extension with the latest (0.16.3) version of Zephir. Maybe it'll work. If not, we can wait until Zephir offers PHP 8.2 support.

@andrewdalpino
Copy link
Member

Ok this should be fixed in version 3.0.3 on PECL and on the latest master branch

https://pecl.php.net/package/Tensor/3.0.3

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

3 participants