Scroll to TL;DR; to get to actual problem
I am trying to package our open source project using snapcraft, but given lack of examples for this kind of software I am having big troubles getting it to work.
Basically, it’s a C++ Qt4 / Qt5 application (can be compiled on both) with either WebKit or WebEngine, it has massive dependency tree, and consist of at least 8 separate binaries that need to be packaged together in a proper way so that it works.
I want packaging to be simple stupid, so that nobody who is doing the actual packaging needs to know ANYTHING about snaps. Basically I wanted to create a simple shell script that anyone can execute on Ubuntu and it produces a working snap, this shell script can be found here: https://github.com/huggle/huggle3-qt-lx/blob/snapfix/linux/snap/generate_snap.sh
That script will create a folder “tmp”, copy source code inside as well as snapcraft.yml and prepare it - I had some serious issues getting Qt plugins to work so I had to create a symlink inside of snap tree, which actually fixed it, that is visible in script.
The snapcraft.yml is IMHO looking pretty ugly, but it seems that removing anything from it will make it produce package that doesn’t run at all as libraries / dependencies are missing from it.
Now with this script and yaml file I am able to create actual snap file that can be installed and my application started, and all binaries seems to be packaged on proper places where it finds them, but it segfaults right when it tries to intialize first QtWidget (First window of application). Like if confining somehow prevented it from running properly?
TL;DR; I am able to package my program, but it doesn’t start - it’s getting segfault when it tries to create a QtWidget (window), I don’t know where exactly it crashes because I can’t figure out how to attach debugger to my application through that wrapper binary that is provided by snap.
Anyone has a clue what is wrong or how to do it right so that it works? Application, if compiled and not packaged by snap runs with no problems.
Here is the yaml file:
summary: Diff browser for MediaWiki based websites intended to deal with vandalism
description: Diff browser for MediaWiki based websites intended to deal with vandalism