diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index 78abbfe2d..91e5949f9 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -133,9 +133,16 @@ parts: - --prefix=/usr build-attributes: - enable-patchelf + organize: + # `libgomp1` installs libgomp into the multiarch directory, but the + # `magick` binary's RPATH only searches `$ORIGIN/../lib` (i.e. usr/lib). + # Move it alongside the Magick libraries so the bundled binary can load + # it at runtime; otherwise magick fails with: + # "libgomp.so.1: cannot open shared object file: No such file or directory" + usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/libgomp.so*: usr/lib/ prime: - usr/bin/magick - - usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/libgomp.so.1 + - usr/lib/libgomp.so* - usr/lib/libMagickCore-7.Q16HDRI.so* - usr/lib/libMagickWand-7.Q16HDRI.so*