PHPX build fails with PHP 8.5.9 Docker image; official TypePHP image request
When using TypePHP v0.6.6 / PHPX v2.6.8 with the official
php:8.5-cli Docker image (PHP 8.5.9), PHPX fails to compile:
In file included from /usr/local/include/php/Zend/zend.h:30,
from /usr/local/include/php/main/php.h:31,
from /app/vendor/swoole/phpx/include/std/misc.h:13,
from /app/vendor/swoole/phpx/src/std/misc.cc:10:
/usr/local/include/php/ext/hash/php_hash.h: In function 'void* php_hash_alloc_context(const php_hash_ops*)':
/usr/local/include/php/Zend/zend_alloc.h:158:65: error: invalid conversion from 'void*' to 'char*' [-fpermissive]
158 | #define ecalloc(nmemb, size) _ecalloc((nmemb), (size) ZEND_FILE_LINE_CC ZEND_FILE_LINE_EMPTY_CC)
| ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| |
| void*
/usr/local/include/php/ext/hash/php_hash.h:169:30: note: in expansion of macro 'ecalloc'
169 | char *base = ecalloc(1, ops->context_size + align);
| ^~~~~~~
[ 86%] Building CXX object CMakeFiles/phpx.dir/src/typephp/typephp_attribute.cc.o
[ 88%] Building CXX object CMakeFiles/phpx.dir/src/typephp/typephp_fiber_generator.cc.o
[ 90%] Building CXX object CMakeFiles/phpx.dir/src/typephp/typephp_property.cc.o
[ 92%] Building CXX object CMakeFiles/phpx.dir/src/func/core.cc.o
gmake[3]: *** [CMakeFiles/phpx.dir/build.make:387: CMakeFiles/phpx.dir/src/std/misc.cc.o] Error 1
gmake[3]: *** Waiting for unfinished jobs....
gmake[2]: *** [CMakeFiles/Makefile2:161: CMakeFiles/phpx.dir/all] Error 2
gmake[1]: *** [CMakeFiles/Makefile2:168: CMakeFiles/phpx.dir/rule] Error 2
gmake: *** [Makefile:195: phpx] Error 2
Fatal error: Unable to build libphpx.so: Command failed: cmake --build /app/vendor/swoole/phpx/build --parallel 8 --target phpx
#0 /app/vendor/swoole/typephp/src/Diagnostics/CompilerDiagnosticTrait.php(22): TypePhp\Diagnostics\CliDiagnosticReporter->fatal('Unable to build...')
#1 /app/vendor/swoole/typephp/src/Build/SourcePipelineTrait.php(99): TypePhp\CompilerBase->error('Unable to build...')
#2 /app/vendor/swoole/typephp/src/compiler.php(61): TypePhp\Translator->prepare('src/main.php')
#3 /app/vendor/swoole/typephp/bin/tpc.php(9): main(2, Array)
#4 /app/vendor/bin/tpc.php(119): include('/app/vendor/swo...')
Could you please confirm whether TypePHP/PHPX currently supports the official
PHP 8.5 Docker image?
Also, would the TypePHP project consider publishing an official Docker image
with a tested PHP version, Composer, PHPX, the required build dependencies,
and AMD64/ARM64 support? This would make TypePHP installation and builds much
more reproducible.
PHPX build fails with PHP 8.5.9 Docker image; official TypePHP image request
When using TypePHP v0.6.6 / PHPX v2.6.8 with the official
php:8.5-cliDocker image (PHP 8.5.9), PHPX fails to compile:Could you please confirm whether TypePHP/PHPX currently supports the official
PHP 8.5 Docker image?
Also, would the TypePHP project consider publishing an official Docker image
with a tested PHP version, Composer, PHPX, the required build dependencies,
and AMD64/ARM64 support? This would make TypePHP installation and builds much
more reproducible.