I’m building a snap and getting some errors that I don’t know what to do with:
Priming certbot
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:
snap/core/current/lib/x86_64-linux-gnu/libbz2.so.1.0
snap/core/current/lib/x86_64-linux-gnu/liblzma.so.5
snap/core/current/lib/x86_64-linux-gnu/libncursesw.so.5
snap/core/current/lib/x86_64-linux-gnu/libtinfo.so.5
snap/core/current/lib/x86_64-linux-gnu/libz.so.1
snap/core/current/usr/lib/x86_64-linux-gnu/libdb-5.3.so
snap/core/current/usr/lib/x86_64-linux-gnu/libpanelw.so.5
The primed files will not work with the current base given the GLIBC mismatch of the primed files and the
linker version (2.23) used in the base. These are the GLIBC versions required by the primed files that do not
match and will be patched:
- /home/bsutton/git/orionmonitor/snap-projects/installer/prime/lib/x86_64-linux-gnu/libcrypt-2.26.so -> GLIBC 2.25
- /home/bsutton/git/orionmonitor/snap-projects/installer/prime/usr/bin/python3.6m -> GLIBC 2.25
- /home/bsutton/git/orionmonitor/snap-projects/installer/prime/usr/bin/python3.6 -> GLIBC 2.25
So two questions:
how do I resolve the glibc mismatch.
How do I add the necessary libraries to the stage-packages?
e.g
Does:
snap/core/current/lib/x86_64-linux-gnu/libbz2.so.1.0
… so that you build in a clean environment (and with the correct libc) and do not taint the snaps with undefined libs.
Otherwise the snap build will most likely not work on any autobuilder (like launchpad or build.snapcraft.io) unless you are lucky that these particular libs are occasionally around.
OK, that makes sense. I must say the doco on cleanbuild needs some work!
So the next problem is that a no. of the libs don’t exist on my system and I’m not certain about how to make them available.
e.g.
dpkg -S snap/core/current/lib/x86_64-linux-gnu/libz.so.1
dpkg-query: no path found matching pattern snap/core/current/lib/x86_64-linux-gnu/libz.so.1
So how do I identify which package needs to be installed to provide the missing libraries.
Note; this is just one example I’m missing half a dozen libraries.
Failed to fetch stage packages: Error downloading packages for part ‘pi-gation-launch’: The package ‘/lib/x86_64-linux-gnu/libsmartcols.so.1’ was not found…
So the lib in question definitely exists on my machine, so why isn’t snapcraft finding it?
I was (obviously) using the lib path rather than the package name.
For the record:
If you get an error like:
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:
snap/core/current/lib/x86_64-linux-gnu/libbz2.so.1.0