Imagick / imagick

🌈 The Imagick PHP extension 🌈
http://pecl.php.net/imagick
Other
534 stars 135 forks source link

Install error "Unterminated preprocessor conditions" in php 8.3 #640

Open FedericoHeichou opened 9 months ago

FedericoHeichou commented 9 months ago

The first if condition in Imagick.stub.php is not closed https://github.com/Imagick/imagick/blob/28f27044e435a2b203e32675e942eb8de620ee58/Imagick.stub.php#L5-L8

This causes a installation error "Unterminated preprocessor conditions" in PHP 8.3

I'll submit a PR

dinamic commented 7 months ago

Just had the same issue happening. Here are steps to reproduce:

docker run -it --rm php:8.3-alpine sh
apk update
apk add imagemagick imagemagick-dev gcc make autoconf g++ 
pecl install imagick
UtkuDalmaz commented 7 months ago

Any solution?

dinamic commented 7 months ago

@UtkuDalmaz People have tried to get in touch with the maintainer over different communication channels to no avail. I'm sticking with PHP 8.2 for now. Have a look at the discussion here: https://github.com/Imagick/imagick/pull/641

Danack commented 6 months ago

Thanks. It should be fixed now in develop, but as it never seemed to be a problem on my machine, I can't guarantee that.

I've actually just removed the #if MagickLibVersion > 0x628 as the minimum version of ImageMagick is above that now.

I'll close this issue when I'm more confident it's fixed (aka github actions are passing), but that will require more poking and possibly dropping support for PHP < 7.0 as the gen_stubs.php tool seems to no longer support those. Probably appropriately.

dinamic commented 6 months ago

@Danack so happy to hear from you! I hope things are okay.

The issue is easily reproducible with a docker container:

docker run -it --rm php:8.3-alpine sh
apk update
apk add imagemagick imagemagick-dev gcc make autoconf g++ 
pecl install imagick
tcubukcu commented 6 months ago

@UtkuDalmaz People have tried to get in touch with the maintainer over different communication channels to no avail. I'm sticking with PHP 8.2 for now. Have a look at the discussion here: #641

Yes using php8.2 seems like the best solution for now. I tried it on version 8.2, there was no problem with the installation.

ihabzee commented 5 months ago

any update on when this issue will be fixed? Thanks!

mashb1t commented 5 months ago

having the same issue in PHP 8.3 (running on M1/arm and Docker)

ricardomecca commented 5 months ago

Not have updates? I've been waiting for the PECL update with the correction for more than 3 months but so far nothing.

pF-luis commented 5 months ago

Same issue here

mathroc commented 5 months ago

A small recap: the issue is fixed on develop but a new tag for this hasn't been published yet. The maintainers are aware of this. Meanwhile, it means your choices are:

You can also subscribe to this issue notifications, someone will very likely announce it here when a new tag appears.

But it's not very useful to post comment to "+1" the issue, complain or ask for estimates on when this will happen

pF-luis commented 5 months ago

It's a simple comment, no harm done 😘 Thanks for the recap tho, thought something might've happened since the last official info was about two month ago.

yesidevelop commented 5 months ago

Sometimes it works, sometimes it doesn't strange bug I tried this way RUN pecl install imagick RUN docker-php-ext-enable imagick

renky commented 4 months ago

For everybody who is using mlocati/php-extension-installer

RUN install-php-extensions imagick/imagick@master

nevertheless: it's only a workarround in my opinion. It's now more than two months ago that I had a last look on this issue and in all projects where I used imagick I finally could switch to gd or gmagick without any problems when upgrading to PHP8.3... Until today - now I have a project where I have to stick with imagick and I just see: still the same issue...

I know - the solution above works. But sorry... for productive environments I don't see an untagged version as a stable solution - in a production environment I need deterministic build processes and installation behavior and for that it is indispensable to have a tagged version of all dependencies... Just for a shortime workaround, I would accept such a develop solution.

If this extension cannot ensure this any more, I guess it's really EOL because more and more people will switch. That's why I again suggest to share responsibility for such an important php extension. It's also an option to contact the php foundation to request about helping in maintaining. Maybe the interest is high enough in case of this extension.

On the other side: Where is the problem to just put a tag on it?

Thanks to everybody who is working on it.

eminozlem commented 3 months ago

bumping for visibility. I am waiting for imagick to upgrade my websites to php 8.3. Hope this gets resolved soon 🙏

WHM OS AlmaLinux v8.9.0

tommmoe commented 3 months ago

bumping because I don't know how to follow, stuck on 8.2

EusebiuOprinoiu commented 2 months ago

Can we expect a new release on PECL in the near future with a fix for this? If so, can we get an estimated time frame for it? (i.e. 1 month, 3 months, etc)

crazyserb commented 2 months ago

This is so silly... this major issue has been around for 6 months now and nobody's managed to fix it and push it to official PECL release yet?

s0me0ther commented 2 months ago

Thanks. It should be fixed now in develop, but as it never seemed to be a problem on my machine, I can't guarantee that.

I've actually just removed the #if MagickLibVersion > 0x628 as the minimum version of ImageMagick is above that now.

I'll close this issue when I'm more confident it's fixed (aka github actions are passing), but that will require more poking and possibly dropping support for PHP < 7.0 as the gen_stubs.php tool seems to no longer support those. Probably appropriately.

Hi @Danack

Could we fast forward this to solve the issue which seems to block many ppl right now. A fetch of the master should not be a solution i think..

Is there anything some of us could do / help here to fast forward close this issue?

🙏🏻

mathroc commented 2 months ago

Looks like we need a reminder :)

So, the issue is fixed on develop but there are no tagged releases with the fix

you can:

and this one is a should:

The maintainers are already aware. They have their reasons for not moving forwards and it's up to them to decide to communicate them or not. They don't owe us anything.

ricardomecca commented 2 months ago

Looks like we need a reminder :)

So, the issue is fixed on develop but there are no tagged releases with the fix

you can:

  • use develop
  • use a specific commit
  • keep using PHP 8.2
  • fork the extension and tag a release of your own
  • use another tool
  • donate using the "Sponsor" below (or better: get your company to sponsor their work) and wait 🤞
  • wait 🤞

and this one is a should:

  • stop complaining and asking for estimates

The maintainers are already aware. They have their reasons for not moving forwards and it's up to them to decide to communicate them or not. They don't owe us anything.

pathetic your reply, sorry!

FedericoHeichou commented 2 months ago

Looks like we need a reminder :)

So, the issue is fixed on develop but there are no tagged releases with the fix

you can:

  • use develop
  • use a specific commit
  • keep using PHP 8.2
  • fork the extension and tag a release of your own
  • use another tool
  • donate using the "Sponsor" below (or better: get your company to sponsor their work) and wait 🤞
  • wait 🤞

and this one is a should:

  • stop complaining and asking for estimates

The maintainers are already aware. They have their reasons for not moving forwards and it's up to them to decide to communicate them or not. They don't owe us anything.

The problem is that most of the time you cannot choose a tool. If it is a dependency of other open source things, there is nothing you can do.

Unfortunately we have no recent updates, so we can only wait.
I understand the developers and I'm not asking for anything, I can even maintain it locally.
But really, this seems to be a dead project at the moment, no company would be motivated to invest if there is no communication.

It is just a sad fact. I'm still grateful and hope for good things for everyone.

I know one day it will be tagged, but people, stop insulting each other here, this is not a chatroom.

RickKukiela commented 2 months ago

Man I just tried to install 8.3 + Imagick on my WHM/Cpanel (CL8) Server and ran into this brick wall at full speed :(

Was planning on skipping 8.2 completely, now I guess I'm going to have to go to 8.2 for now, then upgrade again later.

Alternatively, I really don't mind using the develop branch, but I am unsure how to do this from a WHM / EasyApache / YUM based system.

Does anyone know how I can install this using the develop branch in this type of environment?

FedericoHeichou commented 2 months ago

Man I just tried to install 8.3 + Imagick on my WHM/Cpanel (CL8) Server and ran into this brick wall at full speed :(

Was planning on skipping 8.2 completely, now I guess I'm going to have to go to 8.2 for now, then upgrade again later.

Alternatively, I really don't mind using the develop branch, but I am unsure how to do this from a WHM / EasyApache / YUM based system.

Does anyone know how I can install this using the develop branch in this type of environment?

https://github.com/Imagick/imagick/pull/641 here people gave some instructions.
You can do it with pecl providing a local tar

RickKukiela commented 2 months ago

@FedericoHeichou Thanks! I was able to get it working!

I loosely followed these instructions:

pecl download imagick
tar xzf imagick-3.7.0.tgz
patch mypatch.diff imagick/Imagick.stub.php
# get md5 of that patched file and sed it in package.xml
tar czf imagick-3.7.0-patch01.tgz imagick package.xml
pecl install ./imagick-3.7.0-patch01.tgz

and it worked :)

mturalenka commented 2 months ago

in docker builds we use next command to setup extension:

RUN apt-get update \
  && apt-get install -y --no-install-recommends \
    libmagickwand-dev \
  && mkdir -p /usr/src/php/ext/imagick \
  && curl -fsSL https://github.com/Imagick/imagick/archive/944b67fce68bcb5835999a149f917670555b6fcb.tar.gz | tar xvz -C "/usr/src/php/ext/imagick" --strip 1 \
  && docker-php-ext-install imagick \
  && apt-get remove -y \
    libmagickwand-dev \
  && apt-get autoremove -y \
  && rm -rf /var/lib/apt/lists/* \
  && rm -rf /tmp/pear

where 944b67fce68bcb5835999a149f917670555b6fcb is commit after fix, or it can be replaced by any reference in the repository, but its better to do not use latest version to avoid unexpected builds

sarajcicarnes commented 1 month ago

We had the problem of installing Imagick for php 8.3 via PECL in cPanel and found the following to work with no issues:

cd /usr/src

wget https://codeload.github.com/Imagick/imagick/zip/refs/heads/master

unzip master

rm -rf master

mv imagick-master imagick

cd imagick

/opt/cpanel/ea-php83/root/usr/bin/phpize

./configure --with-php-config=/opt/cpanel/ea-php83/root/usr/bin/php-config

make

make test

make install

echo "extension=imagick.so" >> /opt/cpanel/ea-php83/root/etc/php.d/imagick.ini

systemctl restart httpd

cd ..

rm -rf imagick
eminozlem commented 3 weeks ago

I just tried installing via WHM PECL installer today and it worked ! Maybe they finally fixed it on remote

dinamic commented 3 weeks ago

It's not fixed. You could easily reproduce with a docker container.

docker run -it --rm php:8.3-alpine sh
apk update
apk add imagemagick imagemagick-dev gcc make autoconf g++ 
pecl install imagick
thdebay commented 3 weeks ago

Has anyone succeeded in installing the imagick-php extension with the manual installation method?

I'm grateful for the suggestions that were suggested earlier, thanks to these I've been able to add Imagick to my Alpine image, however it seems the PDF documents cannot be processed (even though GS is installed).

Has anyone encountered the same issue with these alternative installation methods?

RUN set -eux; \
    apk add --no-cache imagemagick-dev ghostscript; \
    curl -fL -o imagick.tgz 'https://pecl.php.net/get/imagick-3.7.0.tgz'; \
    echo '5a364354109029d224bcbb2e82e15b248be9b641227f45e63425c06531792d3e *imagick.tgz' | sha256sum -c -; \
    tar --extract --directory /tmp --file imagick.tgz imagick-3.7.0; \
    grep '^//#endif$' /tmp/imagick-3.7.0/Imagick.stub.php; \
    test "$(grep -c '^//#endif$' /tmp/imagick-3.7.0/Imagick.stub.php)" = '1'; \
    sed -i -e 's!^//#endif$!#endif!' /tmp/imagick-3.7.0/Imagick.stub.php; \
    grep '^//#endif$' /tmp/imagick-3.7.0/Imagick.stub.php && exit 1 || :; \
    docker-php-ext-install /tmp/imagick-3.7.0; \
    rm -rf imagick.tgz /tmp/imagick-3.7.0
ErroneousBosch commented 2 weeks ago

@dinamic

Tested this and it built fine with your commands on a fresh pull of the php:8.3-alpine image.

$ docker run -it --rm php:8.3-alpine sh
Unable to find image 'php:8.3-alpine' locally
8.3-alpine: Pulling from library/php
c6a83fedfae6: Pull complete 
3ae0d9dfc4da: Pull complete 
ce295ca8623e: Pull complete 
60d3eb99f3c1: Pull complete 
6a875e60b20d: Pull complete 
494e33775149: Pull complete 
456a98184ff4: Pull complete 
ce6e3dc3f7c5: Pull complete 
81af22c0eb61: Pull complete 
Digest: sha256:cada46505b6cd62d318aa9ef1fe834fed1cd3ac4a1422bd7158095f53fc7c036
Status: Downloaded newer image for php:8.3-alpine
/ # apk update
fetch https://dl-cdn.alpinelinux.org/alpine/v3.20/main/x86_64/APKINDEX.tar.gz
fetch https://dl-cdn.alpinelinux.org/alpine/v3.20/community/x86_64/APKINDEX.tar.gz
v3.20.2-111-g828f1357895 [https://dl-cdn.alpinelinux.org/alpine/v3.20/main]
v3.20.2-125-g535b7c8b1d5 [https://dl-cdn.alpinelinux.org/alpine/v3.20/community]
OK: 24163 distinct packages available
/ # apk add imagemagick imagemagick-dev gcc make autoconf g++ 
(1/37) Installing m4 (1.4.19-r3)
(2/37) Installing libbz2 (1.0.8-r6)
(3/37) Installing perl (5.38.2-r0)
(4/37) Installing autoconf (2.72-r0)
(5/37) Installing libstdc++ (13.2.1_git20240309-r0)
(6/37) Installing libstdc++-dev (13.2.1_git20240309-r0)
(7/37) Installing jansson (2.14-r4)
(8/37) Installing binutils (2.42-r0)
(9/37) Installing libgomp (13.2.1_git20240309-r0)
(10/37) Installing libatomic (13.2.1_git20240309-r0)
(11/37) Installing gmp (6.3.0-r1)
(12/37) Installing isl26 (0.26-r1)
(13/37) Installing mpfr4 (4.2.1-r0)
(14/37) Installing mpc1 (1.3.1-r1)
(15/37) Installing gcc (13.2.1_git20240309-r0)
(16/37) Installing musl-dev (1.2.5-r0)
(17/37) Installing g++ (13.2.1_git20240309-r0)
(18/37) Installing libxau (1.0.11-r4)
(19/37) Installing libmd (1.1.0-r0)
(20/37) Installing libbsd (0.12.2-r0)
(21/37) Installing libxdmcp (1.1.5-r1)
(22/37) Installing libxcb (1.16.1-r0)
(23/37) Installing libx11 (1.8.9-r1)
(24/37) Installing libxext (1.3.6-r2)
(25/37) Installing fftw-double-libs (3.3.10-r5)
(26/37) Installing libexpat (2.6.2-r0)
(27/37) Installing libpng (1.6.43-r0)
(28/37) Installing freetype (2.13.2-r0)
(29/37) Installing fontconfig (2.15.0-r1)
(30/37) Installing lcms2 (2.16-r0)
(31/37) Installing libltdl (2.4.7-r3)
(32/37) Installing imagemagick-libs (7.1.1.32-r2)
(33/37) Installing imagemagick (7.1.1.32-r2)
(34/37) Installing imagemagick-c++ (7.1.1.32-r2)
(35/37) Installing pkgconf (2.2.0-r0)
(36/37) Installing imagemagick-dev (7.1.1.32-r2)
(37/37) Installing make (4.4.1-r2)
Executing busybox-1.36.1-r29.trigger
OK: 288 MiB in 76 packages
/ # pecl install imagick
downloading imagick-3.7.0.tgz ...
Starting to download imagick-3.7.0.tgz (360,138 bytes)
.........................................................................done: 360,138 bytes
33 source files, building
running: phpize
Configuring for:
PHP Api Version:         20230831
Zend Module Api No:      20230831
Zend Extension Api No:   420230831
Please provide the prefix of ImageMagick installation [autodetect] : 
building in /tmp/pear/temp/pear-build-defaultuserGBnDEj/imagick-3.7.0
running: /tmp/pear/temp/imagick/configure --with-php-config=/usr/local/bin/php-config --with-imagick
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for a sed that does not truncate output... /bin/sed
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for cc... cc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether the compiler supports GNU C... yes
checking whether cc accepts -g... yes
checking for cc option to enable C11 features... none needed
checking how to run the C preprocessor... cc -E
checking for egrep -e... (cached) /bin/grep -E
checking for icc... no
checking for suncc... no
checking for system library directory... lib
checking if compiler supports -Wl,-rpath,... yes
checking build system type... x86_64-pc-linux-musl
checking host system type... x86_64-pc-linux-musl
checking target system type... x86_64-pc-linux-musl
checking for PHP prefix... /usr/local
checking for PHP includes... -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib
checking for PHP extension directory... /usr/local/lib/php/extensions/no-debug-non-zts-20230831
checking for PHP installed headers prefix... /usr/local/include/php
checking if debug is enabled... no
checking if zts is enabled... no
checking for gawk... no
checking for nawk... no
checking for awk... awk
checking if awk is broken... no
checking whether to enable the imagick extension... yes, shared
checking for pkg-config... /usr/bin/pkg-config
checking ImageMagick MagickWand API configuration program... checking Testing /usr/local/bin/MagickWand-config... Doesn't exist
checking Testing /usr/bin/MagickWand-config... It exists
found in /usr/bin/MagickWand-config
checking if ImageMagick version is at least 6.2.4... found version 7.1.1-32 Q16 HDRI
checking for MagickWand.h or magick-wand.h header... user location /usr/include/ImageMagick-7/MagickWand/MagickWand.h
checking PHP version is at least 5.3.2... yes. found 8.3.10
libs
-lMagickWand-7.Q16HDRI -lMagickCore-7.Q16HDRI

checking for MagickGetVersion... yes
checking omp_pause_resource_all usability... yes
checking Which flavour of OpenMP to link... checking for omp_pause_resource_all... no
checking for __omp_pause_resource_all... no
checking for omp_pause_resource_all in -lgomp... yes
GCC flavoured OpenMP
checking for a sed that does not truncate output... /bin/sed
checking for ld used by cc... /usr/x86_64-alpine-linux-musl/bin/ld
checking if the linker (/usr/x86_64-alpine-linux-musl/bin/ld) is GNU ld... yes
checking for /usr/x86_64-alpine-linux-musl/bin/ld option to reload object files... -r
checking for BSD-compatible nm... /usr/bin/nm -B
checking whether ln -s works... yes
checking how to recognize dependent libraries... pass_all
/tmp/pear/temp/imagick/configure: line 6825: /usr/bin/file: not found
checking for stdio.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for strings.h... yes
checking for sys/stat.h... yes
checking for sys/types.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking the maximum length of command line arguments... 98304
checking command to parse /usr/bin/nm -B output from cc object... ok
checking for objdir... .libs
checking for ar... ar
checking for ranlib... ranlib
checking for strip... strip
checking if cc supports -fno-rtti -fno-exceptions... no
checking for cc option to produce PIC... -fPIC
checking if cc PIC flag -fPIC works... yes
checking if cc static flag -static works... yes
checking if cc supports -c -o file.o... yes
checking whether the cc linker (/usr/x86_64-alpine-linux-musl/bin/ld) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no

creating libtool
appending configuration tag "CXX" to libtool
configure: patching config.h.in
configure: creating ./config.status
config.status: creating config.h
running: make
/bin/sh /tmp/pear/temp/pear-build-defaultuserGBnDEj/imagick-3.7.0/libtool --tag=CC --mode=compile cc -I. -I/tmp/pear/temp/imagick -I/tmp/pear/temp/pear-build-defaultuserGBnDEj/imagick-3.7.0/include -I/tmp/pear/temp/pear-build-defaultuserGBnDEj/imagick-3.7.0/main -I/tmp/pear/temp/imagick -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -I/usr/include/ImageMagick-7  -DHAVE_CONFIG_H  -g -O2 -D_GNU_SOURCE   -I/usr/include/ImageMagick-7 -fopenmp -DMAGICKCORE_HDRI_ENABLE=1 -DMAGICKCORE_QUANTUM_DEPTH=16 -DMAGICKCORE_CHANNEL_MASK_DEPTH=32 -DZEND_COMPILE_DL_EXT=1 -c /tmp/pear/temp/imagick/imagick_file.c -o imagick_file.lo  -MMD -MF imagick_file.dep -MT imagick_file.lo
mkdir .libs
 cc -I. -I/tmp/pear/temp/imagick -I/tmp/pear/temp/pear-build-defaultuserGBnDEj/imagick-3.7.0/include -I/tmp/pear/temp/pear-build-defaultuserGBnDEj/imagick-3.7.0/main -I/tmp/pear/temp/imagick -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -I/usr/include/ImageMagick-7 -DHAVE_CONFIG_H -g -O2 -D_GNU_SOURCE -I/usr/include/ImageMagick-7 -fopenmp -DMAGICKCORE_HDRI_ENABLE=1 -DMAGICKCORE_QUANTUM_DEPTH=16 -DMAGICKCORE_CHANNEL_MASK_DEPTH=32 -DZEND_COMPILE_DL_EXT=1 -c /tmp/pear/temp/imagick/imagick_file.c -MMD -MF imagick_file.dep -MT imagick_file.lo  -fPIC -DPIC -o .libs/imagick_file.o
/bin/sh /tmp/pear/temp/pear-build-defaultuserGBnDEj/imagick-3.7.0/libtool --tag=CC --mode=compile cc -I. -I/tmp/pear/temp/imagick -I/tmp/pear/temp/pear-build-defaultuserGBnDEj/imagick-3.7.0/include -I/tmp/pear/temp/pear-build-defaultuserGBnDEj/imagick-3.7.0/main -I/tmp/pear/temp/imagick -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -I/usr/include/ImageMagick-7  -DHAVE_CONFIG_H  -g -O2 -D_GNU_SOURCE   -I/usr/include/ImageMagick-7 -fopenmp -DMAGICKCORE_HDRI_ENABLE=1 -DMAGICKCORE_QUANTUM_DEPTH=16 -DMAGICKCORE_CHANNEL_MASK_DEPTH=32 -DZEND_COMPILE_DL_EXT=1 -c /tmp/pear/temp/imagick/imagick_class.c -o imagick_class.lo  -MMD -MF imagick_class.dep -MT imagick_class.lo
 cc -I. -I/tmp/pear/temp/imagick -I/tmp/pear/temp/pear-build-defaultuserGBnDEj/imagick-3.7.0/include -I/tmp/pear/temp/pear-build-defaultuserGBnDEj/imagick-3.7.0/main -I/tmp/pear/temp/imagick -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -I/usr/include/ImageMagick-7 -DHAVE_CONFIG_H -g -O2 -D_GNU_SOURCE -I/usr/include/ImageMagick-7 -fopenmp -DMAGICKCORE_HDRI_ENABLE=1 -DMAGICKCORE_QUANTUM_DEPTH=16 -DMAGICKCORE_CHANNEL_MASK_DEPTH=32 -DZEND_COMPILE_DL_EXT=1 -c /tmp/pear/temp/imagick/imagick_class.c -MMD -MF imagick_class.dep -MT imagick_class.lo  -fPIC -DPIC -o .libs/imagick_class.o
/bin/sh /tmp/pear/temp/pear-build-defaultuserGBnDEj/imagick-3.7.0/libtool --tag=CC --mode=compile cc -I. -I/tmp/pear/temp/imagick -I/tmp/pear/temp/pear-build-defaultuserGBnDEj/imagick-3.7.0/include -I/tmp/pear/temp/pear-build-defaultuserGBnDEj/imagick-3.7.0/main -I/tmp/pear/temp/imagick -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -I/usr/include/ImageMagick-7  -DHAVE_CONFIG_H  -g -O2 -D_GNU_SOURCE   -I/usr/include/ImageMagick-7 -fopenmp -DMAGICKCORE_HDRI_ENABLE=1 -DMAGICKCORE_QUANTUM_DEPTH=16 -DMAGICKCORE_CHANNEL_MASK_DEPTH=32 -DZEND_COMPILE_DL_EXT=1 -c /tmp/pear/temp/imagick/imagickdraw_class.c -o imagickdraw_class.lo  -MMD -MF imagickdraw_class.dep -MT imagickdraw_class.lo
 cc -I. -I/tmp/pear/temp/imagick -I/tmp/pear/temp/pear-build-defaultuserGBnDEj/imagick-3.7.0/include -I/tmp/pear/temp/pear-build-defaultuserGBnDEj/imagick-3.7.0/main -I/tmp/pear/temp/imagick -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -I/usr/include/ImageMagick-7 -DHAVE_CONFIG_H -g -O2 -D_GNU_SOURCE -I/usr/include/ImageMagick-7 -fopenmp -DMAGICKCORE_HDRI_ENABLE=1 -DMAGICKCORE_QUANTUM_DEPTH=16 -DMAGICKCORE_CHANNEL_MASK_DEPTH=32 -DZEND_COMPILE_DL_EXT=1 -c /tmp/pear/temp/imagick/imagickdraw_class.c -MMD -MF imagickdraw_class.dep -MT imagickdraw_class.lo  -fPIC -DPIC -o .libs/imagickdraw_class.o
/bin/sh /tmp/pear/temp/pear-build-defaultuserGBnDEj/imagick-3.7.0/libtool --tag=CC --mode=compile cc -I. -I/tmp/pear/temp/imagick -I/tmp/pear/temp/pear-build-defaultuserGBnDEj/imagick-3.7.0/include -I/tmp/pear/temp/pear-build-defaultuserGBnDEj/imagick-3.7.0/main -I/tmp/pear/temp/imagick -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -I/usr/include/ImageMagick-7  -DHAVE_CONFIG_H  -g -O2 -D_GNU_SOURCE   -I/usr/include/ImageMagick-7 -fopenmp -DMAGICKCORE_HDRI_ENABLE=1 -DMAGICKCORE_QUANTUM_DEPTH=16 -DMAGICKCORE_CHANNEL_MASK_DEPTH=32 -DZEND_COMPILE_DL_EXT=1 -c /tmp/pear/temp/imagick/imagickpixel_class.c -o imagickpixel_class.lo  -MMD -MF imagickpixel_class.dep -MT imagickpixel_class.lo
 cc -I. -I/tmp/pear/temp/imagick -I/tmp/pear/temp/pear-build-defaultuserGBnDEj/imagick-3.7.0/include -I/tmp/pear/temp/pear-build-defaultuserGBnDEj/imagick-3.7.0/main -I/tmp/pear/temp/imagick -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -I/usr/include/ImageMagick-7 -DHAVE_CONFIG_H -g -O2 -D_GNU_SOURCE -I/usr/include/ImageMagick-7 -fopenmp -DMAGICKCORE_HDRI_ENABLE=1 -DMAGICKCORE_QUANTUM_DEPTH=16 -DMAGICKCORE_CHANNEL_MASK_DEPTH=32 -DZEND_COMPILE_DL_EXT=1 -c /tmp/pear/temp/imagick/imagickpixel_class.c -MMD -MF imagickpixel_class.dep -MT imagickpixel_class.lo  -fPIC -DPIC -o .libs/imagickpixel_class.o
/bin/sh /tmp/pear/temp/pear-build-defaultuserGBnDEj/imagick-3.7.0/libtool --tag=CC --mode=compile cc -I. -I/tmp/pear/temp/imagick -I/tmp/pear/temp/pear-build-defaultuserGBnDEj/imagick-3.7.0/include -I/tmp/pear/temp/pear-build-defaultuserGBnDEj/imagick-3.7.0/main -I/tmp/pear/temp/imagick -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -I/usr/include/ImageMagick-7  -DHAVE_CONFIG_H  -g -O2 -D_GNU_SOURCE   -I/usr/include/ImageMagick-7 -fopenmp -DMAGICKCORE_HDRI_ENABLE=1 -DMAGICKCORE_QUANTUM_DEPTH=16 -DMAGICKCORE_CHANNEL_MASK_DEPTH=32 -DZEND_COMPILE_DL_EXT=1 -c /tmp/pear/temp/imagick/imagickpixeliterator_class.c -o imagickpixeliterator_class.lo  -MMD -MF imagickpixeliterator_class.dep -MT imagickpixeliterator_class.lo
 cc -I. -I/tmp/pear/temp/imagick -I/tmp/pear/temp/pear-build-defaultuserGBnDEj/imagick-3.7.0/include -I/tmp/pear/temp/pear-build-defaultuserGBnDEj/imagick-3.7.0/main -I/tmp/pear/temp/imagick -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -I/usr/include/ImageMagick-7 -DHAVE_CONFIG_H -g -O2 -D_GNU_SOURCE -I/usr/include/ImageMagick-7 -fopenmp -DMAGICKCORE_HDRI_ENABLE=1 -DMAGICKCORE_QUANTUM_DEPTH=16 -DMAGICKCORE_CHANNEL_MASK_DEPTH=32 -DZEND_COMPILE_DL_EXT=1 -c /tmp/pear/temp/imagick/imagickpixeliterator_class.c -MMD -MF imagickpixeliterator_class.dep -MT imagickpixeliterator_class.lo  -fPIC -DPIC -o .libs/imagickpixeliterator_class.o
/bin/sh /tmp/pear/temp/pear-build-defaultuserGBnDEj/imagick-3.7.0/libtool --tag=CC --mode=compile cc -I. -I/tmp/pear/temp/imagick -I/tmp/pear/temp/pear-build-defaultuserGBnDEj/imagick-3.7.0/include -I/tmp/pear/temp/pear-build-defaultuserGBnDEj/imagick-3.7.0/main -I/tmp/pear/temp/imagick -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -I/usr/include/ImageMagick-7  -DHAVE_CONFIG_H  -g -O2 -D_GNU_SOURCE   -I/usr/include/ImageMagick-7 -fopenmp -DMAGICKCORE_HDRI_ENABLE=1 -DMAGICKCORE_QUANTUM_DEPTH=16 -DMAGICKCORE_CHANNEL_MASK_DEPTH=32 -DZEND_COMPILE_DL_EXT=1 -c /tmp/pear/temp/imagick/imagick_helpers.c -o imagick_helpers.lo  -MMD -MF imagick_helpers.dep -MT imagick_helpers.lo
 cc -I. -I/tmp/pear/temp/imagick -I/tmp/pear/temp/pear-build-defaultuserGBnDEj/imagick-3.7.0/include -I/tmp/pear/temp/pear-build-defaultuserGBnDEj/imagick-3.7.0/main -I/tmp/pear/temp/imagick -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -I/usr/include/ImageMagick-7 -DHAVE_CONFIG_H -g -O2 -D_GNU_SOURCE -I/usr/include/ImageMagick-7 -fopenmp -DMAGICKCORE_HDRI_ENABLE=1 -DMAGICKCORE_QUANTUM_DEPTH=16 -DMAGICKCORE_CHANNEL_MASK_DEPTH=32 -DZEND_COMPILE_DL_EXT=1 -c /tmp/pear/temp/imagick/imagick_helpers.c -MMD -MF imagick_helpers.dep -MT imagick_helpers.lo  -fPIC -DPIC -o .libs/imagick_helpers.o
/bin/sh /tmp/pear/temp/pear-build-defaultuserGBnDEj/imagick-3.7.0/libtool --tag=CC --mode=compile cc -I. -I/tmp/pear/temp/imagick -I/tmp/pear/temp/pear-build-defaultuserGBnDEj/imagick-3.7.0/include -I/tmp/pear/temp/pear-build-defaultuserGBnDEj/imagick-3.7.0/main -I/tmp/pear/temp/imagick -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -I/usr/include/ImageMagick-7  -DHAVE_CONFIG_H  -g -O2 -D_GNU_SOURCE   -I/usr/include/ImageMagick-7 -fopenmp -DMAGICKCORE_HDRI_ENABLE=1 -DMAGICKCORE_QUANTUM_DEPTH=16 -DMAGICKCORE_CHANNEL_MASK_DEPTH=32 -DZEND_COMPILE_DL_EXT=1 -c /tmp/pear/temp/imagick/imagick.c -o imagick.lo  -MMD -MF imagick.dep -MT imagick.lo
 cc -I. -I/tmp/pear/temp/imagick -I/tmp/pear/temp/pear-build-defaultuserGBnDEj/imagick-3.7.0/include -I/tmp/pear/temp/pear-build-defaultuserGBnDEj/imagick-3.7.0/main -I/tmp/pear/temp/imagick -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -I/usr/include/ImageMagick-7 -DHAVE_CONFIG_H -g -O2 -D_GNU_SOURCE -I/usr/include/ImageMagick-7 -fopenmp -DMAGICKCORE_HDRI_ENABLE=1 -DMAGICKCORE_QUANTUM_DEPTH=16 -DMAGICKCORE_CHANNEL_MASK_DEPTH=32 -DZEND_COMPILE_DL_EXT=1 -c /tmp/pear/temp/imagick/imagick.c -MMD -MF imagick.dep -MT imagick.lo  -fPIC -DPIC -o .libs/imagick.o
/bin/sh /tmp/pear/temp/pear-build-defaultuserGBnDEj/imagick-3.7.0/libtool --tag=CC --mode=compile cc -I. -I/tmp/pear/temp/imagick -I/tmp/pear/temp/pear-build-defaultuserGBnDEj/imagick-3.7.0/include -I/tmp/pear/temp/pear-build-defaultuserGBnDEj/imagick-3.7.0/main -I/tmp/pear/temp/imagick -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -I/usr/include/ImageMagick-7  -DHAVE_CONFIG_H  -g -O2 -D_GNU_SOURCE   -I/usr/include/ImageMagick-7 -fopenmp -DMAGICKCORE_HDRI_ENABLE=1 -DMAGICKCORE_QUANTUM_DEPTH=16 -DMAGICKCORE_CHANNEL_MASK_DEPTH=32 -DZEND_COMPILE_DL_EXT=1 -c /tmp/pear/temp/imagick/imagickkernel_class.c -o imagickkernel_class.lo  -MMD -MF imagickkernel_class.dep -MT imagickkernel_class.lo
 cc -I. -I/tmp/pear/temp/imagick -I/tmp/pear/temp/pear-build-defaultuserGBnDEj/imagick-3.7.0/include -I/tmp/pear/temp/pear-build-defaultuserGBnDEj/imagick-3.7.0/main -I/tmp/pear/temp/imagick -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -I/usr/include/ImageMagick-7 -DHAVE_CONFIG_H -g -O2 -D_GNU_SOURCE -I/usr/include/ImageMagick-7 -fopenmp -DMAGICKCORE_HDRI_ENABLE=1 -DMAGICKCORE_QUANTUM_DEPTH=16 -DMAGICKCORE_CHANNEL_MASK_DEPTH=32 -DZEND_COMPILE_DL_EXT=1 -c /tmp/pear/temp/imagick/imagickkernel_class.c -MMD -MF imagickkernel_class.dep -MT imagickkernel_class.lo  -fPIC -DPIC -o .libs/imagickkernel_class.o
/bin/sh /tmp/pear/temp/pear-build-defaultuserGBnDEj/imagick-3.7.0/libtool --tag=CC --mode=compile cc -I. -I/tmp/pear/temp/imagick -I/tmp/pear/temp/pear-build-defaultuserGBnDEj/imagick-3.7.0/include -I/tmp/pear/temp/pear-build-defaultuserGBnDEj/imagick-3.7.0/main -I/tmp/pear/temp/imagick -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -I/usr/include/ImageMagick-7  -DHAVE_CONFIG_H  -g -O2 -D_GNU_SOURCE   -I/usr/include/ImageMagick-7 -fopenmp -DMAGICKCORE_HDRI_ENABLE=1 -DMAGICKCORE_QUANTUM_DEPTH=16 -DMAGICKCORE_CHANNEL_MASK_DEPTH=32 -DZEND_COMPILE_DL_EXT=1 -c /tmp/pear/temp/imagick/shim_im6_to_im7.c -o shim_im6_to_im7.lo  -MMD -MF shim_im6_to_im7.dep -MT shim_im6_to_im7.lo
 cc -I. -I/tmp/pear/temp/imagick -I/tmp/pear/temp/pear-build-defaultuserGBnDEj/imagick-3.7.0/include -I/tmp/pear/temp/pear-build-defaultuserGBnDEj/imagick-3.7.0/main -I/tmp/pear/temp/imagick -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -I/usr/include/ImageMagick-7 -DHAVE_CONFIG_H -g -O2 -D_GNU_SOURCE -I/usr/include/ImageMagick-7 -fopenmp -DMAGICKCORE_HDRI_ENABLE=1 -DMAGICKCORE_QUANTUM_DEPTH=16 -DMAGICKCORE_CHANNEL_MASK_DEPTH=32 -DZEND_COMPILE_DL_EXT=1 -c /tmp/pear/temp/imagick/shim_im6_to_im7.c -MMD -MF shim_im6_to_im7.dep -MT shim_im6_to_im7.lo  -fPIC -DPIC -o .libs/shim_im6_to_im7.o
/bin/sh /tmp/pear/temp/pear-build-defaultuserGBnDEj/imagick-3.7.0/libtool --tag=CC --mode=link cc -shared -I/tmp/pear/temp/pear-build-defaultuserGBnDEj/imagick-3.7.0/include -I/tmp/pear/temp/pear-build-defaultuserGBnDEj/imagick-3.7.0/main -I/tmp/pear/temp/imagick -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -I/usr/include/ImageMagick-7  -DHAVE_CONFIG_H  -g -O2 -D_GNU_SOURCE    -o imagick.la -export-dynamic -avoid-version -prefer-pic -module -rpath /tmp/pear/temp/pear-build-defaultuserGBnDEj/imagick-3.7.0/modules  imagick_file.lo imagick_class.lo imagickdraw_class.lo imagickpixel_class.lo imagickpixeliterator_class.lo imagick_helpers.lo imagick.lo imagickkernel_class.lo shim_im6_to_im7.lo -lgomp -lMagickWand-7.Q16HDRI -lMagickCore-7.Q16HDRI
cc -shared  .libs/imagick_file.o .libs/imagick_class.o .libs/imagickdraw_class.o .libs/imagickpixel_class.o .libs/imagickpixeliterator_class.o .libs/imagick_helpers.o .libs/imagick.o .libs/imagickkernel_class.o .libs/shim_im6_to_im7.o  -lgomp -lMagickWand-7.Q16HDRI -lMagickCore-7.Q16HDRI  -Wl,-soname -Wl,imagick.so -o .libs/imagick.so
creating imagick.la
(cd .libs && rm -f imagick.la && ln -s ../imagick.la imagick.la)
/bin/sh /tmp/pear/temp/pear-build-defaultuserGBnDEj/imagick-3.7.0/libtool --tag=CC --mode=install cp ./imagick.la /tmp/pear/temp/pear-build-defaultuserGBnDEj/imagick-3.7.0/modules
cp ./.libs/imagick.so /tmp/pear/temp/pear-build-defaultuserGBnDEj/imagick-3.7.0/modules/imagick.so
cp ./.libs/imagick.lai /tmp/pear/temp/pear-build-defaultuserGBnDEj/imagick-3.7.0/modules/imagick.la
PATH="$PATH:/sbin" ldconfig -n /tmp/pear/temp/pear-build-defaultuserGBnDEj/imagick-3.7.0/modules
----------------------------------------------------------------------
Libraries have been installed in:
   /tmp/pear/temp/pear-build-defaultuserGBnDEj/imagick-3.7.0/modules

If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR'
flag during linking and do at least one of the following:
   - add LIBDIR to the `LD_LIBRARY_PATH' environment variable
     during execution
   - add LIBDIR to the `LD_RUN_PATH' environment variable
     during linking
   - use the `-Wl,--rpath -Wl,LIBDIR' linker flag

See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------

Build complete.
Don't forget to run 'make test'.

running: make INSTALL_ROOT="/tmp/pear/temp/pear-build-defaultuserGBnDEj/install-imagick-3.7.0" install
Installing shared extensions:     /tmp/pear/temp/pear-build-defaultuserGBnDEj/install-imagick-3.7.0/usr/local/lib/php/extensions/no-debug-non-zts-20230831/
Installing header files:          /tmp/pear/temp/pear-build-defaultuserGBnDEj/install-imagick-3.7.0/usr/local/include/php/
running: find "/tmp/pear/temp/pear-build-defaultuserGBnDEj/install-imagick-3.7.0" | xargs ls -dils
1580308      4 drwxr-xr-x    3 root     root          4096 Aug 15 18:29 /tmp/pear/temp/pear-build-defaultuserGBnDEj/install-imagick-3.7.0
1580353      4 drwxr-xr-x    3 root     root          4096 Aug 15 18:29 /tmp/pear/temp/pear-build-defaultuserGBnDEj/install-imagick-3.7.0/usr
1580354      4 drwxr-xr-x    4 root     root          4096 Aug 15 18:29 /tmp/pear/temp/pear-build-defaultuserGBnDEj/install-imagick-3.7.0/usr/local
1580359      4 drwxr-xr-x    3 root     root          4096 Aug 15 18:29 /tmp/pear/temp/pear-build-defaultuserGBnDEj/install-imagick-3.7.0/usr/local/include
1580360      4 drwxr-xr-x    3 root     root          4096 Aug 15 18:29 /tmp/pear/temp/pear-build-defaultuserGBnDEj/install-imagick-3.7.0/usr/local/include/php
1580361      4 drwxr-xr-x    3 root     root          4096 Aug 15 18:29 /tmp/pear/temp/pear-build-defaultuserGBnDEj/install-imagick-3.7.0/usr/local/include/php/ext
1580362      4 drwxr-xr-x    2 root     root          4096 Aug 15 18:29 /tmp/pear/temp/pear-build-defaultuserGBnDEj/install-imagick-3.7.0/usr/local/include/php/ext/imagick
1580363      4 -rw-r--r--    1 root     root          1828 Aug 15 18:29 /tmp/pear/temp/pear-build-defaultuserGBnDEj/install-imagick-3.7.0/usr/local/include/php/ext/imagick/php_imagick_shared.h
1580355      4 drwxr-xr-x    3 root     root          4096 Aug 15 18:29 /tmp/pear/temp/pear-build-defaultuserGBnDEj/install-imagick-3.7.0/usr/local/lib
1580356      4 drwxr-xr-x    3 root     root          4096 Aug 15 18:29 /tmp/pear/temp/pear-build-defaultuserGBnDEj/install-imagick-3.7.0/usr/local/lib/php
1580357      4 drwxr-xr-x    3 root     root          4096 Aug 15 18:29 /tmp/pear/temp/pear-build-defaultuserGBnDEj/install-imagick-3.7.0/usr/local/lib/php/extensions
1580358      4 drwxr-xr-x    2 root     root          4096 Aug 15 18:29 /tmp/pear/temp/pear-build-defaultuserGBnDEj/install-imagick-3.7.0/usr/local/lib/php/extensions/no-debug-non-zts-20230831
1580352   1424 -rwxr-xr-x    1 root     root       1457048 Aug 15 18:29 /tmp/pear/temp/pear-build-defaultuserGBnDEj/install-imagick-3.7.0/usr/local/lib/php/extensions/no-debug-non-zts-20230831/imagick.so

Build process completed successfully
Installing '/usr/local/include/php/ext/imagick/php_imagick_shared.h'
Installing '/usr/local/lib/php/extensions/no-debug-non-zts-20230831/imagick.so'
install ok: channel://pecl.php.net/imagick-3.7.0
configuration option "php_ini" is not set to php.ini location
You should add "extension=imagick.so" to php.ini
/ #
phoehnel commented 2 weeks ago

Got a pipeline building this every week. For me the first successful run was on 16th of July using the following dockerfile.

FROM php:8.3-apache-bullseye
ENV DEBIAN_FRONTEND=noninteractive
RUN set -e; apt-get update -y; \
    apt-get install -y  libonig-dev zlib1g zlib1g-dev apt-utils \
                        ca-certificates wget curl vim nano ssh \
                        default-mysql-client libfreetype6-dev \
                        libjpeg-dev libmagickwand-dev libpng-dev \
                        libzip-dev libldb-dev libldap2-dev libmagickcore-dev \
                        python3 python3-pip libaugeas0 cron \
                        libapache2-mod-auth-openidc; \
    docker-php-ext-install  mysqli bcmath exif gd opcache \
                            zip pdo_mysql ldap mbstring gettext xml; \
    pecl install imagick-3.7.0; \
    docker-php-ext-enable imagick
dinamic commented 2 weeks ago

@ErroneousBosch not sure why it works for you. It's still a fail for me - please find details at the pastebin link below.

I could see you're using x86_64, while I'm using aarch64. Could it be broken for arm64 only? 🤔

https://pastebin.com/w2dterQX

ErroneousBosch commented 2 weeks ago

@dinamic I definitely think the architecture here is the most likely part of the issue. It looks like @mashb1t was reporting the same error on an M1/ARM processor. Is @FedericoHeichou also on ARM?

FedericoHeichou commented 2 weeks ago

@dinamic I definitely think the architecture here is the most likely part of the issue. It looks like @mashb1t was reporting the same error on an M1/ARM processor. Is @FedericoHeichou also on ARM?

No, mine it is a amd64

tommmoe commented 2 weeks ago

Makes sense as to why it works on my ryzen but doesn't make sense as to why it doesn't work on my m5 EC2 instances, which should be Xenon and that should be amd64.. I'll check out what it's building tomorrow..

ErroneousBosch commented 1 week ago

So it now no longer works for me, neither on the alpine image nor in a debian bookworm image, on the same machine that it was working on before, same x86_64 install, with the same commands that have worked previously, and using the same version of imagick (3.7.0). tried removing the php:8.3-alpine image and repulling, still not working.

ErroneousBosch commented 1 week ago

I can confirm that the following does work in 8.3:

docker run -it --rm php:8.3-alpine sh
apk update
apk add imagemagick imagemagick-dev gcc make autoconf g++ git
cd /tmp 
git clone https://github.com/Imagick/imagick.git 
pecl install /tmp/imagick/package.xml 

This builds from the master git branch rather than the pre-packaged release, which is now over two and a half years old -- Jan 2022. I suspect that until/unless they put out a new release, this is the workaround.

bicpi commented 14 hours ago

In case this might helps someone else to get unblocked from imagick issues: we got independent of it by migrating our use cases to libvips, using the php-vips package. It works very well and is even faster while consuming less memory.

StrangePeanut commented 14 hours ago

@bicpi is that a drop in replacement for imagick? Alternatives have always existed but fail to pass imagick presence check which renders them useless for many of us.

bicpi commented 14 hours ago

@StrangePeanut No, it has a different API, see the docs. But after re-working, the imagick extension is not needed anymore.

But of course this is only possible when controlling all Imagick usage, not when dependent packages or e.g. a CMS requires it.

FedericoHeichou commented 13 hours ago

In case this might helps someone else to get unblocked from imagick issues: we got independent of it by migrating our use cases to libvips, using the php-vips package. It works very well and is even faster while consuming less memory.

Seems cool. If it is really as described would be nice to create a wrapper