I have supplied this information as issue #34 on the github project that appears to maintain the tensor extension. https://github.com/RubixML/Tensor/issues/34
I had commented on issue #33, where someone attempts to fix tensor for php 8.2 about 3 weeks ago, but there have been no responses: https://github.com/RubixML/Tensor/issues/33 It's surprisingly difficult to get fast matrix operations in PHP, given how fundamental they are to machine learning. On Sat, Dec 17, 2022 at 11:51 AM j adams <zardozro...@gmail.com> wrote: > Christopher: > > I have carefully followed the instructions under 'Manually compiling the > extension' in your first link[1]. When I attempted `make`, it failed, > ending with the following errors. I'll be filing an issue. > > /home/jaith/biz/machine-learning/tensor/Tensor/ext/kernel/main.c: In > function ‘zephir_function_exists’: > /home/jaith/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/jaith/biz/machine-learning/tensor/Tensor/ext/kernel/main.c: In > function ‘zephir_function_exists_ex’: > /home/jaith/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/jaith/biz/machine-learning/tensor/Tensor/ext/kernel/main.c: In > function ‘zephir_get_arg’: > /home/jaith/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/jaith/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 > > > [1] <https://github.com/RubixML/Tensor#optional-to-compile-extension> > > On Tue, Dec 6, 2022 at 6:29 AM Christoph M. Becker <cmbecke...@gmx.de> > wrote: > >> On 05.12.2022 at 20:05, j adams wrote: >> >> > Christoph, thanks for this tip. >> > >> > Unfortunately, pecl refuses to install Tensor either on my Macbook Pro >> or >> > on my Ubuntu 20 workstation. Both machines complain about being unable >> to >> > find cblas.h. I ran 'sudo pecl install tensor' which has quite a bit of >> > output. The problem seems to happen when it attempts to run make: >> > >> > running: make >> > /bin/bash /tmp/pear/temp/pear-build-root7MZ6PH/tensor-3.0.2/libtool >> > --mode=compile cc -I. -I/tmp/pear/temp/tensor/ext >> > -I/tmp/pear/temp/pear-build-root7MZ6PH/tensor-3.0.2/include >> > -I/tmp/pear/temp/pear-build-root7MZ6PH/tensor-3.0.2/main >> > -I/tmp/pear/temp/tensor/ext -I/usr/include/php/20210902 >> > -I/usr/include/php/20210902/main -I/usr/include/php/20210902/TSRM >> > -I/usr/include/php/20210902/Zend -I/usr/include/php/20210902/ext >> > -I/usr/include/php/20210902/ext/date/lib -DHAVE_CONFIG_H -g -O2 -O3 >> > -ffast-math -DZEND_COMPILE_DL_EXT=1 -c >> /tmp/pear/temp/tensor/ext/tensor.c >> > -o tensor.lo -MMD -MF tensor.dep -MT tensor.lo >> > libtool: compile: cc -I. -I/tmp/pear/temp/tensor/ext >> > -I/tmp/pear/temp/pear-build-root7MZ6PH/tensor-3.0.2/include >> > -I/tmp/pear/temp/pear-build-root7MZ6PH/tensor-3.0.2/main >> > -I/tmp/pear/temp/tensor/ext -I/usr/include/php/20210902 >> > -I/usr/include/php/20210902/main -I/usr/include/php/20210902/TSRM >> > -I/usr/include/php/20210902/Zend -I/usr/include/php/20210902/ext >> > -I/usr/include/php/20210902/ext/date/lib -DHAVE_CONFIG_H -g -O2 -O3 >> > -ffast-math -DZEND_COMPILE_DL_EXT=1 -c >> /tmp/pear/temp/tensor/ext/tensor.c >> > -MMD -MF tensor.dep -MT tensor.lo -fPIC -DPIC -o .libs/tensor.o >> > /tmp/pear/temp/tensor/ext/tensor.c:25:10: fatal error: cblas.h: No such >> > file or directory >> > 25 | #include "cblas.h" >> > | ^~~~~~~~~ >> > compilation terminated. >> > make: *** [Makefile:208: tensor.lo] Error 1 >> > ERROR: `make' failed >> >> I think you need to install the OpenBLAS dev package[1]. >> >> If in doubt, file an issue at the tensor bug tracker[2]. >> >> [1] <https://github.com/RubixML/Tensor#optional-to-compile-extension> >> [2] <https://github.com/RubixML/Tensor/issues> >> >> -- >> Christoph M. Becker >> >