AppImageCrafters / appimage-builder

GNU/Linux packaging solution using the AppImage format
MIT License
298 stars 55 forks source link

appimage-builder-1.0.2-x86_64.AppImage fails to build the pyqt5 example recipe #235

Open mschuckmann opened 2 years ago

mschuckmann commented 2 years ago

I downloaded the appimage-builder-1.0.2 AppImage and tried to build the pyqt5 example recipe I get the following error:

mschuckmann@aether:/build/recipes/pyqt5 ((v1.0.2))
(4667e37486:preact-dev)$ appimage-builder          
INFO:main:Running main script
rm -rf $TARGET_APPDIR  | true
mkdir -p $TARGET_APPDIR/usr/src
cp main.py  $TARGET_APPDIR/usr/src -r
python3 -m pip install --ignore-installed --prefix=/usr --root=$TARGET_APPDIR -r ./requirements.txt
/tmp/.mount_appimaqHVaCc/usr/bin/python3: No module named pip
Traceback (most recent call last):
  File "/tmp/.mount_appimaqHVaCc/usr/bin/appimage-builder", line 8, in <module>
    sys.exit(__main__())
  File "/tmp/.mount_appimaqHVaCc/usr/lib/python3.8/site-packages/appimagebuilder/__main__.py", line 51, in __main__
    invoker.execute(commands)
  File "/tmp/.mount_appimaqHVaCc/usr/lib/python3.8/site-packages/appimagebuilder/invoker.py", line 29, in execute
    command()
  File "/tmp/.mount_appimaqHVaCc/usr/lib/python3.8/site-packages/appimagebuilder/commands/run_script.py", line 69, in __call__
    raise RuntimeError("Script exited with code: %s" % _proc.returncode)
RuntimeError: Script exited with code: 1

My system has pip installed:

mschuckmann@aether:/build/recipes/pyqt5 ((v1.0.2))
(4667e37486:preact-dev)$ python3 -m pip --version
pip 20.0.2 from /usr/lib/python3/dist-packages/pip (python 3.8)

Although it's a little unclear to if appimage-builder is supposed to use the hosts version python3 and pip or a version that is staged as part of the recipe?

azubieta commented 2 years ago

Good catch, this should be affecting other versions of appimagebuilder (in AppImage presentation). We set the python runtime from the AppImage and it's affecting the execution of the script. Need to find a way to run those scripts using the system environment.

mschuckmann commented 2 years ago

I tried building a docker image using your dockerfile and got a different error when trying to used appimage-builder (I’ll post the error later).

Basically I’m having a really hard time getting your 1.0.2 release to function on recipes that used to build and function.

Thanks for your support, Matt S.

On Fri, May 27, 2022 at 12:31 PM Alexis López Zubieta < @.***> wrote:

Good catch, this should be affecting other versions of appimagebuilder (in AppImage presentation). We set the python runtime from the AppImage and it's affecting the execution of the script. Need to find a way to run those scripts using the system environment.

— Reply to this email directly, view it on GitHub https://github.com/AppImageCrafters/appimage-builder/issues/235#issuecomment-1139968007, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADYXOSUQWFRUGMJWXH3PYMTVMEPHZANCNFSM5XE7QKYA . You are receiving this because you authored the thread.Message ID: @.***>

-- Matt S

azubieta commented 2 years ago

This should be fixed on with the latest continuous build. I already tested on my end could you please double check using the latest build from the github release.

mschuckmann commented 2 years ago

So I downloaded the current continuous AppImage build:

$ appimage-builder --version
appimage-builder: 1.0.3.dev14+g7b1fe9b

I tried to build the pyqt5 example recipe from the main branch and I get the following error:

INFO:root:Looking app icon at: /pixmaps
Traceback (most recent call last):
  File "/tmp/.mount_appimaQLhmD9/usr/bin/appimage-builder", line 8, in <module>
    sys.exit(__main__())
  File "/tmp/.mount_appimaQLhmD9/usr/lib/python3.8/site-packages/appimagebuilder/__main__.py", line 50, in __main__
    invoker.execute(commands)
  File "/tmp/.mount_appimaQLhmD9/usr/lib/python3.8/site-packages/appimagebuilder/invoker.py", line 29, in execute
    command()
  File "/tmp/.mount_appimaQLhmD9/usr/lib/python3.8/site-packages/appimagebuilder/commands/setup_app_info.py", line 29, in __call__
    icon_bundler.bundle_icon()
  File "/tmp/.mount_appimaQLhmD9/usr/lib/python3.8/site-packages/appimagebuilder/modules/setup/icon_bundler.py", line 29, in bundle_icon
    raise IconBundler.Error("Unable to find any app icon named: %s" % self.icon)
appimagebuilder.modules.setup.icon_bundler.Error: Unable to find any app icon named: utilities-terminal
azubieta commented 2 years ago

That just means that the icon utilities-terminal is not present on your system.

Seems like progress to me, try setting a different icon that is installed.

mschuckmann commented 2 years ago

I'm kind of surprised that it is looking for an icon that is on my system and not contained in the example or as part of AppImage-builder itself. Relying on stuff that may or may not have been installed seems a bit non-deterministic.

How are the icon's installed and where do I look for them?

azubieta commented 2 years ago

Icons should be installed in your system according to the XDG Icon Theme Specification. We look for them at /usr/share/icons

Relying on stuff that may or may not have been installed seems a bit non-deterministic Agreed that it's a good idea to include a icon in the example sources.

mschuckmann commented 2 years ago
(38acbae238:preact-dev)$ find /usr/share/icons -name "*utilities-terminal*"
/usr/share/icons/Tango/22x22/apps/utilities-terminal.png
/usr/share/icons/Tango/32x32/apps/utilities-terminal.png
/usr/share/icons/Tango/16x16/apps/utilities-terminal.png
/usr/share/icons/Tango/24x24/apps/utilities-terminal.png
/usr/share/icons/Tango/scalable/apps/utilities-terminal.svg
/usr/share/icons/Adwaita/scalable/apps/utilities-terminal-symbolic.svg
/usr/share/icons/Humanity/apps/64/Etermutilities-terminal.svg
/usr/share/icons/Humanity/apps/64/utilities-terminal.svg
/usr/share/icons/Humanity/apps/32/Etermutilities-terminal.svg
/usr/share/icons/Humanity/apps/32/utilities-terminal.svg
/usr/share/icons/Humanity/apps/48/Etermutilities-terminal.svg
/usr/share/icons/Humanity/apps/48/utilities-terminal.svg
/usr/share/icons/Humanity/apps/24/Etermutilities-terminal.svg
/usr/share/icons/Humanity/apps/24/utilities-terminal.svg
/usr/share/icons/Humanity/apps/22/Etermutilities-terminal.svg
/usr/share/icons/Humanity/apps/22/utilities-terminal.svg
/usr/share/icons/Humanity/apps/16/Etermutilities-terminal.svg
/usr/share/icons/Humanity/apps/16/utilities-terminal.svg
/usr/share/icons/Humanity/apps/128/Etermutilities-terminal.svg
/usr/share/icons/Humanity/apps/128/utilities-terminal.svg

So I appear to have several different utilities-terminal files installed in the /usr/share/icons directory, yet the recipe still fails to find the icon.

azubieta commented 2 years ago

You're right, this icon thing is something that has been showing up from time to time. I'll addressit in a new issue.