From f9af24e24624e807995f784cae09231e9f37f940 Mon Sep 17 00:00:00 2001 From: DubbleClick Date: Mon, 23 Jun 2025 13:23:13 +0700 Subject: [PATCH] dont fail on -lomp --- src/SPC/builder/extension/imagick.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/SPC/builder/extension/imagick.php b/src/SPC/builder/extension/imagick.php index 6255e3fb..74a63ebc 100644 --- a/src/SPC/builder/extension/imagick.php +++ b/src/SPC/builder/extension/imagick.php @@ -19,7 +19,7 @@ class imagick extends Extension return false; } // imagick with calls omp_pause_all, which requires openmp, on non-musl we build imagick without openmp - $extra_libs = trim(getenv('SPC_EXTRA_LIBS') . ' -L/usr/lib64 -lomp'); + $extra_libs = trim(getenv('SPC_EXTRA_LIBS') . ' -lomp'); f_putenv('SPC_EXTRA_LIBS=' . $extra_libs); return true; } @@ -38,6 +38,9 @@ class imagick extends Extension $static .= ' -lstdc++'; $shared = str_replace('-lstdc++', '', $shared); } + if (str_contains(getenv('CC'), 'zig')) { + $shared = str_replace('-lomp', '/usr/lib64/libomp.so', $shared); + } return [$static, $shared]; } }