you can fix compile error by this solution:
download installer script from this url:
https://node.aapanel.com/install/3/imagemagick.sh
chmod +x imagemagick.sh
edit sh file nano imagemagick.sh and edit line 113
change this this:
./configure --with-php-config=/www/server/php/$version/bin/php-config ${ImageMagick_DIR}
to this:
./configure CPPFLAGS='-Dphp_strtolower=zend_str_tolower' --with-php-config=/www/server/php/$version/bin/php-config ${ImageMagick_DIR}
if you want you can install version 3.7.0 by doing this:

then run this for start installing
./imagemagick.sh install 84
