Workaround for the latest php version #56

Open
opened 2025-01-07 19:35:38 +00:00 by Evhorizon · 2 comments

After upgrading php to 8.4 on Arch I had a bad suprise: the acpu and imagick extension were not working anymore, it looks like they are not yet compatible with the new php release. I found a workaround for acpu uninstalling the php-acpu Arch extension and using the internal php installer (pecl). First, you have to install the php-pear package from the AUR and then use:
# pecl install acpu
However, trying to uninstall php-imagick and install imagick this way failed, because the extension hasn't been fixed upstream and who knows when and if it will (the devs have been inactive for ages). Luckily, I found a pull release on the imagick github repo itself, but it hasn't been merged, so I had to apply the patch myself to the source like that:

  1. # pecl install imagick
  2. when the install process returns:
    Please provide the prefix of ImageMagick installation [autodetect] :
    you have to open the imagick.c file in the source, downloaded to /run/tmp/pear/temp/imagick/ and replace the content with the patch:
    65e27f2bc0/imagick.c
  3. Hit enter and the extension will be built successfully.
After upgrading php to 8.4 on Arch I had a bad suprise: the acpu and imagick extension were not working anymore, it looks like they are not yet compatible with the new php release. I found a workaround for acpu uninstalling the php-acpu Arch extension and using the internal php installer (pecl). First, you have to install the php-pear package from the AUR and then use: `# pecl install acpu` However, trying to uninstall php-imagick and install imagick this way failed, because the extension hasn't been fixed upstream and who knows when and if it will (the devs have been inactive for ages). Luckily, I found a pull release on the imagick github repo itself, but it hasn't been merged, so I had to apply the patch myself to the source like that: 1) `# pecl install imagick` 2) when the install process returns: `Please provide the prefix of ImageMagick installation [autodetect] :` you have to open the imagick.c file in the source, downloaded to `/run/tmp/pear/temp/imagick/` and replace the content with the patch: https://github.com/Imagick/imagick/blob/65e27f2bc02e7e8f1bf64e26e359e42a1331fca1/imagick.c 3) Hit enter and the extension will be built successfully.
Owner

Thank you for your investigation. I'll merge your findings in the arch guide

Thank you for your investigation. I'll merge your findings in the arch guide
Author

Thanks to you @lolcat , the Arch guys have already pushed a fix for apcu to their testing repos. I have opened an issue on their gitlab suggesting my fix for php-imagick and I'll keep you updated in case they push a new release for that too.

Thanks to you @lolcat , the Arch guys have already pushed a fix for apcu to their testing repos. I have opened an issue on their gitlab suggesting my fix for php-imagick and I'll keep you updated in case they push a new release for that too.
Sign in to join this conversation.
No Label
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: lolcat/4get#56
No description provided.