-
-
Notifications
You must be signed in to change notification settings - Fork 150
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Not able to install Imagick in PHP 8 #331
Comments
Should work now on master. |
I checked the current master, the issue above was fixed, thanks! However, there’s another one now:
|
The tests are flakier than I would like, but I'm reasonably sure the code is building against php8 aka nightly.
Very strong suspicion that you're compiling against PHP 7.x, and haven't done a clean phpize/configure since compiling against PHP 8. |
You’re right, it works. I’ve pulled a fresh php8-rc image and can confirm Imagick’s master branch builds fine now. \o/ |
I think this can be closed out? Is there a plan to release a new version with the PHP 8 support included? |
I'll close it as there is another issue, but there is still stuff to do. |
I tried installing imagick with pecl today on php8, gave me an error,
I used brew to unlink php8 and linked php7.4 which works, so that's not a problem for me, but would just like to put this out there^ MacOS Catalina, 10.15.7 |
Same issue trying to install imagick with pecl on php8: one bracket causing 20 errors with the script failing. No problem with php7.4. This is on Big Sur running on a Parallels VM. |
@abhisareen2002 @BowFarmer PECL version is still 3.4.4 and not working with PHP 8. You have to wait for a new release. However, as you can read above: current master branch is working fine. |
Thank you. |
Is there a timeline on php8 support? Is there currently a blocker? |
Same issue above, are there an ETA for the fix? |
Save comment as above - when will there be a release that supports PHP 8? |
Facing similar issue, using |
🐳 Docker: In case you’re still waiting for a PECL release to feed your Dockerfile, # install imagick
# use github version for now until release from https://pecl.php.net/get/imagick is ready for PHP 8
mkdir -p /usr/src/php/ext/imagick; \
curl -fsSL https://github.com/Imagick/imagick/archive/06116aa24b76edaf6b1693198f79e6c295eda8a9.tar.gz | tar xvz -C "/usr/src/php/ext/imagick" --strip 1; \
docker-php-ext-install imagick; \ Source: https://github.com/FriendsOfREDAXO/docker-redaxo/blob/master/php8.0/apache/Dockerfile |
With this config, I get several warnings, but otherwise the image builds successfully. /usr/src/php/ext/imagick/imagick_class.c: In function 'zim_imagick_getimagematte': /usr/src/php/ext/imagick/imagick_class.c:299:2: warning: 'MagickGetImageMatte' is deprecated [-Wdeprecated-declarations] matte = MagickGetImageMatte(intern->magick_wand); ^~~~~ In file included from /usr/include/ImageMagick-6/wand/MagickWand.h:82, from /usr/src/php/ext/imagick/php_imagick_defs.h:29, from /usr/src/php/ext/imagick/imagick_class.c:22: /usr/include/ImageMagick-6/wand/deprecate.h:85:3: note: declared here MagickGetImageMatte(MagickWand *) magick_attribute((deprecated)), ^~~~~~~~~~~~~~~~~~~ /usr/src/php/ext/imagick/imagick_class.c: In function 'zim_imagick_paintfloodfillimage': /usr/src/php/ext/imagick/imagick_class.c:1284:3: warning: 'MagickPaintFloodfillImage' is deprecated [-Wdeprecated-declarations] status = MagickPaintFloodfillImage(intern->magick_wand, channel, fill_wand, fuzz, NULL, x, y); ^~~~~~ In file included from /usr/include/ImageMagick-6/wand/MagickWand.h:82, from /usr/src/php/ext/imagick/php_imagick_defs.h:29, from /usr/src/php/ext/imagick/imagick_class.c:22: /usr/include/ImageMagick-6/wand/deprecate.h:102:3: note: declared here MagickPaintFloodfillImage(MagickWand *,const ChannelType,const PixelWand *, ^~~~~~~~~~~~~~~~~~~~~~~~~ /usr/src/php/ext/imagick/imagick_class.c:1292:3: warning: 'MagickPaintFloodfillImage' is deprecated [-Wdeprecated-declarations] status = MagickPaintFloodfillImage(intern->magick_wand, channel, fill_wand, fuzz, border_wand, x, y); ^~~~~~ In file included from /usr/include/ImageMagick-6/wand/MagickWand.h:82, from /usr/src/php/ext/imagick/php_imagick_defs.h:29, from /usr/src/php/ext/imagick/imagick_class.c:22: /usr/include/ImageMagick-6/wand/deprecate.h:102:3: note: declared here MagickPaintFloodfillImage(MagickWand *,const ChannelType,const PixelWand *, ^~~~~~~~~~~~~~~~~~~~~~~~~ /usr/src/php/ext/imagick/imagick_class.c: In function 'zim_imagick_recolorimage': /usr/src/php/ext/imagick/imagick_class.c:1774:2: warning: 'MagickRecolorImage' is deprecated [-Wdeprecated-declarations] status = MagickRecolorImage(intern->magick_wand, order, array); ^~~~~~ In file included from /usr/include/ImageMagick-6/wand/MagickWand.h:82, from /usr/src/php/ext/imagick/php_imagick_defs.h:29, from /usr/src/php/ext/imagick/imagick_class.c:22: /usr/include/ImageMagick-6/wand/deprecate.h:116:3: note: declared here MagickRecolorImage(MagickWand *,const size_t,const double *) ^~~~~~~~~~~~~~~~~~ /usr/src/php/ext/imagick/imagick_class.c: In function 'zim_imagick_colorfloodfillimage': /usr/src/php/ext/imagick/imagick_class.c:4346:2: warning: 'MagickColorFloodfillImage' is deprecated [-Wdeprecated-declarations] status = MagickColorFloodfillImage(intern->magick_wand, fill_wand, fuzz, border_wand, x, y); ^~~~~~ In file included from /usr/include/ImageMagick-6/wand/MagickWand.h:82, from /usr/src/php/ext/imagick/php_imagick_defs.h:29, from /usr/src/php/ext/imagick/imagick_class.c:22: /usr/include/ImageMagick-6/wand/deprecate.h:78:3: note: declared here MagickColorFloodfillImage(MagickWand *,const PixelWand *,const double, ^~~~~~~~~~~~~~~~~~~~~~~~~ /usr/src/php/ext/imagick/imagick_class.c: In function 'zim_imagick_mapimage': /usr/src/php/ext/imagick/imagick_class.c:4774:2: warning: 'MagickMapImage' is deprecated [-Wdeprecated-declarations] status = MagickMapImage(intern->magick_wand, intern_map->magick_wand, dither); ^~~~~~ In file included from /usr/include/ImageMagick-6/wand/MagickWand.h:82, from /usr/src/php/ext/imagick/php_imagick_defs.h:29, from /usr/src/php/ext/imagick/imagick_class.c:22: /usr/include/ImageMagick-6/wand/deprecate.h:89:3: note: declared here MagickMapImage(MagickWand *,const MagickWand *,const MagickBooleanType) ^~~~~~~~~~~~~~ /usr/src/php/ext/imagick/imagick_class.c: In function 'zim_imagick_mattefloodfillimage': /usr/src/php/ext/imagick/imagick_class.c:4815:2: warning: 'MagickMatteFloodfillImage' is deprecated [-Wdeprecated-declarations] status = MagickMatteFloodfillImage(intern->magick_wand, alpha, fuzz, color_wand, x, y); ^~~~~~ In file included from /usr/include/ImageMagick-6/wand/MagickWand.h:82, from /usr/src/php/ext/imagick/php_imagick_defs.h:29, from /usr/src/php/ext/imagick/imagick_class.c:22: /usr/include/ImageMagick-6/wand/deprecate.h:91:3: note: declared here MagickMatteFloodfillImage(MagickWand *,const double,const double, ^~~~~~~~~~~~~~~~~~~~~~~~~ /usr/src/php/ext/imagick/imagick_class.c: In function 'zim_imagick_medianfilterimage': /usr/src/php/ext/imagick/imagick_class.c:4853:2: warning: 'MagickMedianFilterImage' is deprecated [-Wdeprecated-declarations] status = MagickMedianFilterImage(intern->magick_wand, radius); ^~~~~~ In file included from /usr/include/ImageMagick-6/wand/MagickWand.h:88, from /usr/src/php/ext/imagick/php_imagick_defs.h:29, from /usr/src/php/ext/imagick/imagick_class.c:22: /usr/include/ImageMagick-6/wand/magick-image.h:222:3: note: declared here MagickMedianFilterImage(MagickWand *,const double), ^~~~~~~~~~~~~~~~~~~~~~~ /usr/src/php/ext/imagick/imagick_class.c: In function 'zim_imagick_paintopaqueimage': /usr/src/php/ext/imagick/imagick_class.c:4935:2: warning: 'MagickPaintOpaqueImageChannel' is deprecated [-Wdeprecated-declarations] status = MagickPaintOpaqueImageChannel(intern->magick_wand, channel, target_wand, fill_wand, fuzz); ^~~~~~ In file included from /usr/include/ImageMagick-6/wand/MagickWand.h:82, from /usr/src/php/ext/imagick/php_imagick_defs.h:29, from /usr/src/php/ext/imagick/imagick_class.c:22: /usr/include/ImageMagick-6/wand/deprecate.h:107:3: note: declared here MagickPaintOpaqueImageChannel(MagickWand *,const ChannelType, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/src/php/ext/imagick/imagick_class.c: In function 'zim_imagick_painttransparentimage': /usr/src/php/ext/imagick/imagick_class.c:5018:2: warning: 'MagickPaintTransparentImage' is deprecated [-Wdeprecated-declarations] status = MagickPaintTransparentImage(intern->magick_wand, color_wand, alpha, fuzz); ^~~~~~ In file included from /usr/include/ImageMagick-6/wand/MagickWand.h:82, from /usr/src/php/ext/imagick/php_imagick_defs.h:29, from /usr/src/php/ext/imagick/imagick_class.c:22: /usr/include/ImageMagick-6/wand/deprecate.h:110:3: note: declared here MagickPaintTransparentImage(MagickWand *,const PixelWand *,const double, ^~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/src/php/ext/imagick/imagick_class.c: In function 'zim_imagick_reducenoiseimage': /usr/src/php/ext/imagick/imagick_class.c:5182:2: warning: 'MagickReduceNoiseImage' is deprecated [-Wdeprecated-declarations] status = MagickReduceNoiseImage(intern->magick_wand, radius); ^~~~~~ In file included from /usr/include/ImageMagick-6/wand/MagickWand.h:88, from /usr/src/php/ext/imagick/php_imagick_defs.h:29, from /usr/src/php/ext/imagick/imagick_class.c:22: /usr/include/ImageMagick-6/wand/magick-image.h:269:3: note: declared here MagickReduceNoiseImage(MagickWand *,const double), ^~~~~~~~~~~~~~~~~~~~~~ /usr/src/php/ext/imagick/imagick_class.c: In function 'zim_imagick_getimageattribute': /usr/src/php/ext/imagick/imagick_class.c:6512:2: warning: 'MagickGetImageAttribute' is deprecated [-Wdeprecated-declarations] attribute = MagickGetImageAttribute(intern->magick_wand, key); ^~~~~~~~~ In file included from /usr/include/ImageMagick-6/wand/MagickWand.h:82, from /usr/src/php/ext/imagick/php_imagick_defs.h:29, from /usr/src/php/ext/imagick/imagick_class.c:22: /usr/include/ImageMagick-6/wand/deprecate.h:62:4: note: declared here *MagickGetImageAttribute(MagickWand *,const char *) ^~~~~~~~~~~~~~~~~~~~~~~ /usr/src/php/ext/imagick/imagick_class.c: In function 'zim_imagick_getimagechannelextrema': /usr/src/php/ext/imagick/imagick_class.c:6729:2: warning: 'MagickGetImageChannelExtrema' is deprecated [-Wdeprecated-declarations] status = MagickGetImageChannelExtrema(intern->magick_wand, channel_type, &minima, &maxima); ^~~~~~ In file included from /usr/include/ImageMagick-6/wand/MagickWand.h:82, from /usr/src/php/ext/imagick/php_imagick_defs.h:29, from /usr/src/php/ext/imagick/imagick_class.c:22: /usr/include/ImageMagick-6/wand/deprecate.h:81:3: note: declared here MagickGetImageChannelExtrema(MagickWand *,const ChannelType,size_t *, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/src/php/ext/imagick/imagick_class.c: In function 'zim_imagick_getimageextrema': /usr/src/php/ext/imagick/imagick_class.c:7070:2: warning: 'MagickGetImageExtrema' is deprecated [-Wdeprecated-declarations] status = MagickGetImageExtrema(intern->magick_wand, &min, &max); ^~~~~~ In file included from /usr/include/ImageMagick-6/wand/MagickWand.h:82, from /usr/src/php/ext/imagick/php_imagick_defs.h:29, from /usr/src/php/ext/imagick/imagick_class.c:22: /usr/include/ImageMagick-6/wand/deprecate.h:83:3: note: declared here MagickGetImageExtrema(MagickWand *,size_t *,size_t *) ^~~~~~~~~~~~~~~~~~~~~ /usr/src/php/ext/imagick/imagick_class.c: In function 'zim_imagick_getimageindex': /usr/src/php/ext/imagick/imagick_class.c:8182:2: warning: 'MagickGetImageIndex' is deprecated [-Wdeprecated-declarations] status = MagickGetImageIndex(intern->magick_wand); ^~~~~~ In file included from /usr/include/ImageMagick-6/wand/MagickWand.h:82, from /usr/src/php/ext/imagick/php_imagick_defs.h:29, from /usr/src/php/ext/imagick/imagick_class.c:22: /usr/include/ImageMagick-6/wand/deprecate.h:68:3: note: declared here MagickGetImageIndex(MagickWand *) magick_attribute((deprecated)); ^~~~~~~~~~~~~~~~~~~ /usr/src/php/ext/imagick/imagick_class.c: In function 'zim_imagick_getimagesize': /usr/src/php/ext/imagick/imagick_class.c:8303:2: warning: 'MagickGetImageSize' is deprecated [-Wdeprecated-declarations] ZVAL_LONG(return_value, (long)MagickGetImageSize(intern->magick_wand)); ^~~~~~~~~ In file included from /usr/include/ImageMagick-6/wand/MagickWand.h:82, from /usr/src/php/ext/imagick/php_imagick_defs.h:29, from /usr/src/php/ext/imagick/imagick_class.c:22: /usr/include/ImageMagick-6/wand/deprecate.h:147:3: note: declared here MagickGetImageSize(MagickWand *) magick_attribute((deprecated)); ^~~~~~~~~~~~~~~~~~ /usr/src/php/ext/imagick/imagick_class.c: In function 'zim_imagick_setimageattribute': /usr/src/php/ext/imagick/imagick_class.c:8777:2: warning: 'MagickSetImageAttribute' is deprecated [-Wdeprecated-declarations] status = MagickSetImageAttribute(intern->magick_wand, key, attribute); ^~~~~~ In file included from /usr/include/ImageMagick-6/wand/MagickWand.h:82, from /usr/src/php/ext/imagick/php_imagick_defs.h:29, from /usr/src/php/ext/imagick/imagick_class.c:22: /usr/include/ImageMagick-6/wand/deprecate.h:118:3: note: declared here MagickSetImageAttribute(MagickWand *,const char *,const char *) ^~~~~~~~~~~~~~~~~~~~~~~ /usr/src/php/ext/imagick/imagick_class.c: In function 'zim_imagick_flattenimages': /usr/src/php/ext/imagick/imagick_class.c:9152:2: warning: 'MagickFlattenImages' is deprecated [-Wdeprecated-declarations] tmp_wand = MagickFlattenImages(intern->magick_wand); ^~~~~~~~ In file included from /usr/include/ImageMagick-6/wand/MagickWand.h:82, from /usr/src/php/ext/imagick/php_imagick_defs.h:29, from /usr/src/php/ext/imagick/imagick_class.c:22: /usr/include/ImageMagick-6/wand/deprecate.h:139:4: note: declared here *MagickFlattenImages(MagickWand *) magick_attribute((deprecated)), ^~~~~~~~~~~~~~~~~~~ /usr/src/php/ext/imagick/imagick_class.c: In function 'zim_imagick_averageimages': /usr/src/php/ext/imagick/imagick_class.c:10339:2: warning: 'MagickAverageImages' is deprecated [-Wdeprecated-declarations] tmp_wand = MagickAverageImages(intern->magick_wand); ^~~~~~~~ In file included from /usr/include/ImageMagick-6/wand/MagickWand.h:82, from /usr/src/php/ext/imagick/php_imagick_defs.h:29, from /usr/src/php/ext/imagick/imagick_class.c:22: /usr/include/ImageMagick-6/wand/deprecate.h:138:4: note: declared here *MagickAverageImages(MagickWand *) magick_attribute((deprecated)), ^~~~~~~~~~~~~~~~~~~ /usr/src/php/ext/imagick/imagick_class.c: In function 'zim_imagick_mosaicimages': /usr/src/php/ext/imagick/imagick_class.c:10842:2: warning: 'MagickMosaicImages' is deprecated [-Wdeprecated-declarations] tmp_wand = MagickMosaicImages(intern->magick_wand); ^~~~~~~~ In file included from /usr/include/ImageMagick-6/wand/MagickWand.h:82, from /usr/src/php/ext/imagick/php_imagick_defs.h:29, from /usr/src/php/ext/imagick/imagick_class.c:22: /usr/include/ImageMagick-6/wand/deprecate.h:142:4: note: declared here *MagickMosaicImages(MagickWand *) magick_attribute((deprecated)), ^~~~~~~~~~~~~~~~~~ /usr/src/php/ext/imagick/imagick_class.c: In function 'zim_imagick_radialblurimage': /usr/src/php/ext/imagick/imagick_class.c:10972:2: warning: 'MagickRadialBlurImageChannel' is deprecated [-Wdeprecated-declarations] status = MagickRadialBlurImageChannel(intern->magick_wand, channel, angle); ^~~~~~ In file included from /usr/include/ImageMagick-6/wand/MagickWand.h:82, from /usr/src/php/ext/imagick/php_imagick_defs.h:29, from /usr/src/php/ext/imagick/imagick_class.c:22: /usr/include/ImageMagick-6/wand/deprecate.h:114:3: note: declared here MagickRadialBlurImageChannel(MagickWand *,const ChannelType,const double) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
Update : I installed from the master branch and it worked properly . Writing the steps in simpler commands for easy understanding here :
|
I'm trying to install it in a php8-alpine dockerfile using those steps but i receive the following error:
The full instructions is:
Does anyone know how to fix this? |
@lebadapetru i just used this (on an alpine image) with 8.0.3
~ |
Hey @rufinus, thx for your help.
but none of the imagick commands work in the container ( magick, convert, identify, etc ), nor in my project ( though phpinfo lists imagick as installed module ). From phpinfo:
The number of supported formats is 0..., shouldn't jpg,png and a few others be supported by default? I've installed them in my container:
|
@lebadapetru what has the one todo with the other? the module lets you use imagemagick lib in php see https://www.php.net/manual/en/imagick.examples-1.php If you only want to use the bin files via |
@rufinus, yeah, i've got a bit confuse at some point and i really thought i had imagemagick installed when in fact i had only imagick and once i received |
I am trying to install Imagick in a PHP docker image based on PHP's official image Anyone any idea how to fix it? |
I'm having the same issue as well with that container. Above that image I'm installing |
Reverting #23. See Imagick/imagick#331
Working for me on the latest versionDockerfileFROM nextcloud:fpm-alpine
RUN apk --no-cache \
--update add \
--repository http://dl-cdn.alpinelinux.org/alpine/edge/testing \
php8-pdlib php8-pecl-imagick bzip2-dev php8-pecl-redis \
&& \
docker-php-ext-install bz2 \
&& \
echo 'extension=/usr/lib/php8/modules/pdlib.so' > /usr/local/etc/php/conf.d/pdlib.ini Test$ php occ face:background_job -t 60
1/10 - Executing task CheckRequirementsTask (Check all requirements)
2/10 - Executing task CheckCronTask (Check that service is started from either cron or from command)
3/10 - Executing task LockTask (Acquire lock so that only one background task can run)
4/10 - Executing task DisabledUserRemovalTask (Purge all the information of a user when disable the analysis.)
5/10 - Executing task StaleImagesRemovalTask (Crawl for stale images (either missing in filesystem or under .nomedia) and remove them from DB)
6/10 - Executing task CreateClustersTask (Create new persons or update existing persons)
Clusters already exist, estimated there is no need to recreate them
Skipping cluster creation, not enough data (yet) collected. For cluster creation, you need either one of the following:
* have 1000 faces already processed
* or you need to have 95% of you images processed
Use stats command to track progress
Skipping cluster creation, not enough data (yet) collected. For cluster creation, you need either one of the following:
* have 1000 faces already processed
* or you need to have 95% of you images processed
Use stats command to track progress
7/10 - Executing task AddMissingImagesTask (Crawl for missing images for each user and insert them in DB)
Skipping image scan for user userX that has disabled the analysis
Skipping image scan for user adminX that has disabled the analysis
8/10 - Executing task EnumerateImagesMissingFacesTask (Find all images which don't have faces generated for them)
9/10 - Executing task ImageProcessingTask (Process all images to extract faces)
NOTE: Starting face recognition. If you experience random crashes after this point, please look FAQ at https://github.com/matiasdelellis/facerecognition/wiki/FAQ
10/10 - Executing task UnlockTask (Release obtained lock) |
When trying to install Imagick (3.4.4) within the new PHP 8 (alpha) Docker images (all Apache, FPM and Alpine), it thows errors like:
Error log:
ref FriendsOfREDAXO/docker-redaxo#20
The text was updated successfully, but these errors were encountered: