From b42409efd183f68141865589479e00ae85e9674b Mon Sep 17 00:00:00 2001 From: DubbleClick Date: Thu, 19 Jun 2025 09:08:42 +0700 Subject: [PATCH] LD_LIBRARY_PATH for frankenphp sanity check --- src/SPC/builder/unix/UnixBuilderBase.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/SPC/builder/unix/UnixBuilderBase.php b/src/SPC/builder/unix/UnixBuilderBase.php index d424c594..adde474a 100644 --- a/src/SPC/builder/unix/UnixBuilderBase.php +++ b/src/SPC/builder/unix/UnixBuilderBase.php @@ -227,7 +227,9 @@ abstract class UnixBuilderBase extends BuilderBase if (!file_exists($frankenphp)) { throw new RuntimeException('FrankenPHP binary not found: ' . $frankenphp); } - [$ret, $output] = shell()->execWithResult("{$frankenphp} version"); + [$ret, $output] = shell() + ->setEnv(['LD_LIBRARY_PATH' => BUILD_LIB_PATH]) + ->execWithResult("{$frankenphp} version"); if ($ret !== 0 || !str_contains(implode('', $output), 'FrankenPHP')) { throw new RuntimeException('FrankenPHP failed sanity check: ret[' . $ret . ']. out[' . implode('', $output) . ']'); } @@ -308,7 +310,6 @@ abstract class UnixBuilderBase extends BuilderBase $arch = arch2gnu(php_uname('m')); // define executables for go and xcaddy - $go_exec = PKG_ROOT_PATH . "/go-mod-frankenphp-{$arch}-{$os}/bin/go"; $xcaddy_exec = PKG_ROOT_PATH . "/go-mod-frankenphp-{$arch}-{$os}/bin/xcaddy"; $nobrotli = $this->getLib('brotli') === null ? ',nobrotli' : '';