You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have attempted to run the sample PHP script in your README file and it encounters a fatal error:
PHP Fatal error: Uncaught FFI\Exception: Failed loading scope 'blas' in /Users/sneakyimp/np/vendor/ghostjat/np/src/core/blas.php:28
Stack trace:
#0 /Users/sneakyimp/np/vendor/ghostjat/np/src/core/blas.php(28): FFI::scope('blas') #1 /Users/sneakyimp/np/vendor/ghostjat/np/src/core/blas.php(73): Np\core\blas::init() #2 /Users/sneakyimp/np/vendor/ghostjat/np/src/linAlgb/linAlg.php(45): Np\core\blas::gemm(Object(Np\matrix), Object(Np\matrix), Object(Np\matrix)) #3 /Users/sneakyimp/np/vendor/ghostjat/np/src/linAlgb/linAlg.php(30): Np\matrix->dotMatrix(Object(Np\matrix)) #4 /Users/sneakyimp/np/foo.php(8): Np\matrix->dot(Object(Np\matrix)) #5 {main}
thrown in /Users/sneakyimp/np/vendor/ghostjat/np/src/core/blas.php on line 28
Fatal error: Uncaught FFI\Exception: Failed loading scope 'blas' in /Users/sneakyimp/np/vendor/ghostjat/np/src/core/blas.php:28
Stack trace:
#0 /Users/sneakyimp/np/vendor/ghostjat/np/src/core/blas.php(28): FFI::scope('blas') #1 /Users/sneakyimp/np/vendor/ghostjat/np/src/core/blas.php(73): Np\core\blas::init() #2 /Users/sneakyimp/np/vendor/ghostjat/np/src/linAlgb/linAlg.php(45): Np\core\blas::gemm(Object(Np\matrix), Object(Np\matrix), Object(Np\matrix)) #3 /Users/sneakyimp/np/vendor/ghostjat/np/src/linAlgb/linAlg.php(30): Np\matrix->dotMatrix(Object(Np\matrix)) #4 /Users/sneakyimp/np/foo.php(8): Np\matrix->dot(Object(Np\matrix)) #5 {main}
thrown in /Users/sneakyimp/np/vendor/ghostjat/np/src/core/blas.php on line 28
I have the FFI extension loaded in PHP. The FFI documentation is sorely incomplete so I'm not at all sure what this scope() call is supposed to do. The docs mention a #define statement, which you appear to have in blas.h:
#defineFFI_SCOPE "blas"
EDIT: I'm running this script in PHP 8.1 on MacOs. I have the FFI extension loaded, and brew shows openblas and lapack are installed.
I have also confirmed the error with PHP 8.1 on Ubuntu 20.04 LTS.
The text was updated successfully, but these errors were encountered:
Hi, @sneakyimp
you have to update php.ini
with following settings zend_extension=opcache.so opcache.enable_cli = 1 ffi.enable=preload opcache.preload=preload.php
I have attempted to run the sample PHP script in your README file and it encounters a fatal error:
I have the FFI extension loaded in PHP. The FFI documentation is sorely incomplete so I'm not at all sure what this
scope()
call is supposed to do. The docs mention a#define
statement, which you appear to have in blas.h:EDIT: I'm running this script in PHP 8.1 on MacOs. I have the FFI extension loaded, and brew shows openblas and lapack are installed.
I have also confirmed the error with PHP 8.1 on Ubuntu 20.04 LTS.
The text was updated successfully, but these errors were encountered: