FS#79356 - [php-imagick] Fails to load with php 8.2.9-2

Attached to Project: Arch Linux
Opened by Andreas (bjoe2k4) - Saturday, 12 August 2023, 12:25 GMT
Last edited by Toolybird (Toolybird) - Sunday, 13 August 2023, 20:49 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To David Runge (dvzrv)
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

Description: After the update to php 8.2.9-2, imagick can no longer be loaded and fails with the following error:

PHP Warning: PHP Startup: Unable to load dynamic library 'imagick' (tried: /usr/lib/php/modules/imagick (/usr/lib/php/modules/imagick: cannot open shared object file: No such file or directory), /usr/lib/php/modules/imagick.so (/usr/lib/php/modules/imagick.so: undefined symbol: php_strlcpy)) in Unknown on line 0

Additional info:
* package version: 3.7.0-4
* config as is after installation, except "extension=imagick" uncommented/enabled in "/etc/php/conf.d/imagick.ini"

Steps to reproduce (on a fresh installation):

- pacman -Syu
- pacman -S php php-imagick
- execute php on the console and Warning appears
This task depends upon

Closed by  Toolybird (Toolybird)
Sunday, 13 August 2023, 20:49 GMT
Reason for closing:  Fixed
Additional comments about closing:  php 8.2.9-3
php-legacy 8.1.22-2
Comment by Toolybird (Toolybird) - Saturday, 12 August 2023, 22:50 GMT
(haven't looked too deeply...so I could easily be talking rubbish here :)

php 8.2.9-1 was compiled against glibc-2.37, php 8.2.9-2 was compiled against glibc-2.38

From the glibc-2.38 release notes:

"The strlcpy and strlcat functions have been added. They are derived
from OpenBSD, and are expected to be added to a future POSIX version."

From the php 8.2.9-2 build log:

"checking for strlcat... yes
checking for strlcpy... yes"

Maybe php-imagick just needs a recompile?
Comment by Axel B (urmel77) - Saturday, 12 August 2023, 23:19 GMT
php-legacy-imagick 3.7.0-4 is also affected (or brings up the same php error/warning)
Comment by Pierre Schmitz (Pierre) - Sunday, 13 August 2023, 06:13 GMT
This is unexpected. I'll probably push a new PHP release built with the older glibc so we can manage the required rebuilds in a more organized way.
Comment by Pierre Schmitz (Pierre) - Sunday, 13 August 2023, 06:39 GMT
php 8.2.9-3 and php-legacy 8.1.22-2 are now rebuilt with glibc 2.37
Comment by Andreas (bjoe2k4) - Sunday, 13 August 2023, 09:55 GMT
Thanks, both php and php-legacy version of imagick are working now.