Broken link to libimagequant.so in py3-pillow
Problem
I'm trying to use the Lollypop music player on postmarketOS edge, which pulls most packages from Alpine edge. As of today it crashes on startup with this traceback:
Traceback (most recent call last):
File "/usr/bin/lollypop", line 43, in <module>
from lollypop.application import Application
File "/usr/lib/python3.10/site-packages/lollypop/application.py", line 36, in <module>
from lollypop.artwork import Artwork
File "/usr/lib/python3.10/site-packages/lollypop/artwork.py", line 17, in <module>
from lollypop.artwork_manager import ArtworkManager
File "/usr/lib/python3.10/site-packages/lollypop/artwork_manager.py", line 15, in <module>
from PIL import Image, ImageFilter
File "/usr/lib/python3.10/site-packages/PIL/Image.py", line 100, in <module>
from . import _imaging as core
ImportError: Error loading shared library libimagequant.so: No such file or directory (needed by /usr/lib/python3.10/site-packages/PIL/_imaging.cpython-310-aarch64-linux-gnu.so)
Installed package versions are py3-pillow-9.2.0-r1
and libimagequant-4.0.1-r0
, I noticed both are very fresh.
Minimal Reproducer
$ python3
Python 3.10.5 (main, Jun 7 2022, 23:03:07) [GCC 11.2.1 20220219] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import PIL.Image
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python3.10/site-packages/PIL/Image.py", line 100, in <module>
from . import _imaging as core
ImportError: Error loading shared library libimagequant.so: No such file or directory (needed by /usr/lib/python3.10/site-packages/PIL/_imaging.cpython-310-aarch64-linux-gnu.so)
Workaround
Creating a symlink to the installed libimagequant makes the problem go away, Lollypop launches and works fine, and the import
in the reproducer works, too.
doas ln -s /usr/lib/libimagequant.so.0 /usr/local/lib/libimagequant.so
I assume either libimagequant should provide the symlink itself, or py3-pillow should link against the versioned library.