From 8e5657eff0a902d967159c48001c57100f0ff1a4 Mon Sep 17 00:00:00 2001 From: crazywhalecc Date: Sun, 30 Mar 2025 20:20:04 +0800 Subject: [PATCH] Separate musl-dist and non-musl-dist --- src/SPC/builder/linux/SystemUtil.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/SPC/builder/linux/SystemUtil.php b/src/SPC/builder/linux/SystemUtil.php index a2efe9bb..b65cb78f 100644 --- a/src/SPC/builder/linux/SystemUtil.php +++ b/src/SPC/builder/linux/SystemUtil.php @@ -203,7 +203,11 @@ class SystemUtil return null; } if (PHP_OS_FAMILY === 'Linux' && getenv('SPC_LIBC') === 'musl') { - $result = shell()->execWithResult('ldd 2>&1'); + if (self::isMuslDist()) { + $result = shell()->execWithResult('ldd 2>&1'); + } else { + $result = shell()->execWithResult('/usr/local/musl/lib/libc.so 2>&1'); + } // Match Version * line // match ldd version: "Version 1.2.3" match 1.2.3 $pattern = '/Version\s+(\d+\.\d+\.\d+)/';