Skip to content

Commit f57ef99

Browse files
Update cargo build command for ext-quiche
Added PHP_CONFIG and PHP environment variables to ensure correct ABI during build.
1 parent 88fa186 commit f57ef99

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

compile.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1921,7 +1921,11 @@ if [[ "$HAVE_QUICHE" == "yes" ]]; then
19211921
if [ -n "$THREADS" ]; then
19221922
CARGO_JOBS_FLAG="--jobs $THREADS"
19231923
fi
1924-
(cd "$EXT_QUICHE_DIR" && cargo build --release $CARGO_JOBS_FLAG) >> "$DIR/install.log" 2>&1 || {
1924+
# Point ext-php-rs at the just-built php-config so its build script picks up
1925+
# the correct ABI (ZTS vs NTS, include paths, etc). Without this it falls
1926+
# back to whatever PHP is on $PATH and produces a binary with mismatched
1927+
# symbols (e.g. undefined `executor_globals` against a ZTS host).
1928+
(cd "$EXT_QUICHE_DIR" && PHP_CONFIG="$INSTALL_DIR/bin/php-config" PHP="$INSTALL_DIR/bin/php" cargo build --release $CARGO_JOBS_FLAG) >> "$DIR/install.log" 2>&1 || {
19251929
write_error "ext-quiche: cargo build failed; see install.log"
19261930
exit 1
19271931
}

0 commit comments

Comments
 (0)