Compilation under cygwin

IMagick is a native PHP extension to create and modify images using the ImageMagick API. ImageMagick Studio LLC did not write nor does it maintain the IMagick extension, however, IMagick users are welcome to discuss the extension here.
Post Reply
kbs1
Posts: 1
Joined: 2019-11-27T02:41:46-07:00
Authentication code: 1152

Compilation under cygwin

Post by kbs1 » 2019-11-27T02:54:22-07:00

Hi all,

I am trying to compile php-imagick under cygwin64 which I use for development. This package is not offered directly in setup, so I installed all development libraries, downloaded 3.4.4 source from https://pecl.php.net/package/imagick, then ran phpize, make, make test (all passed), and finally make install. The dll was installed to /lib/php/20180731/imagick.dll which is correct for php 7.3.7.

However once I enable the extension, almost everything crashes:

Code: Select all

$ php -i | grep -i imagick
/etc/php.d/imagick.ini,
imagick
imagick module => enabled
imagick module version => 3.4.4
imagick classes => Imagick, ImagickDraw, ImagickPixel, ImagickPixelIterator, ImagickKernel
Imagick compiled with ImageMagick version => ImageMagick 6.9.10-11 Q16 x86_64 2018-09-08 https://www.imagemagick.org
Imagick using ImageMagick library version => ImageMagick 6.9.10-11 Q16 x86_64 2018-09-08 https://www.imagemagick.org
imagick.locale_fix => 0 => 0
imagick.progress_monitor => 0 => 0
imagick.skip_version_check => 0 => 0
Ok, but:

Code: Select all

$ composer
      0 [main] php 376 child_info_fork::abort: \??\C:\cygwin64\bin\cygautotrace-3.dll: Loaded to different address: parent(0x3E8C40000) != child(0xCD0000)

      0 [main] php 377 child_info_fork::abort: \??\C:\cygwin64\bin\cygMagickCore-6.Q16-6.dll: Loaded to different address: parent(0x3F2750000) != child(0x10F0000)
PHP Fatal error:  Uncaught ErrorException: proc_open(): fork failed - Resource temporarily unavailable in ...
So yeah. I've tried rebasing multiple times, I've made sure the dlls are in rebase db:

Code: Select all

$ grep -r cygMagickCore /etc/rebase.db.x86_64
Binary file /etc/rebase.db.x86_64 matches
$ grep -r cygautotrace /etc/rebase.db.x86_64
Binary file /etc/rebase.db.x86_64 matches
Only way to make PHP work again is to disable the extension, any clues to what might be happening? :/

Thank you

Post Reply