Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AppImage packaging is either too leaky or not leaky enough #93

Open
CounterPillow opened this issue May 9, 2018 · 11 comments
Open

AppImage packaging is either too leaky or not leaky enough #93

CounterPillow opened this issue May 9, 2018 · 11 comments

Comments

@CounterPillow
Copy link

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.

@probonopd
Copy link
Contributor

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 AppImageCommunity/pkg2appimage@9082bbe

References:

@tracernz
Copy link

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

@buddyabaddon
Copy link

buddyabaddon commented Sep 2, 2018

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
File "./PrusaControl-master/controller.py", line 21, in
ImportError: /usr/lib64/libfontconfig.so.1: undefined symbol: FT_Done_MM_Var
$ equery l fontconfig
* Searching for fontconfig ...
[IP-] [ ] media-libs/fontconfig-2.13.0-r4:1.0
$ equery l freetype
* Searching for freetype ...
[IP-] [ ] media-libs/freetype-2.9.1-r3:2

@probonopd
Copy link
Contributor

@tracernz @buddyabaddon which OS and version are you on? I think I gave the solution in #93 (comment), can you confirm?

@castaway
Copy link

@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?

@probonopd
Copy link
Contributor

@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

@castaway
Copy link

./squashfs-root/AppRun

Aha! Done, and yes that now runs just fine, thanks!

Can I repack it easily from this state?

@probonopd
Copy link
Contributor

probonopd commented Oct 21, 2018

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 

@castaway
Copy link

wget -c "https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage"

AppImage of the AppImage tool, of course!

@tak-21
Copy link

tak-21 commented Feb 24, 2019

@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"?

@probonopd
Copy link
Contributor

probonopd commented Feb 24, 2019

You need to launch it through a desktop file. Tools like the optional appimaged daemon or AppImageLauncher can do this for you automatically.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants