Files from the build host were migrated into the snap to satisfy dependencies that would otherwise not be met. This feature will be removed in a future release. If these libraries are needed in the final snap, ensure that the following are either satisfied by a stage-packages entry or through a part:
usr/lib/x86_64-linux-gnu/libodbc.so.2
The linker version '2.23' used by the base 'core' is incompatible with files in this snap:
/home/me/s2-integrati/prime/usr/lib/x86_64-linux-gnu/libgnutls.so.30.14.10 (2.25)
/home/me/s2-integrati/prime/usr/lib/x86_64-linux-gnu/libp11-kit.so.0.3.0 (2.26)
If you are not building on an Ubuntu 16.04 system, then use snapcraft cleanbuild or SNAPCRAFT_BUILD_ENVIRONMENT=lxd snapcraft (the second of those is a bit brittle). Both of these will build inside a clean Ubuntu 16.04 LXD container.
You will need LXD for those to work, so you should either install via APT or run:
sudo addgroup --system lxd
sudo adduser $USER lxd
sudo snap install lxd
# restart your desktop session so that the lxd group membership is applied
lxd init
# press enter to accept all the default options that it asks you
snapcraft cleanbuild # cooking with gas!
Thatâs a good question. I donât believe we have a reasonable way of doing so right now. Especially when using container builds or the build.snapcraft.io service. You could bundle the key in your project, but that opens the doors to exploitation should someone nefarious find it such as if your project is visible publicly on github for example. To bundle in your project youâd need an additional part that runs before your other parts by setting the other to include after: [ssh-key] or some such and in your ssh-key part youâd include an override-build or override-pull script that copies the ssh key to somewhere default on the system e.g. $HOME/.ssh/id_rsa.
When youâre using the docker image you donât need to use cleanbuild. You can instead just do snapcraft on itâs own and throw the container away when itâs finished:
docker run --rm -it -v $PWD:/project -w /project snapcore/snapcraft:stable snapcraft
Because docker is another container technology like LXD, and a docker container specifically made for snapcraft is created for this purpose.
snapcraft cleanbuild simply creates an Ubuntu 16.04 LXD container for you, copies your source tree and installs snapcraft in it, and runs snapcraft in your source tree in the container.
The docker command directly maps your source tree directory into the container without copying and run snapcraft in the container. The difference of two commands is that one creates a temporary container for the job (and destroys it after it) and one uses an existing container(and probably add an additional temporary fs layer over it for building, Iâm not really familiar with Docker and is conservative about this).
Iâm in this very linker version problem. However, building an LXC didnât work:
$ snapcraft cleanbuild
Creating snapcraft-chokingly-nonrioting-ceola
Error: Failed container creation: Create container: Create LXC container: Invalid devices: Detect root disk device: No root device could be found
Failed to create container: a new LXD container could not be created.
Refer to the documentation at https://linuxcontainers.org/lxd/getting-started-cli.
I use LXD everyday, so Iâm positive it works in my machine. Note though that I donât use the default storage for it, but a different disk:
$ lxc storage list
+---------+-------------+--------+--------------------+---------+
| NAME | DESCRIPTION | DRIVER | SOURCE | USED BY |
+---------+-------------+--------+--------------------+---------+
| default | | dir | /data/lxd-storage/ | 2 |
+---------+-------------+--------+--------------------+---------+