1

I am trying out the new linux packaging tool http://snapcraft.io/create/

It does have some documentation but it's not very mature and doesn't contain everything.

What I am trying to do is to generate a package for my binary that is compiled using Qt framework, thus it depends on a load of .so files. I couldn't find in documentation any way to convince snapcraft to pull all these dependencies and add them to the program hierarchy (the mounted squashfs).

So in order to "temporarily fix that" I hacked a very lame shell script that executes ldd on my binary and does this on its own. That "sort of" works because now indeed all the necessary libraries are in the image, but the program can't find them, because most of them have own paths and are not in root lib folder /usr/lib

The example of error I am getting when I try to start my program is:

/snap/huggle/x1/usr/bin/huggle: error while loading shared libraries: libGL.so.1: cannot open shared object file: No such file or directory

But the library is there:

/snap/huggle/x1/usr/lib/x86_64-linux-gnu/mesa/libGL.so.1

It just has no clue how to find it. On other hand, given that snapcraft is advertised as awesome simple stupid packaging tool, I find it quite weird that something so simple as packaging a C++ binary would be so complicated. How should I do this properly?

Petr
  • 13,747
  • 20
  • 89
  • 144
  • If the needed libs are .deb packages, Snapcraft can download them using `stage-packages`, see: http://snapcraft.io/docs/reference/plugins/common – Paradiesstaub Dec 19 '16 at 14:38

0 Answers0