Several libraries from stage-packages missing despite proper LD_LIBRARY_PATH

Looks like libpsm-infinipath1 ships these libs:

/usr/lib/libpsm1/libpsm_infinipath.so.1.16
/usr/lib/x86_64-linux-gnu/libinfinipath.so.4.0
/usr/lib/x86_64-linux-gnu/libinfinipath.so.4

It appears that it relies on a postinst action to link (using update-alternatives)
/usr/lib/x86_64-linux-gnu/libpsm_infinipath.so.1 to /usr/lib/libpsm1/libpsm_infinipath.so.1.16

Snapcraft does not run postinst actions for staged packages unfortunately, so this may require some manual fixups.

You have a couple options, but I can’t really test it without a good example:

  1. symlink /usr/lib/libpsm1/libpsm_infinipath.so.1 yourself (using relative pathing)
  2. add libpsm1 to the library path, but you may still need that .so.1 link

From what I’m told, liblapack also needs to be added to the library path to function as well.

So this may work for you for the runtime issue:
LIBRARY_PATH: $LD_LIBRARY_PATH:$SNAP/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/lapack:$SNAP/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/blas:$SNAP/usr/lib/libpsm1

The symlink for the major api versions may be required as well (libpsm_infinipath.so.1 -> libpsm_infinipath.so.1.16 and liblapack.so.3 -> liblapack.so.3.7.1).
You could do that with an override-prime, override-build, or override-stage.

4 Likes