From 8a4b0b208e0cb99efa6fc02ab8b6e14144c5b680 Mon Sep 17 00:00:00 2001 From: cyanyux <120559402+cyanyux@users.noreply.github.com> Date: Sat, 6 Jun 2026 13:53:59 +0800 Subject: [PATCH] fix(snap): make bundled magick find libgomp at runtime (#4016) --- snap/snapcraft.yaml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index 78abbfe2..91e5949f 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*