I’m trying to install PHP 8 with the extension parallel
, with the only purpose of running an implementation in PHP for the One Billion Rows Challenge. I’m using Ubuntu 22.04 on WSL2 with Windows 11 as host.
However, I’ve followed this, this and this, but none of them worked. The last one was using PHP 7, so I adjusted everything, including the change of --enable-maintainer-zts
to --enable-zts
in the ./configure
command.
Here is the exact script I used for the last one. Everything worked well, 0 exit code.
However, when I run the following (note the script links the new PHP to /usr/bin/phpz
), as the README.md
instructs,
phpz -d extension=parallel calculateAverage.php 4
I get this error:
Fatal error: Uncaught Error: Class "parallelRuntime" not found in /home/helitonmrf/projects/1brc/php_realFlowControl/calculateAverage.php:102
Stack trace:
#0 {main}
thrown in /home/helitonmrf/projects/1brc/php_realFlowControl/calculateAverage.php on line 102
I’ve also installed ext-parallel
, but I still get this:
PHP Warning: PHP Startup: Unable to load dynamic library 'parallel' (tried: /etc/php8z/lib/php/extensions/no-debug-zts-20230831/parallel (/etc/php8z/lib/php/extensions/no-debug-zts-20230831/parallel: cannot open shared object file: No such file or directory), /etc/php8z/lib/php/extensions/no-debug-zts-20230831/parallel.so (/etc/php8z/lib/php/extensions/no-debug-zts-20230831/parallel.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
Warning: PHP Startup: Unable to load dynamic library 'parallel' (tried: /etc/php8z/lib/php/extensions/no-debug-zts-20230831/parallel (/etc/php8z/lib/php/extensions/no-debug-zts-20230831/parallel: cannot open shared object file: No such file or directory), /etc/php8z/lib/php/extensions/no-debug-zts-20230831/parallel.so (/etc/php8z/lib/php/extensions/no-debug-zts-20230831/parallel.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
What can I do?