PHP 8 and imagick fails

Beherit

Verified User
Joined
Dec 2, 2019
Messages
35
I'm trying to test PHP 8 but every time the compilation fails on compiling the imagick. With PHP 7.4 imagick works fine. Is there any workaround for this issue or I must wait for new imagick version with PHP 8 support?

Code:
creating libtool
appending configuration tag "CXX" to libtool
configure: patching config.h.in
configure: creating ./config.status
config.status: creating config.h
Trying to make imagick-3.4.4 PHP extension...
/bin/sh /usr/local/directadmin/custombuild/imagick-3.4.4/libtool --mode=compile cc -I. -I/usr/local/directadmin/custombuild/imagick-3.4.4 -I/usr/local/directadmin/custombuild/imagick-3.4.4/include -I/usr/local/directadmin/custombuild/imagick-3.4.4/main -I/usr/local/directadmin/custombuild/imagick-3.4.4 -I/usr/local/php80/include/php -I/usr/local/php80/include/php/main -I/usr/local/php80/include/php/TSRM -I/usr/local/php80/include/php/Zend -I/usr/local/php80/include/php/ext -I/usr/local/php80/include/php/ext/date/lib -I/usr/local/include/ImageMagick-7 -DHAVE_CONFIG_H -g -O2 -fopenmp -DMAGICKCORE_HDRI_ENABLE=1 -DMAGICKCORE_QUANTUM_DEPTH=16 -fopenmp -DMAGICKCORE_HDRI_ENABLE=1 -DMAGICKCORE_QUANTUM_DEPTH=16 -I/usr/local/include/ImageMagick-7 -c /usr/local/directadmin/custombuild/imagick-3.4.4/imagick_file.c -o imagick_file.lo
mkdir .libs
cc -I. -I/usr/local/directadmin/custombuild/imagick-3.4.4 -I/usr/local/directadmin/custombuild/imagick-3.4.4/include -I/usr/local/directadmin/custombuild/imagick-3.4.4/main -I/usr/local/directadmin/custombuild/imagick-3.4.4 -I/usr/local/php80/include/php -I/usr/local/php80/include/php/main -I/usr/local/php80/include/php/TSRM -I/usr/local/php80/include/php/Zend -I/usr/local/php80/include/php/ext -I/usr/local/php80/include/php/ext/date/lib -I/usr/local/include/ImageMagick-7 -DHAVE_CONFIG_H -g -O2 -fopenmp -DMAGICKCORE_HDRI_ENABLE=1 -DMAGICKCORE_QUANTUM_DEPTH=16 -fopenmp -DMAGICKCORE_HDRI_ENABLE=1 -DMAGICKCORE_QUANTUM_DEPTH=16 -I/usr/local/include/ImageMagick-7 -c /usr/local/directadmin/custombuild/imagick-3.4.4/imagick_file.c -fPIC -DPIC -o .libs/imagick_file.o
In file included from /usr/local/directadmin/custombuild/imagick-3.4.4/imagick_file.c:22:
/usr/local/directadmin/custombuild/imagick-3.4.4/php_imagick_file.h:61:108: error: expected ';', ',' or ')' before 'TSRMLS_DC'
zend_bool php_imagick_file_init(struct php_imagick_file_t *file, const char *filename, size_t filename_len TSRMLS_DC);
^~~~~~~~~
/usr/local/directadmin/custombuild/imagick-3.4.4/php_imagick_file.h:65:54: error: expected ';', ',' or ')' before 'TSRMLS_DC'
int php_imagick_safe_mode_check(const char *filename TSRMLS_DC);
^~~~~~~~~
In file included from /usr/local/directadmin/custombuild/imagick-3.4.4/imagick_file.c:22:
/usr/local/directadmin/custombuild/imagick-3.4.4/php_imagick_file.h:68:134: error: expected ';', ',' or ')' before 'TSRMLS_DC'
php_imagick_rw_result_t php_imagick_read_file(php_imagick_object *intern, struct php_imagick_file_t *file, ImagickOperationType type TSRMLS_DC);
^~~~~~~~~
/usr/local/directadmin/custombuild/imagick-3.4.4/php_imagick_file.h:71:153: error: expected ';', ',' or ')' before 'TSRMLS_DC'
php_imagick_rw_result_t php_imagick_write_file(php_imagick_object *intern, struct php_imagick_file_t *file, ImagickOperationType type, zend_bool adjoin TSRMLS_DC);
^~~~~~~~~
/usr/local/directadmin/custombuild/imagick-3.4.4/php_imagick_file.h:74:112: error: expected ';', ',' or ')' before 'TSRMLS_DC'
zend_bool php_imagick_stream_handler(php_imagick_object *intern, php_stream *stream, ImagickOperationType type TSRMLS_DC);
^~~~~~~~~
/usr/local/directadmin/custombuild/imagick-3.4.4/imagick_file.c:81:51: error: expected ';', ',' or ')' before 'TSRMLS_DC'
zend_bool php_imagick_is_url(const char *filename TSRMLS_DC)
^~~~~~~~~
/usr/local/directadmin/custombuild/imagick-3.4.4/imagick_file.c:91:108: error: expected ';', ',' or ')' before 'TSRMLS_DC'
zend_bool php_imagick_file_init(struct php_imagick_file_t *file, const char *filename, size_t filename_len TSRMLS_DC)
^~~~~~~~~
/usr/local/directadmin/custombuild/imagick-3.4.4/imagick_file.c:160:133: error: expected ';', ',' or ')' before 'TSRMLS_DC'
int php_imagick_read_image_using_imagemagick(php_imagick_object *intern, struct php_imagick_file_t *file, ImagickOperationType type TSRMLS_DC)
^~~~~~~~~
/usr/local/directadmin/custombuild/imagick-3.4.4/imagick_file.c:201:133: error: expected ';', ',' or ')' before 'TSRMLS_DC'
int php_imagick_read_image_using_php_streams(php_imagick_object *intern, struct php_imagick_file_t *file, ImagickOperationType type TSRMLS_DC)
^~~~~~~~~
/usr/local/directadmin/custombuild/imagick-3.4.4/imagick_file.c:255:54: error: expected ';', ',' or ')' before 'TSRMLS_DC'
int php_imagick_safe_mode_check(const char *filename TSRMLS_DC)
^~~~~~~~~
/usr/local/directadmin/custombuild/imagick-3.4.4/imagick_file.c:269:134: error: expected ';', ',' or ')' before 'TSRMLS_DC'
php_imagick_rw_result_t php_imagick_read_file(php_imagick_object *intern, struct php_imagick_file_t *file, ImagickOperationType type TSRMLS_DC)
^~~~~~~~~
/usr/local/directadmin/custombuild/imagick-3.4.4/imagick_file.c:288:153: error: expected ';', ',' or ')' before 'TSRMLS_DC'
php_imagick_rw_result_t php_imagick_write_file(php_imagick_object *intern, struct php_imagick_file_t *file, ImagickOperationType type, zend_bool adjoin TSRMLS_DC)
^~~~~~~~~
/usr/local/directadmin/custombuild/imagick-3.4.4/imagick_file.c:313:112: error: expected ';', ',' or ')' before 'TSRMLS_DC'
zend_bool php_imagick_stream_handler(php_imagick_object *intern, php_stream *stream, ImagickOperationType type TSRMLS_DC)
^~~~~~~~~
make: *** [Makefile:209: imagick_file.lo] Error 1
 
PHP 8 Release Candidate 3, planned for Oct 29 2020, so it's not stable still and there can be, a lot errors like with Imagick.
Usually I move to new PHP version at least at 5 stable release, like 8.5 in Your case. So you can post received error to Imagick/php developers forums.
 
Someone able to install php8?
I get the following error:
  • onfiguring php-8.0.0...
  • Patching php-fpm to not fail on startup if User quota maxed out on socket chown
  • patching file sapi/fpm/fpm/fpm_unix.c
  • Hunk #1 succeeded at 242 (offset 7 lines).
  • Done Configuration.
  • Can't open Makefile: No such file or directory.
  • Trying to make php...
  • make: *** No targets specified and no makefile found. Stop.
 
I have just installed PHP 8 on my test system, it looks like imagick has been installed.

Code:
There is no ionCube loader available for PHP 8.0.
imagick 3.4.4-patched-php8 PHP extension has been installed successfully.
 
I am still not able to install PHP 8.
  • 2021-06-26 09:43:29 (31.3 MB/s) - '/usr/local/directadmin/custombuild/php-8.0.0.tar.gz' saved [17132260/17132260]

  • Found /usr/local/directadmin/custombuild/php-8.0.0.tar.gz
  • Extracting ...
  • Done.
  • Configuring php-8.0.0...
  • Patching php-fpm for per-user process grouping
  • patching file sapi/fpm/fpm/fpm_children.c
  • Patching php-fpm to not fail on startup if User quota maxed out on socket chown
  • patching file sapi/fpm/fpm/fpm_unix.c
  • Hunk #1 succeeded at 242 (offset 7 lines).
  • Done Configuration.
  • Can't open Makefile: No such file or directory.
  • Trying to make php...
  • make: *** No targets specified and no makefile found. Stop.

  • Done!
 
Back
Top