Skip to content

AOT: MiniWebApp phpc build --project native link fails on master (post-#568/#734) #752

@PurHur

Description

@PurHur

Problem

Issue #568 closed after #734 (void-method include CFG for Router::render*), and ROADMAP batch 48 marked native link ✅. Harness verify (2026-05-23) shows the link is still red on master:

./script/docker-ci-local.sh --filter 'PhpcBuildProjectTest::testMiniWebAppBuildLinksNativeBinary'
# phpc build --project failed (exit 255)
# stderr trailer: "user-defined classes are not yet linkable in native AOT (#568)"

Same failure in ExamplesCompileTest::test003MiniWebAppEventuallyRuns().

Until this lands, #676 steps 2+ (execute, HTTP, deploy smoke) remain blocked regardless of #568 tracker state.

Goal

phpc build --project examples/003-MiniWebApp exits 0 and produces .phpc/bin/app without the user-class AOT trailer (lib/Cli/PhpcBuild.php).

Scope

Implementation hints

Area Files Notes
AOT object model lib/AOT/, lib/JIT/Type/Object_.php Bootstrap minimal_class patterns
Link lib/AOT/Linker.php Per-class vtable + property offsets
Project build lib/Cli/PhpcBuild.php, lib/Web/ProjectManifest.php includes[] merge (#452 ✅)
Void+include lib/JIT.php, lib/JIT/IncludeHelper.php #734 landed; verify on full Router graph
Methods lib/JIT.php compileClass router::dispatch export names

Reproduce

make docker-build-22
./script/docker-ci-local.sh --filter 'PhpcBuildProjectTest::testMiniWebAppBuildLinksNativeBinary'
cd examples/003-MiniWebApp && ../../phpc build --project . --verbose

Acceptance criteria

Dependencies

Verification (local / Docker only)

docker run --rm -i -w /compiler php-compiler:22.04-dev bash -lc '
  tar -xf - && ./script/docker-ci-local.sh --filter PhpcBuildProjectTest::testMiniWebAppBuildLinksNativeBinary
' < <(tar -cf - --exclude=.git --exclude=.llvm .)

No GitHub Actions required.

Links

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions