From 5747a5661ea602e4e6c552a5bdc81d3716615975 Mon Sep 17 00:00:00 2001 From: henderkes Date: Tue, 2 Jun 2026 04:00:57 +0000 Subject: [PATCH] build shared extensions before frankenphp --- src/Package/Target/php.php | 1 - src/Package/Target/php/unix.php | 6 ++++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Package/Target/php.php b/src/Package/Target/php.php index a8932e82..280a0646 100644 --- a/src/Package/Target/php.php +++ b/src/Package/Target/php.php @@ -368,7 +368,6 @@ class php extends TargetPackage return; } if (SystemTarget::isUnix()) { - $package->runStage([$this, 'unixBuildSharedExt']); if ($installer->interactive) { InteractiveTerm::indicateProgress('Running PHP smoke tests'); } diff --git a/src/Package/Target/php/unix.php b/src/Package/Target/php/unix.php index 2e6dcaa2..ae4f9ed7 100644 --- a/src/Package/Target/php/unix.php +++ b/src/Package/Target/php/unix.php @@ -552,8 +552,10 @@ trait unix $package->runStage([$this, 'configureForUnix']); $package->runStage([$this, 'makeForUnix']); } - // shared extensions build in php's postInstall (php.php) so they run AFTER - // frankenphp's main-loop build — frankenphp links libphp only, not the .so exts. + + // shared extensions build before frankenphp so their undefined references are + // collected into libphp's exported dynamic-symbol list. + $package->runStage([$this, 'unixBuildSharedExt']); } /**