I did a simple "pkg upgrade" and this happened: ImageMagick7 upgraded: 7.1.1.26_3 -> 7.1.1.26_4 but pecl-imagick did -not- upgrade, staying at PORTREVISION 3 ... which is what was previously installed. Thus when restarting php-fpm, this happened: PHP Warning: PHP Startup: Unable to load dynamic library 'imagick.so' (tried: /usr/local/lib/php/20210902/imagick.so (/usr/local/lib/libMagickWand-7.so.10: version VERS_10.0 required by /usr/local/lib/php/20210902/imagick.so not defined), /usr/local/lib/php/20210902/imagick.so.so (Cannot open "/usr/local/lib/php/20210902/imagick.so.so")) in Unknown on line 0 So I suspect a simple PORTREVISION bump is all that is needed to fix this issue in the ports tree. For those coming from a search engine, I fixed this by uninstalling and reinstalling the pecl-imagick package.
(In reply to Dave Hayes from comment #0) If the version of ImageMagick remains the same (7.1.1.26) and only PORTREVISION has changed, then I think the version number of the library /usr/local/lib/libMagickWand-7.so.10 should remain the same on a filesystem. Can you send the output of ls -l /usr/local/lib/libMagick* I am short on time at this moment so if anybody else can check / test this and confirm PORTREVISION bump of pecl-imagick is required please do it!
From the VERS_10.0, I presume that this value is received from inside the shared library, not from the filename. Here is the output you requested: > ls -l /usr/local/lib/libMagick* -rw-r--r-- 1 root wheel 1142932 Jul 21 12:49 /usr/local/lib/libMagick++-7.a -rwxr-xr-x 1 root wheel 976 Jul 21 12:49 /usr/local/lib/libMagick++-7.la* lrwxr-xr-x 1 root wheel 22 Jul 21 12:49 /usr/local/lib/libMagick++-7.so@ -> libMagick++-7.so.5.0.0 lrwxr-xr-x 1 root wheel 22 Jul 21 12:49 /usr/local/lib/libMagick++-7.so.5@ -> libMagick++-7.so.5.0.0 -rwxr-xr-x 1 root wheel 673656 Jul 21 12:49 /usr/local/lib/libMagick++-7.so.5.0.0* -rw-r--r-- 1 root wheel 5295388 Jul 21 12:49 /usr/local/lib/libMagickCore-7.a -rwxr-xr-x 1 root wheel 994 Jul 21 12:49 /usr/local/lib/libMagickCore-7.la* lrwxr-xr-x 1 root wheel 25 Jul 21 12:49 /usr/local/lib/libMagickCore-7.so@ -> libMagickCore-7.so.10.0.1 lrwxr-xr-x 1 root wheel 25 Jul 21 12:49 /usr/local/lib/libMagickCore-7.so.10@ -> libMagickCore-7.so.10.0.1 -rwxr-xr-x 1 root wheel 2950680 Jul 21 12:49 /usr/local/lib/libMagickCore-7.so.10.0.1* -rw-r--r-- 1 root wheel 2543478 Jul 21 12:49 /usr/local/lib/libMagickWand-7.a -rwxr-xr-x 1 root wheel 994 Jul 21 12:49 /usr/local/lib/libMagickWand-7.la* lrwxr-xr-x 1 root wheel 25 Jul 21 12:49 /usr/local/lib/libMagickWand-7.so@ -> libMagickWand-7.so.10.0.1 lrwxr-xr-x 1 root wheel 25 Jul 21 12:49 /usr/local/lib/libMagickWand-7.so.10@ -> libMagickWand-7.so.10.0.1 -rwxr-xr-x 1 root wheel 1323448 Jul 21 12:49 /usr/local/lib/libMagickWand-7.so.10.0.1*
since `pkg install -f php81-pecl-imagick-3.7.0_3` fixes the issue, I would assume that the problem would go away with a portrevision bump, because that would let pkg take care of the pseudo-upgrade/reinstall.
(In reply to FiLiS from comment #3) I would really like to understand more about the root cause of the problem. If reinstalling solved the problem, what changed? The file names of the installed libraries remained the same. The versions remain the same. How about "service ldconfig restart" instead of reinstalling?
So to be clear: - The ImageMagick7 package did get upgraded, which means "built" (via poudriere) and "reinstalled" (via package upgrade) - The pecl-imagick package got built, but my theory is that because PORTREVISION didn't change, pkg did not upgrade it. The evidence to support this theory is that there is no log of it being upgraded when I upgraded everything else. - When I bumped PORTREVISION by one, and rebuilt just pecl-imagick, then pkg upgrade found the new package and installed it. I do not believe "service ldconfig restart" would work in this case, because the old pecl-imagick package expected one version of ImageMagick7 which was de-installed due to the pkg upgrade. The newer version of ImageMagick7 got installed, which was incompatible with the old version of pecl-imagick. Does this help? :)
Created attachment 253036 [details] bump PORTREVISION=4 I am sorry for the delay. I can finally confirm the problem in my test environment. Attached is the patch with bumped PORTREVISION. Thank you for the detailed bug report.
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=7407e38cec60a15d8f6254f5e9aeae7450eb19ee commit 7407e38cec60a15d8f6254f5e9aeae7450eb19ee Author: Miroslav Lachman <000.fbsd@quip.cz> AuthorDate: 2024-09-03 05:34:46 +0000 Commit: Zsolt Udvari <uzsolt@FreeBSD.org> CommitDate: 2024-09-03 05:36:47 +0000 graphics/pecl-imagick: bump PORTREVISION Bump PORTREVISION after ImageMagick7 upgrade. PR: 280756 Reported by: Dave Hayes <dave@jetcafe.org> Approved by: submitter is maintainer graphics/pecl-imagick/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
(In reply to commit-hook from comment #7) Merge to Quarterly needed! 2024Q3 has ImageMagick7 7.1.1.26_4 - the same as in HEAD, which required revision bump in pecl-imagick. Merge was requested by Flags.
A commit in branch 2024Q3 references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=55fa942c3b87670d48214091615a3554fbe939c1 commit 55fa942c3b87670d48214091615a3554fbe939c1 Author: Miroslav Lachman <000.fbsd@quip.cz> AuthorDate: 2024-09-03 05:34:46 +0000 Commit: Zsolt Udvari <uzsolt@FreeBSD.org> CommitDate: 2024-09-05 18:15:04 +0000 graphics/pecl-imagick: bump PORTREVISION Bump PORTREVISION after ImageMagick7 upgrade. PR: 280756 Reported by: Dave Hayes <dave@jetcafe.org> Approved by: submitter is maintainer (cherry picked from commit 7407e38cec60a15d8f6254f5e9aeae7450eb19ee) graphics/pecl-imagick/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
(In reply to Miroslav Lachman from comment #8) Sorry, I forgot it.
(In reply to Zsolt Udvari from comment #10) Thank you for the quick fix.
Hi, for Nextcloud I need this package : php83-pecl-imagick-3.7.0_4 Nextcloud seems not happy : php occ update:check PHP Warning: PHP Startup: Unable to load dynamic library 'imagick.so' (tried: /usr/local/lib/php/20230831/imagick.so (/usr/local/lib/libMagickWand-7.so.10: version VERS_10.0 required by /usr/local/lib/php/20230831/imagick.so not defined), /usr/local/lib/php/20230831/imagick.so.so (Cannot open "/usr/local/lib/php/20230831/imagick.so.so")) in Unknown on line 0
(In reply to Michel Le Cocq from comment #12) @Miroslav?
(In reply to Michel Le Cocq from comment #12) I am sorry I was out of computer for a few weeks. What was installed / updated that caused this error? Did you somehow upgraded ImageMagick? Your error looks the same as was before the last portrevision bump.
The root cause of this problem is still unclear. As Miroslav correctly noticed, a mere PORTREVISION bump on ImageMagick should not break its ABI.