imagick icon indicating copy to clipboard operation
imagick copied to clipboard

VC16 build for windows pecl

Open N6REJ opened this issue 3 years ago • 95 comments

I'm looking for an updated build for https://windows.php.net/downloads/pecl/deps/ImageMagick-7.1.0-18-vc15-x86.zip that uses vc16 & x64. Where can I find such a thing or create one?

N6REJ avatar Dec 14 '22 16:12 N6REJ

8.2.1 is around the corner and still no build :C I've been waiting for weeks... I found this: https://wiki.php.net/internals/windows/stepbystepbuild if you manage to build a DLL before one appears on pecl please share.

terax6669 avatar Dec 15 '22 13:12 terax6669

@terax6669 wrote:

:C

What does ":C" mean? I don't speak emoji.

Danack avatar Dec 15 '22 19:12 Danack

@N6REJ I've actually never been involved in building any extensions for Windows, and I'm not a Windows user.

Reading the front page of https://windows.php.net/ I can see:

Missing PECL DLLs 17 Oct 2022

You may have already noticed that DLLs for new PECL releases are no longer available for several months. This is because the Windows PECL build machine died, and the team is still working on the long term plan of building DLLs for PECL extensions with a new CI process. We're doing our best to finish that as soon as possible, and keep you up to date.

Which is certainly unfortunate.

I will try to find out what the situation is. For the record, I personally think getting the windows builds available again is something that would be appropriate for the PHP Foundation to be hiring someone to work on full time.

Danack avatar Dec 15 '22 19:12 Danack

it would be great if you could expedite it. We've got every version of imagemick since php 8.0 not working because of it.

N6REJ avatar Dec 15 '22 20:12 N6REJ

if you want, teach me how to do it and i'll make the imagick ones myself

N6REJ avatar Dec 28 '22 21:12 N6REJ

if you want, teach me how to do it and i'll make the imagick ones myself

I don't know, I've never compiled Imagick on windows.

If anyone wants to write some instructions, I could host them on phpimagick.com

btw, https://mlocati.github.io/articles/php-windows-imagick.html exists and may be of help to some people.

Danack avatar Dec 29 '22 14:12 Danack

Sigh, the latest version provided on that page, for 8.1, doesn't work for 8.2. Using PHP 8.2 and following those instructions for 8.1, I get the expected mismatch error:

[29-Dec-2022 17:35:22 UTC] PHP Warning: PHP Startup: imagick: Unable to initialize module Module compiled with module API=20210902 PHP compiled with module API=20220829 These options need to match in Unknown on line 0

tmb-github avatar Dec 29 '22 17:12 tmb-github

thanks @Danack for all your work. waiting patiently for that server to come up hehe

WilliamStam avatar Dec 30 '22 08:12 WilliamStam

Any update on this?

terax6669 avatar Jan 25 '23 10:01 terax6669

Any update on this?

fedot199614 avatar Feb 01 '23 14:02 fedot199614

Success BUILD for Windows! Test on your own risk. Left messages here if it works.

PHP 8.2.3 x64 TS + NTS

ext-imagick-php8.2-ts-x64.zip ext-imagick-php8.2-nts-x64.zip

ArthurPatriot avatar Feb 15 '23 17:02 ArthurPatriot

Thats fantastic!

N6REJ avatar Feb 15 '23 18:02 N6REJ

what about nts?

Success BUILD for Windows! Test on your own risk. Left messages here if it works.

PHP 8.2.3 x64 TS

ext-imagick-php8.2-ts-x64.zip

greate, but what about nts?

fedot199614 avatar Feb 16 '23 16:02 fedot199614

I had to go through 9 rings of hell to make this build without any instructions or tips... If you really need it, I can make another build, for NTS...) You can download here - https://github.com/Imagick/imagick/issues/573#issuecomment-1431773928

ArthurPatriot avatar Feb 16 '23 16:02 ArthurPatriot

I had to go through 9 rings of hell to make this build without any instructions or tips... If you really need it, I can make another build, for NTS...) You can download here - #573 (comment)

thanks so much. Will try your build. Also found this great guide and planning use it https://jite.eu/_posts/2021-02-21-imagick-on-php8/

UPD: works for me, thx

fedot199614 avatar Feb 17 '23 08:02 fedot199614

The thread-safe version (the one I need) will not work on my system (Win11, XAMPP, with PHP 8.2). I suspect it's because the version of ImageMagick I have installed locally (ImageMagick-7.1.0-18-vc15-x64/ImageMagick 7.1.0-18 Q16 x64) is different than the version the builds above were compiled against.

@ArthurPatriot, which version of ImageMagick did you compile those builds against?

tmb-github avatar Feb 19 '23 05:02 tmb-github

The thread-safe version (the one I need) will not work on my system (Win11, XAMPP, with PHP 8.2). I suspect it's because the version of ImageMagick I have installed locally (ImageMagick-7.1.0-18-vc15-x64/ImageMagick 7.1.0-18 Q16 x64) is different than the version the builds above were compiled against.

@ArthurPatriot, which version of ImageMagick did you compile those builds against?

All libraries included on zip. You can use latest version of Imagick for Windows.

ArthurPatriot avatar Feb 19 '23 08:02 ArthurPatriot

@ArthurPatriot Which version of ImageMagick is installed on the machine where you compiled Imagick?

tmb-github avatar Feb 19 '23 18:02 tmb-github

@ArthurPatriot Which version of ImageMagick is installed on the machine where you compiled Imagick?

All required libraries exists in zip. ImageMagick-7.1.0-62-Q16-HDRI-x64

ArthurPatriot avatar Feb 19 '23 19:02 ArthurPatriot

@ArthurPatriot Success! Thanks so much!!!

tmb-github avatar Feb 20 '23 05:02 tmb-github

Is this working for Debian Linux? php 8.2

pro81723 avatar Feb 21 '23 12:02 pro81723

@pro81723

sudo add-apt-repository ppa:ondrej/php sudo apt update sudo apt install php8.2-imagick

ArthurPatriot avatar Feb 21 '23 12:02 ArthurPatriot

Success BUILD for Windows! Test on your own risk. Left messages here if it works.

PHP 8.2.3 x64 TS + NTS

ext-imagick-php8.2-ts-x64.zip ext-imagick-php8.2-nts-x64.zip

PHP 8.2.3 x64 TS

Works for me, W11 + XAMPP with PHP 8.2, Thanks!

Rentner2 avatar Mar 17 '23 15:03 Rentner2

Is there an official release?

Qara-Penimah avatar Mar 17 '23 16:03 Qara-Penimah

when I compare the ts to whats on pecl repo there is a LOT missing. I'm unsure what to do.

N6REJ avatar Apr 03 '23 21:04 N6REJ

it works for everything i need it to do. doesnt error out. are there any issues with the differences? otherwise i wouldnt worry too much i think

edit: NTS here so that might be less of an issue than TS version i suppose

WilliamStam avatar Apr 04 '23 06:04 WilliamStam

TS here so that might be less of an issue than TS version i suppose

all must works

ArthurPatriot avatar Apr 05 '23 10:04 ArthurPatriot

Success BUILD for Windows! Test on your own risk. Left messages here if it works.

PHP 8.2.3 x64 TS + NTS

ext-imagick-php8.2-ts-x64.zip ext-imagick-php8.2-nts-x64.zip

It appears in the "php -m" result but not in the phpinfo.

PS C:\xampp\htdocs\...> php  --ri imagick

imagick

imagick module => enabled
imagick module version => @PACKAGE_VERSION@
imagick classes => Imagick, ImagickDraw, ImagickPixel, ImagickPixelIterator, ImagickKernel
Imagick compiled with ImageMagick version => ImageMagick 7.1.0-62 Q16-HDRI x64 32ce406:20230212 https://imagemagick.org
Imagick using ImageMagick library version => ImageMagick 7.1.0-62 Q16-HDRI x64 32ce406:20230212 https://imagemagick.org
ImageMagick copyright => (C) 1999 ImageMagick Studio LLC
ImageMagick release date => 2023-02-12
ImageMagick number of supported formats:  => 0

Directive => Local Value => Master Value
imagick.locale_fix => 0 => 0
imagick.skip_version_check => 0 => 0
imagick.progress_monitor => 0 => 0
imagick.set_single_thread => 1 => 1
imagick.shutdown_sleep_count => 10 => 10
imagick.allow_zero_dimension_images => 0 => 0

Asmitta-01 avatar May 05 '23 12:05 Asmitta-01

@ArthurPatriot Any possibillity of a lighter guide for wich rings of hell you went through to build this?

ELFswe avatar May 13 '23 21:05 ELFswe

@ArthurPatriot Any possibillity of a lighter guide for wich rings of hell you went through to build this?

In fact, it is difficult only the first time... Once you have everything figured out, it is done in a few minutes...

ArthurPatriot avatar May 13 '23 21:05 ArthurPatriot