The committed native compiler prelinked/bootstrap-gen0/bin-compile-aot produces no artifact for any input, including a bare hello-world and the fixture it is named after.
$ ./prelinked/bootstrap-gen0/bin-compile-aot -o /tmp/out build/hello.php
helloworld_compile_smoke: parseAndCompile returned null (parser/CFG spine)
helloworld_compile_smoke: native emit failed at phase=parseAndCompile
rc=1 (no binary produced)
| invocation |
result |
-o OUT src.php, relative source, cwd=repo root |
parseAndCompile failure, no artifact |
-o OUT src.php, absolute source, cwd=/tmp |
same |
| source in repo root |
same |
test/selfhost/compiler_helloworld_smoke/main.php (its own fixture) |
same |
documented env form (PHP_COMPILER_M3_COMPILE_MODE=compile, M3_RUNTIME_COMPILE=1, M3_SOURCE, M3_OUT) |
segfault after c:main_before_php, 0.002 s |
Source: <?php echo "hello\n"; — nothing exotic. The same script compiles fine through the Zend-hosted path (./phpc build, ~5 s, correct output), so this is the committed binary, not the input.
Why it is in this state
script/bootstrap-gen0-staleness.php on master:
stale — committed gen-0 driver bytes are from 9e6b9c12a (2026-06-15, 40 days ago);
6441 commit(s) have changed lowering sources since, and the manifest was rewritten
272 time(s) — the seed was not built from current sources
manifest provenance: unverified-restamp
The blob is 40 days and 6441 lowering commits old. #22642 (closed) covered the rebuild OOMing at 48 GiB; this issue is the consequence that outlived it — the artifact we ship is not merely stale, it is non-functional, and the gates stay green because they restamp the fingerprint rather than exercise the binary.
Why the gates do not catch it
Nothing runs the committed driver against an arbitrary script and asserts an artifact appears. The M3/M4 ladder had a documented false-green family (#21860: hardcoded emit_path=native, copy-fallback reported as native emit, substring match on native-prelinked-sidecar), and BOOTSTRAP_M3/M4_REQUIRE_NATIVE_EMIT was added in response — but a driver that starts and immediately fails parseAndCompile still satisfies anything that only checks the file exists.
Impact
- No usable precompiled compiler ships, so every
phpc build pays the Zend-hosted path.
- The self-host story (gen-0 → gen-1 → gen-2) cannot be exercised from the committed seed.
- Any benchmark of "native compiler vs Zend-hosted compiler" is impossible to produce today.
Done when: prelinked/bootstrap-gen0/bin-compile-aot -o OUT hello.php produces a runnable binary whose output matches Zend, and a gate asserts exactly that on a script the driver has never seen — so a stale or broken seed fails loudly instead of restamping green.
The committed native compiler
prelinked/bootstrap-gen0/bin-compile-aotproduces no artifact for any input, including a bare hello-world and the fixture it is named after.-o OUT src.php, relative source, cwd=repo rootparseAndCompilefailure, no artifact-o OUT src.php, absolute source, cwd=/tmptest/selfhost/compiler_helloworld_smoke/main.php(its own fixture)PHP_COMPILER_M3_COMPILE_MODE=compile,M3_RUNTIME_COMPILE=1,M3_SOURCE,M3_OUT)c:main_before_php, 0.002 sSource:
<?php echo "hello\n";— nothing exotic. The same script compiles fine through the Zend-hosted path (./phpc build, ~5 s, correct output), so this is the committed binary, not the input.Why it is in this state
script/bootstrap-gen0-staleness.phpon master:The blob is 40 days and 6441 lowering commits old. #22642 (closed) covered the rebuild OOMing at 48 GiB; this issue is the consequence that outlived it — the artifact we ship is not merely stale, it is non-functional, and the gates stay green because they restamp the fingerprint rather than exercise the binary.
Why the gates do not catch it
Nothing runs the committed driver against an arbitrary script and asserts an artifact appears. The M3/M4 ladder had a documented false-green family (#21860: hardcoded
emit_path=native, copy-fallback reported as native emit, substring match onnative-prelinked-sidecar), andBOOTSTRAP_M3/M4_REQUIRE_NATIVE_EMITwas added in response — but a driver that starts and immediately failsparseAndCompilestill satisfies anything that only checks the file exists.Impact
phpc buildpays the Zend-hosted path.Done when:
prelinked/bootstrap-gen0/bin-compile-aot -o OUT hello.phpproduces a runnable binary whose output matches Zend, and a gate asserts exactly that on a script the driver has never seen — so a stale or broken seed fails loudly instead of restamping green.