-
-
Notifications
You must be signed in to change notification settings - Fork 144
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
Fix installation error "Unterminated preprocessor conditions" in php 8.3 #641
Fix installation error "Unterminated preprocessor conditions" in php 8.3 #641
Conversation
Could this please be merged? :)
|
Can this please be merged? All our pipelines are failing building Docker Images because of this. Thank you |
Until this gets merged, I am using a workaround in my automated builds to explicitly fix the PHP version to 8.2. This is suggested by Composer:
In my Dockerfile I had:
I've updated it to copy Composer from their image into a PHP 8.2 image in order to build with that version:
|
I guess it is fixed already on master at 3.7.0...master#diff-f25e44a5ebd6936312bc52ad6c2fd5b830e30300b56457baec2168e59156269cR1272 but didn't make it into the release yet. The commit was at 5ae2ecf |
No, it is a commit for a typo in another non-merged commit. Check the current file in master, that endif is for another "if". The problematic endif is the one (missing) which should close the first if opened in the file. I found out debugging the script which processes those files, it now keep tracks of every opened "if" like a stack |
are you sure about your PR? I counted 130 The first |
Yes I am, I'm currently using this patch, I debugged it adding var_dump in the function which checks if those comments are correctly closed. If you want to try it download the diff file, create your own package and try it (not sure if commands are correct, this is just a example, I have already a tgz and I use it)
|
Hi @Danack, could you please review and merge this if you're happy? It's a 1 line change that fixes support for the recent stable PHP 8.3 release |
Pending an upstream fix being merged here: Imagick/imagick#641
still doesn't work, I had to roll back to php 8.2 |
It is not possible, you did something else wrong |
I can confirm that I was able to build imagick for php 8.3 arch64 using this branch 👌 |
remove this after Imagick/imagick#641 has been merged and released.
a major change for 8.3 docker tags onwards: * nodejs no longer will be set up with a default version, however nvm will remain to allow installation * mcrypt no longer will be enabled by default, as it is long past EOL, and frameworks must have moved away from it by now extensions not yet supported: * imagick - bug fix `https://github.com/Imagick/imagick/pull/641` needed * mcrypt - needs a release allowing 8.3.0 stable
I've got it up and running smoothly for PHP 8.3! Can't wait for the merge 🙏 |
Any plan about when this PR will be merged ? |
How about starting with the approval of the workflow-action :) ? |
Weird, but I'm getting an error when trying to build
The code I'm using: RUN git clone https://github.com/Imagick/imagick.git --depth 1 /tmp/imagick && \
cd /tmp/imagick && \
git fetch origin pull/641/head:fix-unterminated-preprocessor-conditions && \
git switch fix-unterminated-preprocessor-conditions
RUN cd /tmp/imagick && \
phpize && \
./configure && \
make && \
make install
RUN docker-php-ext-enable imagick UPD. Just tried building |
I have the same issue. This is what @en-jschuetze said in #641 (comment) The missing This PR re-add a new |
We kept the pecl install based on imagick and it seems to not fail anymore (at least on the seldom executions we perform at https://github.com/Endava/docker-php right now.
This sounds like a good way if pecl build is creating transient errors - try without it. Keep in mind my alpine build for 3.7.0 with aarch64 worked all the time, just the amd64 build was randomly crashing. *unsubscribing |
I can confirm that this Commit resolved the issue which was introduced with ba2949cb in Imagick.stup.php Line 1388 to 1402 Therefore its already fixed, just not released yet. |
Guys, Danack is back. He commented in the linked issue. He is now checking if everything is ok and will tag a version soon. When this will happen and I can confirm everything is ok too I will close this broken PR. We did it 🙏 |
This are great news - thanks @FedericoHeichou |
Remove imagick extension, since it has a bug (see Imagick/imagick#641)
I had some trouble on this today, so it seems like the fix is still not released. |
Hello everyone, I was using Imagick to compress and optimize images but with the lack of tracking I migrated to php GD. Have a nice day. |
Gmagick allegedly works as a drop-in replacement, but unfortunately some apps specifically require Imagick 😢 |
Well I also think, if this takes longer and longer here, all this apps will start switching... in most cases it's already today possible to switch between gd and imagick in most plugins - I also switched to gd in meanwhile... and as soon as the used libraries support gmagick, I'll switch again... |
Also affected by the issue. How can this be unresolved for over three months now although the issue itself is already fixed? |
We are also affected by this, could we get this merged? |
Well, someone has to tag a version. And it seems that the only one, that can do this is @Danack. |
Guys, please stop bumping this, as Danack is aware of this and provided feedback. He worked on the CI setup, it'll be done when it's done. Poking him multiple times won't get us closer, it can actually work the other way around. Just let him finish this when he has time for it (for those who are unaware, as far as I know he had some health problems, so OSS work is not his priority right now, rightfully). Just leave 👍 reaction in the related issue or here, and wait patiently (or at least ask how you can help with preparing the release, instead of demanding the solution). PS. @FedericoHeichou maybe it would be better to close this PR as it won't be merged anyway, since the fix is already in the main branch. As of now, it's mostly the place for miscommunication and misunderstanding of the current state of an issue. |
I think we all understand that in this case OSS work is not a priority but in this case maybe the solution would be to find other maintainers to help him doing this. We are many affected by this problem from months and are unable move to php 8.3 specificaly on arm architecture because of this. |
You can always use the master branch (this is what we do). Its compatible with PHP 8.3 and works fine. |
Just for the record, that's how we work around this issue in GH-actions and PHP 8.3 only: |
when will be it fixed? |
We also need this fix asap pls, our php8.3 pipelines are crashing due to this 👀 |
@jamesRUS52 @Erik-Hoffmann please read this. You also have workarounds provided here and here, so again: read the freaking thread before commenting 🙄. @FedericoHeichou (or @Danack, sorry for pinging), please let's close this PR as it's misleading people that it requires merge, when it's not. |
Yes I agree, because Danack seen the thread and the PR. Let's comment the Issue #640 guys, there are no reasons to keep commenting here. |
when is this going to be fixed in a 3.7.1 release? |
For anyone facing this issue in your docker
|
That doesn't work for me in Docker, but the many examples in #640 with references to the specific git commit works. |
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
Resolves #640
Edit: this branch uses the wrong parent (it starts from master instead of 3.7.0) furthermore the endif I added is technically in wrong position (the correct one is commented here
imagick/Imagick.stub.php
Line 1249 in 52ec37f
imagick/Imagick.stub.php
Line 1236 in 52ec37f
If you want to use it I suggest to get the diff file and apply it directly to the 3.7.0 code (you can download it runtime even with pecl and apply the patch).
Anyway this should not be merged in master, I'll keep this open just to keep this problem in evidence