From 57097d1275e9364c5d8d52111880a4bf0159ac8c Mon Sep 17 00:00:00 2001 From: Jerry Ma Date: Tue, 22 Apr 2025 15:09:31 +0800 Subject: [PATCH] Fix postgresql macOS 15.4 build bug (#705) --- src/SPC/builder/unix/library/postgresql.php | 3 ++- src/globals/test-extensions.php | 28 +++++++++++---------- 2 files changed, 17 insertions(+), 14 deletions(-) diff --git a/src/SPC/builder/unix/library/postgresql.php b/src/SPC/builder/unix/library/postgresql.php index e92d32c9..7885eca3 100644 --- a/src/SPC/builder/unix/library/postgresql.php +++ b/src/SPC/builder/unix/library/postgresql.php @@ -41,7 +41,8 @@ trait postgresql $error_exec_cnt += $output[0] === 0 ? 0 : 1; if (!empty($output[1][0])) { $cppflags = $output[1][0]; - $envs .= " CPPFLAGS=\"{$cppflags} -fPIC -fPIE -fno-ident\""; + $macos_15_bug_cflags = PHP_OS_FAMILY === 'Darwin' ? ' -Wno-unguarded-availability-new' : ''; + $envs .= " CPPFLAGS=\"{$cppflags} -fPIC -fPIE -fno-ident{$macos_15_bug_cflags}\""; } $output = shell()->execWithResult("pkg-config --libs-only-L --static {$packages}"); $error_exec_cnt += $output[0] === 0 ? 0 : 1; diff --git a/src/globals/test-extensions.php b/src/globals/test-extensions.php index 249999f2..0ff22ab3 100644 --- a/src/globals/test-extensions.php +++ b/src/globals/test-extensions.php @@ -13,26 +13,27 @@ declare(strict_types=1); // test php version (8.1 ~ 8.4 available, multiple for matrix) $test_php_version = [ - '8.1', - '8.2', - '8.3', + // '8.1', + // '8.2', + // '8.3', '8.4', ]; -// test os (macos-13, macos-14, ubuntu-latest, windows-latest are available) +// test os (macos-13, macos-14, macos-15, ubuntu-latest, windows-latest are available) $test_os = [ - 'macos-13', + // 'macos-13', 'macos-14', - 'ubuntu-latest', - 'ubuntu-22.04', - 'ubuntu-24.04', - 'ubuntu-22.04-arm', - 'ubuntu-24.04-arm', - 'windows-latest', + 'macos-15', + // 'ubuntu-latest', + // 'ubuntu-22.04', + // 'ubuntu-24.04', + // 'ubuntu-22.04-arm', + // 'ubuntu-24.04-arm', + // 'windows-latest', ]; // whether enable thread safe -$zts = true; +$zts = false; $no_strip = false; @@ -44,7 +45,7 @@ $prefer_pre_built = false; // If you want to test your added extensions and libs, add below (comma separated, example `bcmath,openssl`). $extensions = match (PHP_OS_FAMILY) { - 'Linux', 'Darwin' => 'ev', + 'Linux', 'Darwin' => 'pgsql', 'Windows' => 'ev', }; @@ -150,6 +151,7 @@ if ($shared_extensions) { break; case 'macos-13': case 'macos-14': + case 'macos-15': $shared_cmd = ' --build-shared=' . quote2($shared_extensions) . ' '; $no_strip = true; break;