fix(libkernel): restore Windows select build for Demons Souls testing #4021

Merged
Mouhand-Kaddo merged 1 commit from upstream-pr/4021 into main 2026-10-11 23:30:31 +00:00
Mouhand-Kaddo commented 2026-10-11 21:34:00 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Mouhand-Kaddo on 2026-10-11T21:34:00Z.


What

Windows builds of current main cannot produce libkernel, blocking Demon's Souls startup testing. The host-file descriptor support merged in #3462 defines HostPoll only for non-Windows builds but calls it from two unguarded branches:

Socket.cpp:194:39: error: 'HostPoll' was not declared in this scope
Socket.cpp:212:17: error: 'HostPoll' was not declared in this scope

Compile those Unix host-file polling branches under the same platform guard as the helper and host descriptor classification. Windows socket selection continues through the socket poller; unsupported descriptors still throw during classification.

Tested

Windows 11 x64, MinGW GCC 15.2, Release, base 989146c3b:

  • cmake --build build-windows --target libkernel --parallel 4 fails on main with both errors above and builds with this change.
  • The full libs target builds successfully with this change.
  • guest_sce_net, guest_sysmodule, guest_socket_read_write, guest_socket_pair and guest_socket_events: 5/5 pass. guest_sce_net covers immediate and timed select, invalid timeouts and descriptor ranges, and mixed socket/device descriptors.
  • Local testing is Windows-only.

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 in TechnicalDebt
  • 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 (#3462 is merged)
  • AI-assisted: yes (Codex)
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4822529292 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/4021). Originally posted by [Mouhand-Kaddo](https://github.com/Mouhand-Kaddo) on 2026-10-11T21:34:00Z. --- ### What Windows builds of current main cannot produce `libkernel`, blocking Demon's Souls startup testing. The host-file descriptor support merged in #3462 defines `HostPoll` only for non-Windows builds but calls it from two unguarded branches: ```text Socket.cpp:194:39: error: 'HostPoll' was not declared in this scope Socket.cpp:212:17: error: 'HostPoll' was not declared in this scope ``` Compile those Unix host-file polling branches under the same platform guard as the helper and host descriptor classification. Windows socket selection continues through the socket poller; unsupported descriptors still throw during classification. ### Tested Windows 11 x64, MinGW GCC 15.2, Release, base `989146c3b`: - `cmake --build build-windows --target libkernel --parallel 4` fails on main with both errors above and builds with this change. - The full `libs` target builds successfully with this change. - `guest_sce_net`, `guest_sysmodule`, `guest_socket_read_write`, `guest_socket_pair` and `guest_socket_events`: 5/5 pass. `guest_sce_net` covers immediate and timed `select`, invalid timeouts and descriptor ranges, and mixed socket/device descriptors. - Local testing is Windows-only. ### 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 in [TechnicalDebt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/TechnicalDebt.md#silent-stubs) - [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 (#3462 is merged) - [x] AI-assisted: yes (Codex)
Amoenus commented 2026-10-11 21:54:25 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Amoenus on 2026-10-11T21:54:25Z.


Independent validation of the exact Socket.cpp correction from 121b16fb4bbd47ff4ce9302c40631bab858e3e71, applied to our local diagnostic integration based on main a672688e94f3ba3503c58fc70871f37c4f198a28:

  • Windows 11, MinGW GCC 15.2 UCRT POSIX SEH, Release, BUILD_TESTING=ON: the uncorrected main translation unit fails at both HostPoll references; the corrected translation unit passes. The full integration build and libs target then pass.
  • guest_sce_net, guest_sysmodule, guest_socket_read_write, guest_socket_pair, and guest_socket_events each pass five times without skips. Reproduction after building: ctest --test-dir build-review -R "^(guest_sce_net|guest_sysmodule|guest_socket_read_write|guest_socket_pair|guest_socket_events)$" --repeat until-fail:5 --parallel 1 --timeout 30 -V.
  • Ubuntu 24.04 WSL, GCC 13.3: both exact translation units pass syntax checks; their preprocessed C++ lexical tokens are identical (507426 tokens, strings preserved). This checks the Linux source path; no Linux runtime or full Linux build claim.

Scope: this validates the exact correction with current integration headers, not a full build of the unchanged PR head. The integration required a separate local ColorTarget::arraySlice consolidation. Its broader 868-test suite has one unrelated synchronous registered-workgroup test failure under investigation, so this is not a claim that the entire suite passes. No push or new PR.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6114222379 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/4021#issuecomment-6114222379). Originally posted by [Amoenus](https://github.com/Amoenus) on 2026-10-11T21:54:25Z. --- <!-- amoenus-validation:4021-windows-select --> Independent validation of the exact `Socket.cpp` correction from `121b16fb4bbd47ff4ce9302c40631bab858e3e71`, applied to our local diagnostic integration based on main `a672688e94f3ba3503c58fc70871f37c4f198a28`: - Windows 11, MinGW GCC 15.2 UCRT POSIX SEH, Release, `BUILD_TESTING=ON`: the uncorrected main translation unit fails at both `HostPoll` references; the corrected translation unit passes. The full integration build and `libs` target then pass. - `guest_sce_net`, `guest_sysmodule`, `guest_socket_read_write`, `guest_socket_pair`, and `guest_socket_events` each pass five times without skips. Reproduction after building: `ctest --test-dir build-review -R "^(guest_sce_net|guest_sysmodule|guest_socket_read_write|guest_socket_pair|guest_socket_events)$" --repeat until-fail:5 --parallel 1 --timeout 30 -V`. - Ubuntu 24.04 WSL, GCC 13.3: both exact translation units pass syntax checks; their preprocessed C++ lexical tokens are identical (507426 tokens, strings preserved). This checks the Linux source path; no Linux runtime or full Linux build claim. Scope: this validates the exact correction with current integration headers, **not a full build of the unchanged PR head**. The integration required a separate local `ColorTarget::arraySlice` consolidation. Its broader 868-test suite has one unrelated synchronous registered-workgroup test failure under investigation, so this is not a claim that the entire suite passes. No push or new PR.
xXPBSXx commented 2026-10-11 22:08:44 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by xXPBSXx on 2026-10-11T22:08:44Z.


Confirming the Windows build break this fixes, on main ca4ab0d5d (MinGW GCC 15.2.0): core/libs/prx/libkernel/Socket/src/Socket.cpp:194:39 and :212:17 fail with error: 'HostPoll' was not declared in this scope; HostPoll is defined only inside the #ifndef _WIN32 block (line 66 in that file at that commit) and called from select on every platform. Building libkernel with this PR applied on top of main succeeds.

AI-assisted (Claude Code).

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6114390124 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/4021#issuecomment-6114390124). Originally posted by [xXPBSXx](https://github.com/xXPBSXx) on 2026-10-11T22:08:44Z. --- Confirming the Windows build break this fixes, on `main` `ca4ab0d5d` (MinGW GCC 15.2.0): `core/libs/prx/libkernel/Socket/src/Socket.cpp:194:39` and `:212:17` fail with `error: 'HostPoll' was not declared in this scope`; `HostPoll` is defined only inside the `#ifndef _WIN32` block (line 66 in that file at that commit) and called from `select` on every platform. Building `libkernel` with this PR applied on top of `main` succeeds. AI-assisted (Claude Code).
screamm commented 2026-10-11 22:21:33 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by screamm on 2026-10-11T22:21:33Z.


Windows validation (Windows 11 Pro 26220, WinLibs MinGW-w64 GCC 15.2.0 r7, Ninja, Release, BUILD_TESTING=ON): main 1a7b96b5 fails exactly as described (Socket.cpp:194:39 and :212:17: 'HostPoll' was not declared in this scope), so no Windows build of libkernel is possible on current main. With 121b16fb merged onto 1a7b96b5 the full build including libs succeeds; guest_select, guest_socket_pair, guest_socket_read_write, guest_poll 3/3 with --repeat until-fail:3; ctest -j8 -E "^agc_driver_|^video_out_flip" 573/575. The two failures are unrelated to this file and new on this host since a11c8f7f: agc_write_tracking (write tracking test failed: an unwatched range reads as not stored over) and guest_kernel_stack_protect (FATAL: abort() (SIGABRT)); the earlier Windows failures windows_exceptions, guest_kernel_sys and guest_filesystem are gone on this main. This fix unblocks every Windows build, so merging it first would help everyone validating on Windows.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6114539475 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/4021#issuecomment-6114539475). Originally posted by [screamm](https://github.com/screamm) on 2026-10-11T22:21:33Z. --- Windows validation (Windows 11 Pro 26220, WinLibs MinGW-w64 GCC 15.2.0 r7, Ninja, Release, `BUILD_TESTING=ON`): `main` `1a7b96b5` fails exactly as described (`Socket.cpp:194:39` and `:212:17`: `'HostPoll' was not declared in this scope`), so no Windows build of `libkernel` is possible on current `main`. With `121b16fb` merged onto `1a7b96b5` the full build including `libs` succeeds; `guest_select`, `guest_socket_pair`, `guest_socket_read_write`, `guest_poll` 3/3 with `--repeat until-fail:3`; `ctest -j8 -E "^agc_driver_|^video_out_flip"` 573/575. The two failures are unrelated to this file and new on this host since `a11c8f7f`: `agc_write_tracking` (`write tracking test failed: an unwatched range reads as not stored over`) and `guest_kernel_stack_protect` (`FATAL: abort() (SIGABRT)`); the earlier Windows failures `windows_exceptions`, `guest_kernel_sys` and `guest_filesystem` are gone on this `main`. This fix unblocks every Windows build, so merging it first would help everyone validating on Windows.
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!4021
No description provided.