So I’ve been going somewhat round in circles trying to meet dependancies.
With some help from the community I now know how to provide required dependencies via stage-packages.
The problem is that I’m using a remote part via the ‘after’ clause.
The error I’m getting seems to be suggesting that the remote part is missing libc6.
Building pi-gation-launch
Staging pi-gation-launch
Priming pi-gation-launch
Priming tomcat
'libc6' is required inside the snap for this part to work properly.
Add it as a `stage-packages` entry for this part.
You can see from my snapcraft yaml that I have libc6 as a stage-package for the part that includes tomcat by ‘after’.
The problem seems to be that the stage-packages clause for libc6 in the part doesn’t seem to meet the requirements of tomcat and the remote tomcat part is missing its own stage-packages clause.
This build seems to be happening on non 16.04. The libc6 in core is not sufficient as it does not have all the symbols required for whatever is being snapped.
If you’re building on a 17.10 host then you need to use a container via LXD to build your snap.
To get LXD running you need to run:
sudo snap install lxd
sudo adduser $USER lxd
# log out and back in for your session to recognise the newly assigned group "lxd"
sudo lxd init # accept all the defaults
Now you can run snapcraft cleanbuild which will use an LXD container based on 16.04, which will use the correct libc version.