-
Notifications
You must be signed in to change notification settings - Fork 24
Description
Hi. I was really curious about AppImage, and somehow this was one of the first apps that showed up on Google.
Problem
I have downloaded and chmod +x
AppImage executable. It failed. The error was the infamous /usr/lib/libfontconfig.so.1: undefined symbol: FT_Done_MM_Var
.
Figuring it out was easy, because there were plenty of people experiencing it across AppImage ecosystem. Basically, it turned out that AppImage packaged only direct dependencies (required by linked), except some blacklisted ones. But there is a dynamic Qt plugin, namely libqxcb.so
which links to libfontconfig.so.1
which in turn pulls libfreetype.so.6
.
Since FontConfig is not a direct dependency, it wasn't backed into *.appimage
, so newer version from my system was found. Consider it a "dependency leak" — things like this used to happen a lot in Python virtualenv ecosystem. Now, FreeType is somehow required by the app, and the older version was bundled alongside with the executable, and eventually found by linker when loading FontConfig.
My FontConfig was built against my FreeType, so together they work just great. But the older FreeType from an *.AppImage
does not contain necessary modern symbols (like FT_Done_MM_Var
), so it fails to link.
Solution
Rebuild.
In the AppImage tooling community, they decided it would be better to not package font-related stuff at all, so libharfbuzz and libfreetype got blacklisted as well. So, just rebuilding with latest tooling should do.
Alternatively, just remove libfreetype.so.6
from the bundle per this instruction: prusa3d/PrusaControl#93 (comment).
Resources
- No longer bundle libharfbuzz and libfreetype AppImageCommunity/pkg2appimage#323
- https://bugs.kde.org/show_bug.cgi?id=392307
- Created in Debian Jessie, Got undefined symbol error in Fedora probonopd/linuxdeployqt#157
- AppImage packaging is either too leaky or not leaky enough prusa3d/PrusaControl#93
- libfontconfig.so.1: undefined symbol: FT_Done_MM_Var prusa3d/PrusaControl#115