This seems to be a recurring theme in my experience in building snaps.
I have a snap for tuning software that was working until about a week ago. I’ve been trouble shooting the issue since. As the issues have been different with each revision (bear in mind that I had 3 successful/working builds), this is the most recent and lingering:
megatunix: error while loading shared libraries: libgtkgl-2.0.so.1: cannot open shared object file: No such file or directory
I’ve done some investigation and made some attempts to TELL the snap where the libs are located but to no avail.
Here’s a copy of my current
name: megatunix # you probably want to 'snapcraft register <name>'
version: '0.9.9+git' # just for humans, typically '1.2+git' or '1.3.2'
summary: MegaTunix Tuning software for MegaSquirt EFI Controllers # 79 char long summary
MegaTunix is a tuning application for Linux, Mac OS-X, other Unix variants and Windows XP/Vista/7 32 bit variants. It supports some of the available DIY EFI Fuel injection solutions including many MegaSquirt products and LibreEMS. It's written in C using the GTK windowing toolkit and is licensed under GPL V2.
grade: stable # must be 'stable' to release into candidate/stable channels
confinement: strict # use 'strict' once you have the right plugs and slots
command: desktop-launch $SNAP/bin/megatunix
# See 'snapcraft plugins'
sudo make install
Again, the snap builds successfully. It RAN for 3 separate revisions (the revisions were to add desktop support, etc). Now, it fails with the aforementioned error.