From be24fd946773e9ec65d6e747dfd4840bcdc4b1de Mon Sep 17 00:00:00 2001 From: henderkes Date: Tue, 14 Apr 2026 23:05:08 +0700 Subject: [PATCH 1/2] remove workaround for zig < 0.16 --- src/SPC/builder/traits/UnixSystemUtilTrait.php | 6 +----- src/globals/test-extensions.php | 6 +++--- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/src/SPC/builder/traits/UnixSystemUtilTrait.php b/src/SPC/builder/traits/UnixSystemUtilTrait.php index 33f824f36..b1921a006 100644 --- a/src/SPC/builder/traits/UnixSystemUtilTrait.php +++ b/src/SPC/builder/traits/UnixSystemUtilTrait.php @@ -50,7 +50,7 @@ public static function exportDynamicSymbols(string $lib_file): void $defined = array_unique($defined); sort($defined); // export - if (SPCTarget::getTargetOS() === 'Linux') { + if (SPCTarget::getTargetOS() === 'Linux' && ToolchainManager::getToolchainClass() !== ZigToolchain::class) { file_put_contents("{$lib_file}.dynsym", "{\n" . implode("\n", array_map(fn ($x) => " {$x};", $defined)) . "};\n"); } else { file_put_contents("{$lib_file}.dynsym", implode("\n", $defined) . "\n"); @@ -72,10 +72,6 @@ public static function getDynamicExportedSymbols(string $lib_file): ?string if (!is_file($symbol_file)) { throw new SPCInternalException("The symbol file {$symbol_file} does not exist, please check if nm command is available."); } - // https://github.com/ziglang/zig/issues/24662 - if (ToolchainManager::getToolchainClass() === ZigToolchain::class) { - return '-Wl,--export-dynamic'; // needs release 0.16, can be removed then - } // macOS/zig if (SPCTarget::getTargetOS() !== 'Linux' || ToolchainManager::getToolchainClass() === ZigToolchain::class) { return "-Wl,-exported_symbols_list,{$symbol_file}"; diff --git a/src/globals/test-extensions.php b/src/globals/test-extensions.php index c3d8e995d..ca634ba0b 100644 --- a/src/globals/test-extensions.php +++ b/src/globals/test-extensions.php @@ -43,20 +43,20 @@ $upx = false; // whether to test frankenphp build, only available for macOS and linux -$frankenphp = false; +$frankenphp = true; // prefer downloading pre-built packages to speed up the build process $prefer_pre_built = true; // If you want to test your added extensions and libs, add below (comma separated, example `bcmath,openssl`). $extensions = match (PHP_OS_FAMILY) { - 'Linux', 'Darwin' => 'decimal', + 'Linux', 'Darwin' => 'openssl,brotli', 'Windows' => 'bcmath,brotli,bz2,ctype,curl,dom,exif,fileinfo,filter,ftp,gd,iconv,intl,mbregex,mbstring,mysqli,mysqlnd,opcache,openssl,pdo,pdo_mysql,pdo_pgsql,pgsql,session,simdjson,simplexml,sodium,sqlite3,tokenizer,xml,xmlreader,xmlwriter,zip,zlib', }; // If you want to test shared extensions, add them below (comma separated, example `bcmath,openssl`). $shared_extensions = match (PHP_OS_FAMILY) { - 'Linux' => '', + 'Linux' => 'zstd', 'Darwin' => '', 'Windows' => '', }; From 73dd885342749bc0a2e6bcb5ff9011635e1c2158 Mon Sep 17 00:00:00 2001 From: henderkes Date: Wed, 15 Apr 2026 10:59:13 +0700 Subject: [PATCH 2/2] pin openssl to 3.x --- config/source.json | 2 +- src/globals/test-extensions.php | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/config/source.json b/config/source.json index d7224d4d6..5fbf8c4c8 100644 --- a/config/source.json +++ b/config/source.json @@ -1000,7 +1000,7 @@ "openssl": { "type": "ghrel", "repo": "openssl/openssl", - "match": "openssl.+\\.tar\\.gz", + "match": "openssl-3.+\\.tar\\.gz", "prefer-stable": true, "alt": { "type": "filelist", diff --git a/src/globals/test-extensions.php b/src/globals/test-extensions.php index ca634ba0b..0e2b664fe 100644 --- a/src/globals/test-extensions.php +++ b/src/globals/test-extensions.php @@ -24,13 +24,13 @@ // test os (macos-15-intel, macos-15, ubuntu-latest, windows-latest are available) $test_os = [ // 'macos-15-intel', // bin/spc for x86_64 - // 'macos-15', // bin/spc for arm64 + 'macos-15', // bin/spc for arm64 // 'ubuntu-latest', // bin/spc-alpine-docker for x86_64 - // 'ubuntu-22.04', // bin/spc-gnu-docker for x86_64 + 'ubuntu-22.04', // bin/spc-gnu-docker for x86_64 // 'ubuntu-24.04', // bin/spc for x86_64 - // 'ubuntu-22.04-arm', // bin/spc-gnu-docker for arm64 + 'ubuntu-22.04-arm', // bin/spc-gnu-docker for arm64 // 'ubuntu-24.04-arm', // bin/spc for arm64 - 'windows-2022', // .\bin\spc.ps1 + // 'windows-2022', // .\bin\spc.ps1 // 'windows-2025', ];