From 625ee2703d7c216bbd9a7bd33890883448a6c645 Mon Sep 17 00:00:00 2001 From: DubbleClick Date: Thu, 19 Jun 2025 22:06:11 +0700 Subject: [PATCH] uv needs to explicitly link -lpthread on aarch64, fails to pthread_atfork unresolved otherwise. It's a symbols that's in the static library, but not in the shared library --- src/SPC/builder/extension/uv.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/SPC/builder/extension/uv.php b/src/SPC/builder/extension/uv.php index af879882..67ead54e 100644 --- a/src/SPC/builder/extension/uv.php +++ b/src/SPC/builder/extension/uv.php @@ -16,4 +16,11 @@ class uv extends Extension throw new \RuntimeException('The latest uv extension requires PHP 8.0 or later'); } } + + public function getStaticAndSharedLibs(): array + { + [$static, $shared] = parent::getStaticAndSharedLibs(); + $shared .= ' -lpthread'; + return [$static, $shared]; + } }