You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Skia explicitly recommends against static linking or bundling dynamic libraries for production builds.
This can cause issues with libraries like libfontconfig that depend on configuration files found in the system. For example, modern Debian installs a config file at /usr/share/fontconfig/conf.avail/05-reset-dirs-sample.conf that is incompatible with the older version of libfontconfig bundled with skia-python, causing a warning:
Fontconfig warning: "/usr/share/fontconfig/conf.avail/05-reset-dirs-sample.conf", line 6: unknown element "reset-dirs"
How these get bundled
The present build system for skia-python causes this through two location. First, Skia is told not to use system packages when being built:
Second, cibuildwheel will run auditwheel on any manylinux wheel. This where these dependencies get grafted into the wheel.
Possible solutions
Do nothing, possibly document that manylinux wheels will use outdated versions of these libraries.
Drop manylinux2014 in favor of a newer PEP600 version based on glibc, possibly manylinux_2_36 (which covers contemporary distros like Debian 12). This would result in newer version being bundled, but wouldn't completely resolve the issue.
Change the configuration to dynamically link to system versions of these libraries. This would require users to ensure these packages are installed (which is already done in the docs). This would lead to some users running into issues if they blindly install skia-python without the necessary packages.
Overview
At the moment,
skia-pythonincludes several dynamic library dependencies in its manylinux wheel:This is convenient since it reduces the number of system packages that a user needs to install, but it has some serious drawbacks:
libfontconfigthat depend on configuration files found in the system. For example, modern Debian installs a config file at/usr/share/fontconfig/conf.avail/05-reset-dirs-sample.confthat is incompatible with the older version oflibfontconfigbundled withskia-python, causing a warning:How these get bundled
The present build system for
skia-pythoncauses this through two location. First, Skia is told not to use system packages when being built:https://github.com/kyamagu/skia-python/blob/db7d7fcc84dc5e59ea8a925457f2d319a57052df/scripts/build_Linux.sh#L71-L76
Second, cibuildwheel will run
auditwheelon anymanylinuxwheel. This where these dependencies get grafted into the wheel.Possible solutions
manylinuxwheels will use outdated versions of these libraries.manylinux2014in favor of a newer PEP600 version based onglibc, possiblymanylinux_2_36(which covers contemporary distros like Debian 12). This would result in newer version being bundled, but wouldn't completely resolve the issue.skia-pythonwithout the necessary packages.Version comparison