Skip to content

Commit 57097d1

Browse files
authored
Fix postgresql macOS 15.4 build bug (#705)
1 parent b21c62c commit 57097d1

File tree

2 files changed

+17
-14
lines changed

2 files changed

+17
-14
lines changed

src/SPC/builder/unix/library/postgresql.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,8 @@ protected function build(): void
4141
$error_exec_cnt += $output[0] === 0 ? 0 : 1;
4242
if (!empty($output[1][0])) {
4343
$cppflags = $output[1][0];
44-
$envs .= " CPPFLAGS=\"{$cppflags} -fPIC -fPIE -fno-ident\"";
44+
$macos_15_bug_cflags = PHP_OS_FAMILY === 'Darwin' ? ' -Wno-unguarded-availability-new' : '';
45+
$envs .= " CPPFLAGS=\"{$cppflags} -fPIC -fPIE -fno-ident{$macos_15_bug_cflags}\"";
4546
}
4647
$output = shell()->execWithResult("pkg-config --libs-only-L --static {$packages}");
4748
$error_exec_cnt += $output[0] === 0 ? 0 : 1;

src/globals/test-extensions.php

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -13,26 +13,27 @@
1313

1414
// test php version (8.1 ~ 8.4 available, multiple for matrix)
1515
$test_php_version = [
16-
'8.1',
17-
'8.2',
18-
'8.3',
16+
// '8.1',
17+
// '8.2',
18+
// '8.3',
1919
'8.4',
2020
];
2121

22-
// test os (macos-13, macos-14, ubuntu-latest, windows-latest are available)
22+
// test os (macos-13, macos-14, macos-15, ubuntu-latest, windows-latest are available)
2323
$test_os = [
24-
'macos-13',
24+
// 'macos-13',
2525
'macos-14',
26-
'ubuntu-latest',
27-
'ubuntu-22.04',
28-
'ubuntu-24.04',
29-
'ubuntu-22.04-arm',
30-
'ubuntu-24.04-arm',
31-
'windows-latest',
26+
'macos-15',
27+
// 'ubuntu-latest',
28+
// 'ubuntu-22.04',
29+
// 'ubuntu-24.04',
30+
// 'ubuntu-22.04-arm',
31+
// 'ubuntu-24.04-arm',
32+
// 'windows-latest',
3233
];
3334

3435
// whether enable thread safe
35-
$zts = true;
36+
$zts = false;
3637

3738
$no_strip = false;
3839

@@ -44,7 +45,7 @@
4445

4546
// If you want to test your added extensions and libs, add below (comma separated, example `bcmath,openssl`).
4647
$extensions = match (PHP_OS_FAMILY) {
47-
'Linux', 'Darwin' => 'ev',
48+
'Linux', 'Darwin' => 'pgsql',
4849
'Windows' => 'ev',
4950
};
5051

@@ -150,6 +151,7 @@ function quote2(string $param): string
150151
break;
151152
case 'macos-13':
152153
case 'macos-14':
154+
case 'macos-15':
153155
$shared_cmd = ' --build-shared=' . quote2($shared_extensions) . ' ';
154156
$no_strip = true;
155157
break;

0 commit comments

Comments
 (0)