Skip to content

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

Merged
adriadam10 merged 1 commit into
boykopovar:mainfrom
bunbeans2-arch:fix/msys2-nghttp2-seh
Oct 29, 2026
Merged

adriadam10 merged 1 commit into
boykopovar:mainfrom
bunbeans2-arch:fix/msys2-nghttp2-seh

Conversation

@bunbeans2-arch

Copy link
Copy Markdown
Contributor

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 2960e9a; 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

With GCC whose exceptions are SEH, as MSYS2 UCRT64 ships it, link_libraries
adds windows_seh_personalities to every later target, nghttp2_static
included. nghttp2's install(EXPORT) then fails at generation because the
object library is in no export set, so the Windows MSYS2 workflow stops at
configure. nghttp2 is C and needs no personality routine; the libraries
that link it still get it from link_libraries.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@THEMANnt THEMANnt left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@github-actions

Copy link
Copy Markdown

Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.

Pull request Shared files not compared
PR 11611 core/libs/prx/libSceHttp2/CMakeLists.txt
PR 12306 core/libs/prx/libSceHttp2/CMakeLists.txt
PR 12456 core/libs/prx/libSceHttp2/CMakeLists.txt

@adriadam10
adriadam10 merged commit b39facc into boykopovar:main Oct 29, 2026
11 checks passed
@adriadam10

Copy link
Copy Markdown
Collaborator

Checked the diff against the description: windows_seh_personalities is only defined and added through link_libraries in core/libs/CMakeLists.txt on SEH GCC, removing it from nghttp2_static's direct and interface link lists mirrors what libSceSsl does for everest, and dependants still get the object library. Conventions and Windows (WinLibs) jobs are green; merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants