[RHEL10] imagick compilation fails

Here are some helpful considerations when filing a bug:

  • What version of apnscp are you running? v3.2.48
  • Which version of RHEL or CentOS are you using? Rocky 10
  • Can you reproduce this bug reliably? Executing the installer will fail at the step showed below.
TASK [php/install-extensions : Build and install imagick library.] *************
2025-08-21 11:29:29,336 p=416733 u=root n=ansible | fatal: [localhost]: FAILED! => {"changed": true, "cmd": ["/usr/local/apnscp/resources/playbooks/roles/php/install-extensions/files/installPecl.sh", "https://pecl.php.net/get/imagick-3.7.0.tgz", ""], "delta": "0:00:09.954927", "end": "2025-08-21 11:29:29.321075", "msg": "non-zero return code", "rc": 2, "start": "2025-08-21 11:29:19.366148", "stderr": "  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current\n                                 Dload  Upload   Total   Spent    Left  Speed\n\r  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0\r100  351k  100  351k    0     0  2309k      0 --:--:-- --:--:-- --:--:-- 2313k\nconfigure: WARNING: you should use --build, --host, --target\nshtool:echo:Warning: unable to determine terminal sequence for bold mode\nshtool:echo:Warning: unable to determine terminal sequence for bold mode\n/usr/local/apnscp/storage/tmp/extension.PVhNkyF/imagick-3.7.0/imagick.c: In function ‘php_imagick_read_property’:\n/usr/local/apnscp/storage/tmp/extension.PVhNkyF/imagick-3.7.0/imagick.c:606:49: error: implicit declaration of function ‘php_strtolower’; did you mean ‘php_strtok_r’? [-Wimplicit-function-declaration]\n  606 |                                                 php_strtolower(Z_STRVAL_P(retval), Z_STRLEN_P(retval));\n      |                                                 ^~~~~~~~~~~~~~\n      |                                                 php_strtok_r\nmake: *** [Makefile:226: imagick.lo] Error 1\nmake: *** Waiting for unfinished jobs....", "stderr_lines": ["  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current", "                                 Dload  Upload   Total   Spent    Left  Speed", "", "  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0", "100  351k  100  351k    0     0  2309k      0 --:--:-- --:--:-- --:--:-- 2313k", "configure: WARNING: you should use --build, --host, --target", "shtool:echo:Warning: unable to determine terminal sequence for bold mode", "shtool:echo:Warning: unable to determine terminal sequence for bold mode", "/usr/local/apnscp/storage/tmp/extension.PVhNkyF/imagick-3.7.0/imagick.c: In function ‘php_imagick_read_property’:", "/usr/local/apnscp/storage/tmp/extension.PVhNkyF/imagick-3.7.0/imagick.c:606:49: error: implicit declaration of function ‘php_strtolower’; did you mean ‘php_strtok_r’? [-Wimplicit-function-declaration]", "  606 |                                                 php_strtolower(Z_STRVAL_P(retval), Z_STRLEN_P(retval));", "      |                                                 ^~~~~~~~~~~~~~", "      |                                                 php_strtok_r", "make: *** [Makefile:226: imagick.lo] Error 1", "make: *** Waiting for unfinished jobs...."], "stdout": "/usr/local/apnscp/storage/tmp/extension.PVhNkyF /usr/local/apnscp/resources/playbooks\n/usr/local/apnscp/storage/tmp/extension.PVhNkyF/imagick-3.7.0 /usr/local/apnscp/storage/tmp/extension.PVhNkyF /usr/local/apnscp/resources/playbooks\nConfiguring for:\nPHP Version:             8.4\nPHP Api Version:         20240924

Thanks for the bug report, fixed. It’s caused by a mixture of ImageMagick 7 available on RHEL10 + PHP 8.4 resolved with imagick 3.8.0.

1 Like