AppImage build breaks the executable

138 views
Skip to first unread message

Giacomo Furlan

unread,
Apr 1, 2021, 12:43:15 PM4/1/21
to PyInstaller

Hello everybody,

I'm  developing a Python + Qt5 application and I'm building it via PyInstaller.

Today I tried setting up an AppImage via appimage-builder. The problem is that while the dist executable works fine, when I pass it through the appimage-builder it will complain about "[25] Cannot open self /app/usr/bin/AWSGlueManager or archive /app/usr/bin/AWSGlueManager.pkg"

If I strace the AppRun binary (which calls my program), I get the following:

openat(AT_FDCWD, "/home/gfurlan/Development/qt-glue-manager/appimage/AppDir/usr/bin/AWSGlueManager.pkg", O_RDONLY) = -1 ENOENT

Is this a PyInstaller known issue? I thoght to ask here before, because it might be somthing to do with my setup, rather than an actual bug.

I think I need to tinker with the ./AWSGlueManager.spec and ./appimage/AppImageBuilder.yml files somehow.

How to reproduce (at least on Linux):

0.1. Pre-requisites: Python 3.9, pipenv, appimage-builder (`pip install --user appimage-builder`)

1. Download the app's sources: https://github.com/elegos/aws-glue-manager
2. Checkout develop (commit: 73df22e50a41f6ff2b1753f3b29e09ddbe8866a5)
3. Run `pipenv install -d`
4. Run `pipenv run pyinstaller AWSGlueManager.dist`
5. Enter the "appimage" directory
6. Run `appimage-builder --recipe AppImageBuilder.yml`

Thank you very much for all the support!

bwoodsend

unread,
Apr 1, 2021, 1:13:36 PM4/1/21
to PyInstaller

I’d be tempted to circumvent PyInstaller and let AppImage get the cross distribution support right. They have a recipe for PyQt5 on their docs.

Giacomo Furlan

unread,
Apr 3, 2021, 11:27:05 AM4/3/21
to PyInstaller
Hello bwoodsend,

I've tried all the evening to try installing Python 3.9 using the suggested recipe, but it was a pain and I failed miserably! The problem with it is that ubuntu has no Python 3.9 packages out of the box, and I don't want to trust 3rd party PPAs (even if I tried to use one with Debian Buster, but again failed miserably to install the python3.9 package due to broken dependencies.

Yes it is a way, but a hard one, again =\

bwoodsend

unread,
Apr 6, 2021, 2:58:54 AM4/6/21
to PyInstaller
Ughh, I've given it a shot and I can't get appimage to do anything either. Do you have to use it? It's hideous.

Giacomo Furlan

unread,
Apr 6, 2021, 5:05:27 AM4/6/21
to PyInstaller
Hello @bwoodsend,

thanks for the interest. It's still a work-in-progress, but here is what I've done to let appimage-builder work:

1. create a Docker image with Python 3.9 compiled in a temp directory (say /opt/python3.9)
2. created an appimage-builder yml file with a "script" section, moving the contents of the Python dir in AppDir/usr (where all files reside)
3. profit (see the latest develop commit)

Now I'd like to remove the custom docker image in order to make it github actions compatible, though that would mean using a custom repository (as APT-compatible OSes does not seem to have python 3.9 out of the box).
Reply all
Reply to author
Forward
0 new messages