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

Added script to build AppImage. #94

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Added script to build AppImage. #94

wants to merge 1 commit into from

Conversation

silvioprog
Copy link
Member

Generated AppImage PasDoc_GUI-0.15.0-x86_64.AppImage and its respective Output.log in attachment.

PasDoc_GUI-0.15.0-x86_64.AppImage.tar.gz

Output.log.tar.gz

Copy link
Collaborator

@michaliskambi michaliskambi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks cool, thank you! I have 2 suggestions for the shell script, although they are not mandatory, just suggestions.

I'll test it later on Debian.

source/gui/build_appimage.sh Show resolved Hide resolved
source/gui/build_appimage.sh Show resolved Hide resolved
@silvioprog
Copy link
Member Author

silvioprog commented Apr 23, 2020

I'll test it later on Debian.

I'm curious with this test. I think it will work fine. :-)

I tested the script on Fedora30 (my primary OS) and on Zorin (latest), and it worked like a charm in both.

Edit: You may need to install the appstream package on your OS. (on Fedora it was installed by sudo dnf install appstream). The script will report any missing tool on its output.

@michaliskambi
Copy link
Collaborator

  • Thanks for the comments for my review -> I'm cool with leaving it as-is. If you confirmed that it should work with any sh-compatible shell, I'm happy :)

  • Running the script on Debian went fine. I simply built the pasdoc_gui (make build-gui in top-level dir) and then cd source/gui && ./build_appimage.sh went OK (attaching output in build-appimage-output.txt).
    build-appimage-output.txt

  • However.. the resulting application doesn't start. Running it, by chmod +x PasDoc_GUI-0.15.0-x86_64.AppImage and ./PasDoc_GUI-0.15.0-x86_64.AppImage, yields the following messages and then seemingly hangs forever:

    (PasDoc_GUI-0.15.0-x86_64.AppImage:7040): Gdk-WARNING **: 22:17:53.810: gdk_window_set_icon_list: icons too large
    
    (PasDoc_GUI-0.15.0-x86_64.AppImage:7040): GLib-GObject-WARNING **: 22:17:53.823: cannot register existing type 'GdkScreen'
    
    (PasDoc_GUI-0.15.0-x86_64.AppImage:7040): GLib-CRITICAL **: 22:17:53.823: g_once_init_leave: assertion 'result != 0' failed
    
    (PasDoc_GUI-0.15.0-x86_64.AppImage:7040): Gdk-CRITICAL **: 22:17:53.823: IA__gdk_screen_get_primary_monitor: assertion 'GDK_IS_SCREEN (screen)' failed
    
  • Running normal ./pasdoc_gui of course works for me, it yields the first warning and then starts fine immediately:

    (pasdoc_gui:7058): Gdk-WARNING **: 22:19:02.883: gdk_window_set_icon_list: icons too large
    
  • I tested running the AppImage you attached in this PR, but it fails with these errors

    $ ./PasDoc_GUI-0.15.0-x86_64.AppImage
    ./PasDoc_GUI-0.15.0-x86_64.AppImage: /lib/x86_64-linux-gnu/libm.so.6: version `GLIBC_2.29' not found (required by /tmp/.mount_PasDocDNU42C/usr/bin/../lib/libgtk-x11-2.0.so.0)
    ./PasDoc_GUI-0.15.0-x86_64.AppImage: /lib/x86_64-linux-gnu/libm.so.6: version `GLIBC_2.29' not found (required by /tmp/.mount_PasDocDNU42C/usr/bin/../lib/libcairo.so.2)
    ./PasDoc_GUI-0.15.0-x86_64.AppImage: /lib/x86_64-linux-gnu/libm.so.6: version `GLIBC_2.29' not found (required by /tmp/.mount_PasDocDNU42C/usr/bin/../lib/libpixman-1.so.0)
    ./PasDoc_GUI-0.15.0-x86_64.AppImage: /lib/x86_64-linux-gnu/libm.so.6: version `GLIBC_2.29' not found (required by /tmp/.mount_PasDocDNU42C/usr/bin/../lib/libpng16.so.16)
    
  • Following your suggestion, I installed appstream package on Debian. However it made no difference: the output of ./build_appimage.sh is the same (only it doesn't download the linuxdeploy-x86_64.AppImage the 2nd time, and temporary directory is of course diferent) and the resulting ./PasDoc_GUI-0.15.0-x86_64.AppImage hangs in the same way.

So, in total I have two problems:

  1. AppImage generated by you doesn't work (exits after showing the errors, """..libm.so.6: version `GLIBC_2.29' not found""").

  2. AppImage generated by me doesn't work (hangs after showing some warnings/errors from Gdk/Glib).

For reference, I'm now using Debian Buster (latest stable, with all security fixes applied).

Do you have some suggestion how to make it fixed? We should

  • find a way to make AppImage working on all systems, including Debian Buster,

  • and also we should have a script that generates the same AppImage, regardless of the source system it is used on. So the fact that we have two different problems with two AppImages (one generated on your system, one on mine) is also another problem :)

For reference, I used various AppImages on my system successfully. I have at least NextCloud, Tutanota, UnityHub, GIMP, FreeWRL running fine on this system.

@silvioprog
Copy link
Member Author

I took a look at your log and noticed your system is missing appstreamcli (notice the warning appstreamcli command is missing):

-- Running output plugin: appimage -- 
Running process: /tmp/.mount_linuxdpGUe8G/usr/bin/linuxdeploy-plugin-appimage --appdir /mnt/data-linux/sources/pasdoc/pasdoc-appimage/source/gui/AppDir
[appimage/stdout] Found appimagetool: /tmp/.mount_linuxdpGUe8G/plugins/linuxdeploy-plugin-appimage/usr/bin/appimagetool
[appimage/stdout] 
[appimage/stdout] WARNING: appstreamcli command is missing, please install it if you want to use AppStream metadata
[appimage/stderr] Running command: /tmp/.mount_linuxdpGUe8G/plugins/linuxdeploy-plugin-appimage/usr/bin/appimagetool "/mnt/data-linux/sources/pasdoc/pasdoc-appimage/source/gui/AppDir" "-g" "/mnt/data-linux/sources/pasdoc/pasdoc-appimage/source/gui/PasDoc_GUI-0.15.0-x86_64.AppImage"
[appimage/stderr] 
[appimage/stderr] appimagetool, continuous build (commit fef038a), build 2093 built on 2019-07-07 12:07:34 UTC
[appimage/stderr] Using architecture x86_64
[appimage/stderr] Deleting pre-existing .DirIcon
[appimage/stderr] Creating .DirIcon symlink based on information from desktop file
[appimage/stderr] WARNING: AppStream upstream metadata is missing, please consider creating it
[appimage/stderr]          in usr/share/metainfo/pasdoc_gui.appdata.xml
[appimage/stderr]          Please see https://www.freedesktop.org/software/appstream/docs/chap-Quickstart.html#sect-Quickstart-DesktopApps
[appimage/stderr]          for more information or use the generator at http://output.jsbin.com/qoqukof.

appstreamcli must be installed to generate the AppImage. It is part of AppStream package.

AppImage generated by you doesn't work (exits after showing the errors, """..libm.so.6: version `GLIBC_2.29' not found""").

Hm... I have been testing only on Zorin OS 15. I'll download Debian Buster with Gnome to test on it too.

@michaliskambi
Copy link
Collaborator

I took a look at your log and noticed your system is missing appstreamcli (notice the warning appstreamcli command is missing):

My first run of the build_appimage.sh script was before installing the appstream package. The 2nd run, after installing the package, didn't have this warning. Here's a log:
build-appimage-output-with-appstream-installed.txt

However, the resulting ./PasDoc_GUI-0.15.0-x86_64.AppImage hangs in the same way.

Also, if the script requires appstreamcli, it should fail (with a clear message and exit status <> 1) if it's missing. Otherwise, the warning about it is easy to miss for a human, and Jenkins would miss it for sure :) Something like this should do the trick:

if ! which appstreamcli > /dev/null; then 
  echo 'You have to install appstreamcli tool (in the appstream package) to use this script.'
  exit 1
fi

@silvioprog
Copy link
Member Author

silvioprog commented May 5, 2020

Also, if the script requires appstreamcli, it should fail (with a clear message and exit status <> 1) if it's missing. Otherwise, the warning about it is easy to miss for a human, and Jenkins would miss it for sure :) Something like this should do the trick:

I totally agree! :-) I'm going to add this correction in my other scripts too.

I recently switched from Fedora-30 to Ubuntu-20.04 (which is Debian-derived) due to driver problems, and I have been trying to run a small application written in Lazarus, however, there is a strange problem the application get the main form locked (even an empty project with "Form1") all the time, and when I try to click inside it, the widget asks "Force quit?". I'm going to understand what is happening and back to try to help you with this issue.

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

Successfully merging this pull request may close these issues.

2 participants