fix(cmake): keep the SEH personalities out of nghttp2's export set #12731

Merged
bunbeans2-arch merged 1 commit from upstream-pr/12731 into main 2026-10-29 23:10:33 +00:00
bunbeans2-arch commented 2026-10-29 05:57:39 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by bunbeans2-arch on 2026-10-29T05:57:39Z.


What

With GCC whose exceptions are SEH, as MSYS2 UCRT64 ships it, core/libs/CMakeLists.txt calls link_libraries(windows_seh_personalities), and every later target gets the object library, nghttp2_static included. nghttp2's install(EXPORT "nghttp2Targets") then fails at generation:

CMake Error in 3rdparty/nghttp2/lib/CMakeLists.txt:
  install(EXPORT "nghttp2Targets" ...) includes target "nghttp2_static" which
  requires target "windows_seh_personalities" that is not in any export set.

The Windows MSYS2 workflow stops at this configure step since nghttp2 came in with #10167: the runs of 2026-10-27 and 2026-10-28 on main. The windows job in build.yml (WinLibs GCC 15.2) configures with install rules too and passes on main, so it does not define the target.

This removes windows_seh_personalities from nghttp2_static's LINK_LIBRARIES and INTERFACE_LINK_LIBRARIES after the subdirectory is added, as libSceSsl does for mbedtls's everest. nghttp2 is C and needs no personality routine; the libraries that link it still get the object library through link_libraries.

Tested

Windows 11 Pro 10.0.22631, MSYS2 UCRT64 GCC 16.1.0, CMake 4.3.3, Ninja 1.13.2, configured as windows-msys2.yml does (install rules on, -DANYPS5_AGC_EXECUTION_TESTS=F16ToF32Unpack;F64FmaSubnormals;RegistrationPrepareShutdown).

  • main 52c09d5: configure fails with the error above.
  • This change on 52c09d5: configure and generation pass; cmake --build, cmake --build --target libs and python tools/check_test_registration.py build pass.
  • ctest --output-on-failure --timeout 120 --parallel 4: 5 failures, each also failing serially on main 52c09d5 on this machine (that tree configured with -DCMAKE_SKIP_INSTALL_RULES=ON, since it cannot configure otherwise): guest_future_category, guest_job_manager_worker_count, guest_json_copy_failure, guest_libressl_object_allocation, guest_freebsd_clocks. The last run of the workflow that reached ctest (2026-10-25) failed only guest_json_copy_failure.
  • The branch was then rebased onto 2960e9a6e; neither core/libs/CMakeLists.txt, core/libs/prx/libSceHttp2/CMakeLists.txt nor 3rdparty/nghttp2 changed in between.
  • Not run: Linux, macOS and WinLibs builds. Where the target is not defined, removing it from the lists changes nothing.

python3 tools/check_conventions.py --base origin/main passes. python3 tools/pr_overlap.py --branch fix/msys2-nghttp2-seh reports no shared lines; #11470, #11611 and #12456 change other lines of the same file.

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
  • Fixes: none
  • Unblocks: none
  • GPUs tested: n/a
  • AI-assisted: yes (Claude Code)

🤖 Generated with Claude Code

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5063099055 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/12731). Originally posted by [bunbeans2-arch](https://github.com/bunbeans2-arch) on 2026-10-29T05:57:39Z. --- ### What With GCC whose exceptions are SEH, as MSYS2 UCRT64 ships it, `core/libs/CMakeLists.txt` calls `link_libraries(windows_seh_personalities)`, and every later target gets the object library, `nghttp2_static` included. nghttp2's `install(EXPORT "nghttp2Targets")` then fails at generation: ``` CMake Error in 3rdparty/nghttp2/lib/CMakeLists.txt: install(EXPORT "nghttp2Targets" ...) includes target "nghttp2_static" which requires target "windows_seh_personalities" that is not in any export set. ``` The Windows MSYS2 workflow stops at this configure step since nghttp2 came in with #10167: the runs of 2026-10-27 and 2026-10-28 on `main`. The `windows` job in `build.yml` (WinLibs GCC 15.2) configures with install rules too and passes on `main`, so it does not define the target. This removes `windows_seh_personalities` from `nghttp2_static`'s `LINK_LIBRARIES` and `INTERFACE_LINK_LIBRARIES` after the subdirectory is added, as `libSceSsl` does for mbedtls's `everest`. nghttp2 is C and needs no personality routine; the libraries that link it still get the object library through `link_libraries`. ### Tested <!-- OS, title or homebrew, what was checked. "Not tested" is a valid answer. A performance change: the summary lines of main and of this PR from the same machine and scene, with the traces attached, captured as the Performance report issue form describes. --> Windows 11 Pro 10.0.22631, MSYS2 UCRT64 GCC 16.1.0, CMake 4.3.3, Ninja 1.13.2, configured as `windows-msys2.yml` does (install rules on, `-DANYPS5_AGC_EXECUTION_TESTS=F16ToF32Unpack;F64FmaSubnormals;RegistrationPrepareShutdown`). - `main` 52c09d5: configure fails with the error above. - This change on 52c09d5: configure and generation pass; `cmake --build`, `cmake --build --target libs` and `python tools/check_test_registration.py build` pass. - `ctest --output-on-failure --timeout 120 --parallel 4`: 5 failures, each also failing serially on `main` 52c09d5 on this machine (that tree configured with `-DCMAKE_SKIP_INSTALL_RULES=ON`, since it cannot configure otherwise): `guest_future_category`, `guest_job_manager_worker_count`, `guest_json_copy_failure`, `guest_libressl_object_allocation`, `guest_freebsd_clocks`. The last run of the workflow that reached ctest (2026-10-25) failed only `guest_json_copy_failure`. - The branch was then rebased onto 2960e9a6e; neither `core/libs/CMakeLists.txt`, `core/libs/prx/libSceHttp2/CMakeLists.txt` nor `3rdparty/nghttp2` changed in between. - Not run: Linux, macOS and WinLibs builds. Where the target is not defined, removing it from the lists changes nothing. `python3 tools/check_conventions.py --base origin/main` passes. `python3 tools/pr_overlap.py --branch fix/msys2-nghttp2-seh` reports no shared lines; #11470, #11611 and #12456 change other lines of the same file. ### Checklist <!-- Rules behind each item: https://github.com/boykopovar/AnyPS5/blob/main/CONTRIBUTING.md --> - [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] Fixes: none - [x] Unblocks: none - [x] GPUs tested: n/a - [x] AI-assisted: yes (Claude Code) 🤖 Generated with [Claude Code](https://claude.com/claude-code)
THEMANnt commented 2026-10-29 07:18:23 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by THEMANnt on 2026-10-29T07:18:23Z.

Review: APPROVED


Reviewed 3ec77ef7178090305bc0c714289180fcd840dcfb against 2960e9a6e7e1fc99c4ed180c71495b5eb83464c7. Removing the inherited object target from nghttp2_static's direct/interface link properties addresses the export-set dependency without changing inheritance for the surrounding host libraries. No actionable finding in this scoped CMake fix.

Windows/GCC 15.3 (DWARF exceptions): the full pinned head and baseline configurations both succeed, so that alone does not reproduce the SEH-specific failure. I built a separate CMake control using the actual matching nghttp2 source, the submitted backend configuration/fix block, and an explicitly inherited windows_seh_personalities object target. Baseline generation fails with the exact missing-export-set dependency; the fixed configuration generates successfully and nghttp2_static builds. This independently verifies the CMake dependency mechanism, not a GCC 16.1/MSYS2 SEH build or the author's full CTest results.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5694126354 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/12731#pullrequestreview-5694126354). Originally posted by [THEMANnt](https://github.com/THEMANnt) on 2026-10-29T07:18:23Z. **Review:** APPROVED --- Reviewed `3ec77ef7178090305bc0c714289180fcd840dcfb` against `2960e9a6e7e1fc99c4ed180c71495b5eb83464c7`. Removing the inherited object target from nghttp2_static's direct/interface link properties addresses the export-set dependency without changing inheritance for the surrounding host libraries. No actionable finding in this scoped CMake fix. Windows/GCC 15.3 (DWARF exceptions): the full pinned head and baseline configurations both succeed, so that alone does not reproduce the SEH-specific failure. I built a separate CMake control using the actual matching nghttp2 source, the submitted backend configuration/fix block, and an explicitly inherited windows_seh_personalities object target. Baseline generation fails with the exact missing-export-set dependency; the fixed configuration generates successfully and nghttp2_static builds. This independently verifies the CMake dependency mechanism, not a GCC 16.1/MSYS2 SEH build or the author's full CTest results.
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!12731
No description provided.