-
-
Notifications
You must be signed in to change notification settings - Fork 145
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
Install error "Unterminated preprocessor conditions" in php 8.3 #640
Comments
Just had the same issue happening. Here are steps to reproduce:
|
Any solution? |
@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 |
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 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. |
@Danack so happy to hear from you! I hope things are okay. The issue is easily reproducible with a docker container:
|
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. |
any update on when this issue will be fixed? |
having the same issue in PHP 8.3 (running on M1/arm and Docker) |
Remove `imagick` dependency from Docker image as not strictly required (dompdf/dompdf#3376) and to resolve issue with PHP 8.3 (Imagick/imagick#640).
* Remove Docker image imagick dependency Remove `imagick` dependency from Docker image as not strictly required (dompdf/dompdf#3376) and to resolve issue with PHP 8.3 (Imagick/imagick#640). * Update Docker image to PHP 8.3 * Move GD to required PHP extensions
Not have updates? |
Same issue here |
A small recap: the issue is fixed on
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 |
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. |
Sometimes it works, sometimes it doesn't strange bug |
Imagick Fails when using `--no-cache --ci`: Imagick/imagick#640
For everybody who is using mlocati/php-extension-installer
nevertheless: it's only a workarround in my opinion. 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. |
Building `imagick` is currently unstable. See Imagick/imagick#640 (comment)
bumping for visibility. I am waiting for imagick to upgrade my websites to php 8.3. Hope this gets resolved soon 🙏 WHM OS |
Got a pipeline building this every week. For me the first successful run was on 16th of July using the following dockerfile.
|
@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? 🤔 |
@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 |
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.. |
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. |
I can confirm that the following does work in 8.3:
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 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. |
@StrangePeanut No, it has a different API, see the docs. But after re-working, the But of course this is only possible when controlling all Imagick usage, not when dependent packages or e.g. a CMS requires it. |
Seems cool. If it is really as described would be nice to create a wrapper |
I also wanted to report that imagick sometimes builds correctly on php 8.3 bookworm image. The last month it seems to have been building correctly almost every time. |
I managed to get this working on Amazon Linux 2023 with PHP 8.3. Here is the docker file for anybody who might need it!
|
This seems to be completely random. |
I would not recommend you guys installing Instead I may suggest you to install package not from branch but commit:
This approach guarantees that every your environment now and later will receive the same version of imagick and their new code will not break your deployment process. https://github.com/mlocati/docker-php-extension-installer |
Thanks @ilyahoilik - I didn't realize it installed from the repo's master/main like that. However, looking at the "master" branch in imagick/imagick, the last commit was "last year", so it still doesn't make sense that it "randomly breaks". Or am I missing something here? :) |
@ghnp5 ooops, I didn't look up to commit date, thought master branch updates regularly. My fault, sorry :) Anyway you can use my suggestion to install specific commit from any branch |
After an update of the
|
Sorry for adding another bump to this, but can we please get a new version released so that we can finally install this extension via PECL for PHP 8.3? @Danack |
Complete workaround, that worked for me (with pinned versions): FROM docker.io/library/php:8-fpm
ADD --chmod=0755 \
https://github.com/mlocati/docker-php-extension-installer/releases/download/2.6.3/install-php-extensions \
/usr/local/bin/
# TODO: Use latest released version, after https://github.com/Imagick/imagick/issues/640 is fixed
RUN install-php-extensions imagick/imagick@28f27044e435a2b203e32675e942eb8de620ee58 |
The first if condition in
Imagick.stub.php
is not closedimagick/Imagick.stub.php
Lines 5 to 8 in 28f2704
This causes a installation error "Unterminated preprocessor conditions" in PHP 8.3
I'll submit a PR
The text was updated successfully, but these errors were encountered: