PrusaControl
PrusaControl copied to clipboard
AppImage packaging is either too leaky or not leaky enough
On Arch Linux:
$ ./prusacontrol_0.9.4.415_beta.AppImage
Traceback (most recent call last):
File "./PrusaControl-master/main.py", line 10, in <module>
File "./PrusaControl-master/controller.py", line 21, in <module>
ImportError: /usr/lib/libfontconfig.so.1: undefined symbol: FT_Done_MM_Var
$ objdump -T /usr/lib/libfontconfig.so.1 | grep FT_Done_MM_Var
0000000000000000 DF *UND* 0000000000000000 FT_Done_MM_Var
Either include all of your dependencies or none of them.
Specifically, either bundle both of or none of Harfbuzz and FreeType. At least this seems to be the conclusion from earlier discussions. In the https://github.com/AppImage/AppImages/ project we no longer bundle libharfbuzz and libfreetype as per https://github.com/AppImage/AppImages/commit/9082bbe3b924b656d8675da64a69c6b2b32ac7b4
References:
- https://github.com/AppImage/AppImages/pull/323
- https://github.com/probonopd/linuxdeployqt/issues/261#issuecomment-377522251
- https://github.com/probonopd/linuxdeployqt/issues/157#issuecomment-320755694
Also hitting this.
$ ./prusacontrol_0.9.4.415_beta.AppImage
Traceback (most recent call last):
File "./PrusaControl-master/main.py", line 10, in <module>
File "./PrusaControl-master/controller.py", line 21, in <module>
ImportError: /usr/lib/libfontconfig.so.1: undefined symbol: FT_Done_MM_Var
$ pacman -Q fontconfig
fontconfig 2.13.0+10+g58f5285-1
$ objdump -T /usr/lib/libfontconfig.so.1 | grep FT_Done_MM_Var
0000000000000000 DF *UND* 0000000000000000 FT_Done_MM_Var
$ pacman -Q freetype2
freetype2 2.9.1-1
$ objdump -T /usr/lib/libfreetype.so | grep FT_Done_MM_Var
000000000001c150 g DF .text 0000000000000026 Base FT_Done_MM_Var
I am also hitting this error :(
$ ./prusacontrol_0.9.4.415_beta.AppImage
Traceback (most recent call last):
File "./PrusaControl-master/main.py", line 10, in
@tracernz @buddyabaddon which OS and version are you on? I think I gave the solution in https://github.com/prusa3d/PrusaControl/issues/93#issuecomment-387810764, can you confirm?
@tracernz @buddyabaddon which OS and version are you on? I think I gave the solution in #93 (comment), can you confirm?
How do we confirm this? Personally I'm just running the AppImage, not building it.. or did I misunderstand your suggestion?
@castaway you could extract the AppImage, remove the libraries, and try if the application runs then:
# Download the AppImage
wget -c "https://github.com/prusa3d/PrusaControl/releases/download/v0.9.4/PrusaControl_0.9.4_415_beta_64bit.AppImage"
# Make the AppImage executable
chmod +x PrusaControl_0.9.4_415_beta_64bit.AppImage
# Extract the contents of the AppImage
./PrusaControl_0.9.4_415_beta_64bit.AppImage --appimage-extract
# Delete the library in question
find squashfs-root/ -iname '*freetype*' -delete
# Run the extracted AppImage to see if the error is resolved
./squashfs-root/AppRun
./squashfs-root/AppRun
Aha! Done, and yes that now runs just fine, thanks!
Can I repack it easily from this state?
Easy:
# Get appimagetool
wget -c "https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage"
# Make it executable
chmod +x appimagetool-x86_64.AppImage
# Convert AppDir into AppImage
./appimagetool-x86_64.AppImage squashfs-root/
# Test whether it works
./PrusaControl-x86_64.AppImage
wget -c "https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage"
AppImage of the AppImage tool, of course!
@probonopd: thx!!! One more question please: Under Ubuntu 18.10 with gnome I can right-click the app and add it as a favourit. When I click this icon which was added to the bar, the program starts and/but there is another icon showing up which represents the now running program. This behaviour is different when I start e.g. firefox. It is just cosmetics but can this be "fixed"?
You need to launch it through a desktop file. Tools like the optional appimaged daemon or AppImageLauncher can do this for you automatically.