fix(build): link draw trace test to Windows unwind runtime #6267

Merged
Ondra97 merged 1 commit from upstream-pr/6267 into main 2026-10-15 08:33:39 +00:00
Ondra97 commented 2026-10-15 08:31:05 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Ondra97 on 2026-10-15T08:31:05Z.


What

I reproduced a linker failure on clean main db81992c554f1b395b4c04987cfbdc316a03d69b with the supported MinGW-w64 GCC 15.2.0. The agc_driver_draw_program_trace_tests target introduced by #5238 has unresolved __gxx_personality_v0 references, which also stops the full Windows build.

The library build selects DWARF exceptions globally through -fno-asynchronous-unwind-tables. On MinGW, I link this standalone test to the existing libc unwind runtime and add its directory to the CTest loader path, following the nearby AGC test targets. The executable now imports __gxx_personality_v0, __cxa_throw and __cxa_begin_catch from libc.prx and retains its configured .ehfram section. The existing formatter test runs successfully with a reduced PATH containing only MinGW and Windows system directories.

I checked the current open PR inventory, full file lists for the large branches and exact CMake diffs of 87 shared branches. None has the new formatter target or changes its global DWARF setup. I manually compared the target with the unwind helper and nearby tests, #5431's independent capture-trace tests, #6044's registration changes, and #5238's current discussion. No open PR owns this build fix.

Tested

  • Windows 11 Pro 10.0.26300, supported WinLibs MinGW-w64 GCC 15.2.0, Release. Clean-main target build reproduced the unresolved personality symbol; the fixed target builds and its existing CTest passes.
  • Hardware: AMD Ryzen 9 7900X, 32 GB RAM, NVIDIA GeForce RTX 4070 Ti SUPER.
  • Full Windows build passed, including system libraries and NID patching.
  • Six CTest entries passed, no skips: formatter, Windows exceptions, unwind-record bounds, patched libraries, AGC driver submissions and AGC graphics. The batch took 9.48 seconds; longest test 4.58 seconds.
  • GPU tests used ANYPS5_REQUIRE_VULKAN=1, ANYPS5_NO_SHADER_CACHE=1 on NVIDIA GeForce RTX 4070 Ti SUPER, driver 617.14 (Windows 32.0.16.1714), Windows 11 Pro 10.0.26300.
  • Test registration audit and whitespace check passed. Existing test timeout remains 20 seconds.

Limits: no Linux runtime, other GPU vendor or retail title run. Full hosted Windows/Linux builds require collaborator dispatch under CONTRIBUTING.md; skipped jobs are not passes.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Unblocks: none
  • GPUs tested: NVIDIA GeForce RTX 4070 Ti SUPER, NVIDIA 617.14 (Windows driver 32.0.16.1714), Windows 11 Pro 10.0.26300
  • AI-assisted: yes — Codex. I am responsible for the change.
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4870449849 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6267). Originally posted by [Ondra97](https://github.com/Ondra97) on 2026-10-15T08:31:05Z. --- ### What I reproduced a linker failure on clean main `db81992c554f1b395b4c04987cfbdc316a03d69b` with the supported MinGW-w64 GCC 15.2.0. The `agc_driver_draw_program_trace_tests` target introduced by #5238 has unresolved `__gxx_personality_v0` references, which also stops the full Windows build. The library build selects DWARF exceptions globally through `-fno-asynchronous-unwind-tables`. On MinGW, I link this standalone test to the existing `libc` unwind runtime and add its directory to the CTest loader path, following the nearby AGC test targets. The executable now imports `__gxx_personality_v0`, `__cxa_throw` and `__cxa_begin_catch` from `libc.prx` and retains its configured `.ehfram` section. The existing formatter test runs successfully with a reduced PATH containing only MinGW and Windows system directories. I checked the current open PR inventory, full file lists for the large branches and exact CMake diffs of 87 shared branches. None has the new formatter target or changes its global DWARF setup. I manually compared the target with the unwind helper and nearby tests, #5431's independent capture-trace tests, #6044's registration changes, and #5238's current discussion. No open PR owns this build fix. ### Tested - Windows 11 Pro 10.0.26300, supported WinLibs MinGW-w64 GCC 15.2.0, Release. Clean-main target build reproduced the unresolved personality symbol; the fixed target builds and its existing CTest passes. - Hardware: AMD Ryzen 9 7900X, 32 GB RAM, NVIDIA GeForce RTX 4070 Ti SUPER. - Full Windows build passed, including system libraries and NID patching. - Six CTest entries passed, no skips: formatter, Windows exceptions, unwind-record bounds, patched libraries, AGC driver submissions and AGC graphics. The batch took 9.48 seconds; longest test 4.58 seconds. - GPU tests used `ANYPS5_REQUIRE_VULKAN=1`, `ANYPS5_NO_SHADER_CACHE=1` on NVIDIA GeForce RTX 4070 Ti SUPER, driver 617.14 (Windows 32.0.16.1714), Windows 11 Pro 10.0.26300. - Test registration audit and whitespace check passed. Existing test timeout remains 20 seconds. Limits: no Linux runtime, other GPU vendor or retail title run. Full hosted Windows/Linux builds require collaborator dispatch under `CONTRIBUTING.md`; skipped jobs are not passes. ### Checklist - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except [technical debt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed under Silent stubs in their library's [technical debt](https://github.com/boykopovar/AnyPS5/tree/main/docs/dev/debt) file - [x] No notes, investigation `.md` files or images added to the repository (attach them to this PR) - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] Unblocks: none - [x] GPUs tested: NVIDIA GeForce RTX 4070 Ti SUPER, NVIDIA 617.14 (Windows driver 32.0.16.1714), Windows 11 Pro 10.0.26300 - [x] AI-assisted: yes — Codex. I am responsible for the change.
Amoenus commented 2026-10-15 08:38:05 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Amoenus on 2026-10-15T08:38:05Z.


Independent post-merge Windows validation at main c0be1f69bc04c2ec4ba2b79919d89cdc41509084: full application and libs builds pass. agc_driver_draw_program_trace, agc_tessellation_factor_ring, agc_pass_hazards and agc_dcc_key_sharing pass five times each, no failures/skips; maximum 0.02s, timeout20s. Tests run with PATH reduced to the supported MinGW toolchain and Windows directories; the CTest environment finds unpatched libc as intended. Conventions pass.

Windows11 Enterprise26200, WinLibs GCC15.2.0 r7, Release/BUILD_TESTING=ON, bundled dependencies. The original unresolved __gxx_personality_v0 failure was independently reproduced on unchanged db81992c5 before this merged fix. Our concurrent local candidate is superseded by this PR; these passing results use your actual merged main. CPU-only: no GPU/title/full-suite or Linux claim. AI-assisted: Codex.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6188021142 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6267#issuecomment-6188021142). Originally posted by [Amoenus](https://github.com/Amoenus) on 2026-10-15T08:38:05Z. --- <!-- codex-post-merge-draw-trace-validation-v1 --> Independent post-merge Windows validation at main `c0be1f69bc04c2ec4ba2b79919d89cdc41509084`: full application and `libs` builds pass. `agc_driver_draw_program_trace`, `agc_tessellation_factor_ring`, `agc_pass_hazards` and `agc_dcc_key_sharing` pass **five times each**, no failures/skips; maximum 0.02s, timeout20s. Tests run with `PATH` reduced to the supported MinGW toolchain and Windows directories; the CTest environment finds unpatched `libc` as intended. Conventions pass. Windows11 Enterprise26200, WinLibs GCC15.2.0 r7, Release/BUILD_TESTING=ON, bundled dependencies. The original unresolved `__gxx_personality_v0` failure was independently reproduced on unchanged db81992c5 before this merged fix. Our concurrent local candidate is superseded by this PR; these passing results use your actual merged main. CPU-only: no GPU/title/full-suite or Linux claim. AI-assisted: Codex.
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5!6267
No description provided.