build: add ANYPS5_USE_SYSTEM_DEPS option #921

Merged
011010 merged 5 commits from upstream-pr/921 into main 2026-10-11 08:30:35 +00:00
011010 commented 2026-10-06 17:14:01 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by 011010 on 2026-10-06T17:14:01Z.


What

Adds ANYPS5_USE_SYSTEM_DEPS, OFF by default (implements #400). With it ON, SDL2, freetype, Vulkan-Headers, SPIRV-Headers, glslang and SPIRV-Tools come from the system instead of the bundled submodules. The default build is unchanged: the option only wraps the existing add_subdirectory calls and skips the bundled shader-cache submodule stamps.

Design:

  • cmake/SystemDeps.cmake resolves each package with find_package(... CONFIG) (freetype through FindFreetype) and re-exposes them under the target names the rest of the build already uses: SDL2-static, freetype, glslang, SPIRV, glslang-standalone, SPIRV-Tools-opt, SPIRV-Tools-static. Because of that, no other CMake file changed except the two submodule stamps in core/shader/recompiler/CMakeLists.txt, which would otherwise depend on the missing bundled paths.
  • Every package is required. A missing one fails the configure (find_package(... REQUIRED)), and if glslang is found without the tools, or the headers are incomplete, the configure fails with a named error. Nothing falls back to the submodule, as you asked.
  • The system glslang splits the headers (<prefix>/include/glslang/Public/... and <prefix>/include/glslang/SPIRV/GlslangToSpv.h), unlike the bundled single root; the helper adds both.
  • Vulkan-Headers must provide VK_KHR_maintenance8, which the agc driver uses. The helper checks it at configure with check_cxx_source_compiles on VkPhysicalDeviceMaintenance8FeaturesKHR and fails with a clear message when the headers are older. Ubuntu 24.04 (headers 1.4.304) fails there; Ubuntu 25.10 (1.4.321) passes.
  • SDL2 is linked from the system as a shared library (SDL2::SDL2). The prx libraries are shared objects and distribution static SDL2 is built without PIC, so libSDL2.a cannot be linked into them (relocation R_X86_64_PC32 ... can not be used when making a shared object). The default build keeps its own static SDL2. The other five packages link fine from the system.
  • ffmpeg-core (carries ffmpeg.patch), libjpeg-turbo, stb, VulkanMemoryAllocator and LibAtrac9 always stay bundled and still need git submodule update --init.

On your Linux-only vs Windows question: the interface is platform-neutral, but I only exercised the Linux packages, so I would call the Windows side untested rather than claim it. If you prefer to scope it to Linux for now, that is a small change to the helper.

Tested

Ubuntu 25.10 and 24.04 in linux/amd64 containers (the host is arm64; Docker Desktop runs the containers through Rosetta). Packages: libsdl2-dev libfreetype-dev libvulkan-dev spirv-headers glslang-dev glslang-tools spirv-tools, GCC 15, Ninja, x86-64 as the project requires.

  • -DANYPS5_USE_SYSTEM_DEPS=ON: configure OK and cmake --build . --target libs builds.
  • -DANYPS5_USE_SYSTEM_DEPS=ON -DBUILD_TESTING=ON: configure OK; pad_sdl_tests builds (the executables keep -static-libgcc -static-libstdc++ and link the shared system SDL2).
  • Ubuntu 24.04 (Vulkan-Headers 1.4.304): configure fails with the VK_KHR_maintenance8 message, at configure time.
  • Missing package (-DCMAKE_DISABLE_FIND_PACKAGE_glslang=ON, and separately SDL2 and SPIRV-Tools-opt): configure fails with a named error each time.
  • Default (flag OFF): still reaches add_subdirectory(3rdparty/SDL2) and add_subdirectory(3rdparty/freetype).
  • The relinker and the rest of the tree are untouched; both paths use the same target names.

Not tested: Windows, and no PS5 title.

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
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4762198539 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/921). Originally posted by [011010](https://github.com/011010) on 2026-10-06T17:14:01Z. --- ### What Adds `ANYPS5_USE_SYSTEM_DEPS`, OFF by default (implements #400). With it ON, `SDL2`, `freetype`, `Vulkan-Headers`, `SPIRV-Headers`, `glslang` and `SPIRV-Tools` come from the system instead of the bundled submodules. The default build is unchanged: the option only wraps the existing `add_subdirectory` calls and skips the bundled shader-cache submodule stamps. Design: - `cmake/SystemDeps.cmake` resolves each package with `find_package(... CONFIG)` (`freetype` through `FindFreetype`) and re-exposes them under the target names the rest of the build already uses: `SDL2-static`, `freetype`, `glslang`, `SPIRV`, `glslang-standalone`, `SPIRV-Tools-opt`, `SPIRV-Tools-static`. Because of that, no other CMake file changed except the two submodule stamps in `core/shader/recompiler/CMakeLists.txt`, which would otherwise depend on the missing bundled paths. - Every package is required. A missing one fails the configure (`find_package(... REQUIRED)`), and if `glslang` is found without the tools, or the headers are incomplete, the configure fails with a named error. Nothing falls back to the submodule, as you asked. - The system glslang splits the headers (`<prefix>/include/glslang/Public/...` and `<prefix>/include/glslang/SPIRV/GlslangToSpv.h`), unlike the bundled single root; the helper adds both. - Vulkan-Headers must provide `VK_KHR_maintenance8`, which the agc driver uses. The helper checks it at configure with `check_cxx_source_compiles` on `VkPhysicalDeviceMaintenance8FeaturesKHR` and fails with a clear message when the headers are older. Ubuntu 24.04 (headers 1.4.304) fails there; Ubuntu 25.10 (1.4.321) passes. - `SDL2` is linked from the system as a shared library (`SDL2::SDL2`). The prx libraries are shared objects and distribution static SDL2 is built without PIC, so `libSDL2.a` cannot be linked into them (`relocation R_X86_64_PC32 ... can not be used when making a shared object`). The default build keeps its own static SDL2. The other five packages link fine from the system. - `ffmpeg-core` (carries `ffmpeg.patch`), `libjpeg-turbo`, `stb`, `VulkanMemoryAllocator` and `LibAtrac9` always stay bundled and still need `git submodule update --init`. On your Linux-only vs Windows question: the interface is platform-neutral, but I only exercised the Linux packages, so I would call the Windows side untested rather than claim it. If you prefer to scope it to Linux for now, that is a small change to the helper. ### Tested Ubuntu 25.10 and 24.04 in linux/amd64 containers (the host is arm64; Docker Desktop runs the containers through Rosetta). Packages: `libsdl2-dev libfreetype-dev libvulkan-dev spirv-headers glslang-dev glslang-tools spirv-tools`, GCC 15, Ninja, x86-64 as the project requires. - `-DANYPS5_USE_SYSTEM_DEPS=ON`: configure OK and `cmake --build . --target libs` builds. - `-DANYPS5_USE_SYSTEM_DEPS=ON -DBUILD_TESTING=ON`: configure OK; `pad_sdl_tests` builds (the executables keep `-static-libgcc -static-libstdc++` and link the shared system SDL2). - Ubuntu 24.04 (Vulkan-Headers 1.4.304): configure fails with the `VK_KHR_maintenance8` message, at configure time. - Missing package (`-DCMAKE_DISABLE_FIND_PACKAGE_glslang=ON`, and separately `SDL2` and `SPIRV-Tools-opt`): configure fails with a named error each time. - Default (flag OFF): still reaches `add_subdirectory(3rdparty/SDL2)` and `add_subdirectory(3rdparty/freetype)`. - The relinker and the rest of the tree are untouched; both paths use the same target names. Not tested: Windows, and no PS5 title. ### 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 - [x] AI-assisted: yes
011010 commented 2026-10-06 21:16:24 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by 011010 on 2026-10-06T21:16:24Z.


The overlap with #674 is textual, not a dependency. #674 flips SDL_RENDER to ON for its ImGui input editor; this PR only guards the add_subdirectory calls of the bundled libraries. I moved the guard so it no longer wraps the SDL cache block, so the changed lines do not overlap #674's any more. There is no Depends on.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6025606813 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/921#issuecomment-6025606813). Originally posted by [011010](https://github.com/011010) on 2026-10-06T21:16:24Z. --- The overlap with #674 is textual, not a dependency. #674 flips `SDL_RENDER` to `ON` for its ImGui input editor; this PR only guards the `add_subdirectory` calls of the bundled libraries. I moved the guard so it no longer wraps the SDL cache block, so the changed lines do not overlap #674's any more. There is no `Depends on`.
adriadam10 commented 2026-10-07 09:14:19 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-07T09:14:19Z.

Review: CHANGES_REQUESTED


Thanks, the scope matches what was agreed in #400 and the default build is unchanged (merged onto current main, full ctest green here). Three things before it can go in:

  • Bundled headers are still on the include path. Many targets keep hard-coded submodule include dirs, e.g. core/libs/prx/libSceAgcDriver/CMakeLists.txt:179-180,292,306,378,455-456,480,493-494,510,599-600,660 (3rdparty/Vulkan-Headers/include, 3rdparty/SPIRV-Headers/include), core/shader/recompiler/CMakeLists.txt:154-155 (3rdparty/SPIRV-Headers/include, 3rdparty/glslang), and 3rdparty/SDL2/include in libSceAudioOut, libSceAudioIn, libSceVideoOut, libScePad, libSceMouse and libSceKeyboard. The submodules are still checked out for ffmpeg-core/libjpeg-turbo/stb/VMA/LibAtrac9, so those dirs exist, and -I is searched before the include_directories(SYSTEM ...) you add. The ON build therefore compiles against the bundled Vulkan/SPIRV/SDL2/glslang headers and links the system libraries. The VK_KHR_maintenance8 check tests headers that are not the ones used, and a system SDL2/glslang older or newer than the submodule is an ABI mismatch nobody sees. That is a partial fallback to the submodules, which #400 asked to avoid. Suggested direction: route those paths through one variable or target per package (e.g. link Vulkan::Headers/SPIRV-Headers::SPIRV-Headers, or set ANYPS5_*_INCLUDE_DIR in one place to either the submodule or the system path). Then a build with those submodules deinitialised can prove nothing reads them.
  • Shader cache key (core/shader/recompiler/CMakeLists.txt:185-203): with the flag ON, the submodules section of the manifest is empty and there are no stamps, so upgrading the system glslang/SPIRV-Headers/SPIRV-Tools leaves the cache version unchanged and old cached shaders get reused. Adding the found package versions (glslang_VERSION, SPIRV-Headers_VERSION, SPIRV-Tools-opt_VERSION, Vulkan-Headers) to shaderCacheExtra when the flag is ON would cover it.
  • cmake/SystemDeps.cmake:1-8,15-16,57-59: CONTRIBUTING allows no code comments except technical debt. The rationale already lives in docs/dev/BUILD.md, so those comments can go.
<!-- greyfinch-sync:boykopovar/AnyPS5:review:5440156631 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/921#pullrequestreview-5440156631). Originally posted by [adriadam10](https://github.com/adriadam10) on 2026-10-07T09:14:19Z. **Review:** CHANGES_REQUESTED --- Thanks, the scope matches what was agreed in #400 and the default build is unchanged (merged onto current main, full ctest green here). Three things before it can go in: - **Bundled headers are still on the include path.** Many targets keep hard-coded submodule include dirs, e.g. `core/libs/prx/libSceAgcDriver/CMakeLists.txt:179-180,292,306,378,455-456,480,493-494,510,599-600,660` (`3rdparty/Vulkan-Headers/include`, `3rdparty/SPIRV-Headers/include`), `core/shader/recompiler/CMakeLists.txt:154-155` (`3rdparty/SPIRV-Headers/include`, `3rdparty/glslang`), and `3rdparty/SDL2/include` in libSceAudioOut, libSceAudioIn, libSceVideoOut, libScePad, libSceMouse and libSceKeyboard. The submodules are still checked out for ffmpeg-core/libjpeg-turbo/stb/VMA/LibAtrac9, so those dirs exist, and `-I` is searched before the `include_directories(SYSTEM ...)` you add. The ON build therefore compiles against the bundled Vulkan/SPIRV/SDL2/glslang headers and links the system libraries. The `VK_KHR_maintenance8` check tests headers that are not the ones used, and a system SDL2/glslang older or newer than the submodule is an ABI mismatch nobody sees. That is a partial fallback to the submodules, which #400 asked to avoid. Suggested direction: route those paths through one variable or target per package (e.g. link `Vulkan::Headers`/`SPIRV-Headers::SPIRV-Headers`, or set `ANYPS5_*_INCLUDE_DIR` in one place to either the submodule or the system path). Then a build with those submodules deinitialised can prove nothing reads them. - **Shader cache key** (`core/shader/recompiler/CMakeLists.txt:185-203`): with the flag ON, the `submodules` section of the manifest is empty and there are no stamps, so upgrading the system glslang/SPIRV-Headers/SPIRV-Tools leaves the cache version unchanged and old cached shaders get reused. Adding the found package versions (`glslang_VERSION`, `SPIRV-Headers_VERSION`, `SPIRV-Tools-opt_VERSION`, Vulkan-Headers) to `shaderCacheExtra` when the flag is ON would cover it. - `cmake/SystemDeps.cmake:1-8,15-16,57-59`: CONTRIBUTING allows no code comments except technical debt. The rationale already lives in `docs/dev/BUILD.md`, so those comments can go.
011010 commented 2026-10-07 15:50:45 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by 011010 on 2026-10-07T15:50:45Z.


Rebased onto current main and applied all three points.

  • Include routing. cmake/SystemDeps.cmake now defines ANYPS5_VULKAN_HEADERS_INCLUDE_DIR, ANYPS5_SPIRV_HEADERS_INCLUDE_DIR, ANYPS5_SDL2_INCLUDE_DIR and ANYPS5_GLSLANG_INCLUDE_DIRS: the submodule directories by default, and with ANYPS5_USE_SYSTEM_DEPS=ON the INTERFACE_INCLUDE_DIRECTORIES of Vulkan::Headers, SPIRV-Headers::SPIRV-Headers, SDL2::SDL2 and the glslang public/SPIRV roots, with a fatal error when a package exposes none. Every hard-coded 3rdparty/Vulkan-Headers/include, 3rdparty/SPIRV-Headers/include, 3rdparty/SDL2/include and 3rdparty/glslang include dir is replaced by the variables (libSceAgcDriver, libSceVideoOut, libSceAudioOut, libSceAudioIn, libScePad, libSceMouse, libSceKeyboard, shader recompiler), and the include_directories(SYSTEM ...) block is gone, so a build with the flag ON compiles against the headers of the package it links. The maintenance8 check tests the routed directory, the same one the targets use. References that stay with the bundled packages (stb, VulkanMemoryAllocator, ffmpeg-core, libjpeg-turbo, LibAtrac9) are unchanged.
  • Shader cache key. With the flag ON, shaderCacheExtra carries system-deps=VulkanHeaders=<ver> SPIRV-Headers=<ver> glslang=<ver>, and SPIRV-Tools-opt=<ver> when ANYPS5_ENABLE_SPIRV_TOOLS is on, taken from the found config packages' *_VERSION, unknown when a package does not expose one. Upgrading the system glslang or SPIRV-Headers now invalidates the cached shaders.
  • Comments. Removed from cmake/SystemDeps.cmake; the rationale is in docs/dev/BUILD.md.

Tested (Linux container, gcc 13, cmake 4, x86-64):

  • Default configure is unchanged.
  • ANYPS5_USE_SYSTEM_DEPS=ON configure succeeds with Vulkan-Headers and SPIRV-Headers installed under /usr/local from this repository's own submodules (real CMake config packages, 1.4.335, the maintenance8 check passes) plus system libsdl2-dev, libfreetype-dev, glslang-dev/glslang-tools.
  • cmake --build --target agc_driver_wave_uniform_tests with the flag ON completes (298 steps, links libSceAgcDriver.prx), and ldd of the test binary resolves libSDL2-2.0.so.0 from the system.
  • Nothing reads the bundled headers: compile_commands.json under ON has zero 3rdparty/Vulkan-Headers, 3rdparty/SPIRV-Headers, 3rdparty/glslang and 3rdparty/SDL2 include references (OFF: 413/378/434/590 of 1511 entries; ON: 0 of 1209), and build.ninja under ON repeats the same.

Not tested on Windows (no supported MinGW-w64 toolchain here). AI-assisted: yes.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6041519311 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/921#issuecomment-6041519311). Originally posted by [011010](https://github.com/011010) on 2026-10-07T15:50:45Z. --- Rebased onto current main and applied all three points. - **Include routing.** `cmake/SystemDeps.cmake` now defines `ANYPS5_VULKAN_HEADERS_INCLUDE_DIR`, `ANYPS5_SPIRV_HEADERS_INCLUDE_DIR`, `ANYPS5_SDL2_INCLUDE_DIR` and `ANYPS5_GLSLANG_INCLUDE_DIRS`: the submodule directories by default, and with `ANYPS5_USE_SYSTEM_DEPS=ON` the `INTERFACE_INCLUDE_DIRECTORIES` of `Vulkan::Headers`, `SPIRV-Headers::SPIRV-Headers`, `SDL2::SDL2` and the glslang public/SPIRV roots, with a fatal error when a package exposes none. Every hard-coded `3rdparty/Vulkan-Headers/include`, `3rdparty/SPIRV-Headers/include`, `3rdparty/SDL2/include` and `3rdparty/glslang` include dir is replaced by the variables (libSceAgcDriver, libSceVideoOut, libSceAudioOut, libSceAudioIn, libScePad, libSceMouse, libSceKeyboard, shader recompiler), and the `include_directories(SYSTEM ...)` block is gone, so a build with the flag ON compiles against the headers of the package it links. The `maintenance8` check tests the routed directory, the same one the targets use. References that stay with the bundled packages (`stb`, `VulkanMemoryAllocator`, `ffmpeg-core`, `libjpeg-turbo`, `LibAtrac9`) are unchanged. - **Shader cache key.** With the flag ON, `shaderCacheExtra` carries `system-deps=VulkanHeaders=<ver> SPIRV-Headers=<ver> glslang=<ver>`, and `SPIRV-Tools-opt=<ver>` when `ANYPS5_ENABLE_SPIRV_TOOLS` is on, taken from the found config packages' `*_VERSION`, `unknown` when a package does not expose one. Upgrading the system glslang or SPIRV-Headers now invalidates the cached shaders. - **Comments.** Removed from `cmake/SystemDeps.cmake`; the rationale is in `docs/dev/BUILD.md`. Tested (Linux container, gcc 13, cmake 4, x86-64): - Default configure is unchanged. - `ANYPS5_USE_SYSTEM_DEPS=ON` configure succeeds with `Vulkan-Headers` and `SPIRV-Headers` installed under /usr/local from this repository's own submodules (real CMake config packages, 1.4.335, the `maintenance8` check passes) plus system `libsdl2-dev`, `libfreetype-dev`, `glslang-dev`/`glslang-tools`. - `cmake --build --target agc_driver_wave_uniform_tests` with the flag ON completes (298 steps, links `libSceAgcDriver.prx`), and `ldd` of the test binary resolves `libSDL2-2.0.so.0` from the system. - Nothing reads the bundled headers: `compile_commands.json` under ON has zero `3rdparty/Vulkan-Headers`, `3rdparty/SPIRV-Headers`, `3rdparty/glslang` and `3rdparty/SDL2` include references (OFF: 413/378/434/590 of 1511 entries; ON: 0 of 1209), and `build.ninja` under ON repeats the same. Not tested on Windows (no supported MinGW-w64 toolchain here). AI-assisted: yes.
adriadam10 commented 2026-10-07 20:31:44 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-07T20:31:44Z.

Review: CHANGES_REQUESTED


Thanks, all three earlier points are addressed. The default build is unchanged: merged onto current main, full ctest is green here (400/400). Tried -DANYPS5_USE_SYSTEM_DEPS=ON -DBUILD_TESTING=ON on Arch (sdl2-compat 2.32.72, freetype 2.14.3, glslang/SPIRV-Tools 1.4.357, Vulkan-Headers 1.4.335). It configures, and all + libs build, but:

  • ctest is red with the system SDL2 (2 of 400). Arch and Fedora now ship SDL2 as sdl2-compat (SDL3 underneath):

    • pad_sdl fails: its SDL_config.h doesn't define SDL_JOYSTICK_HIDAPI (core/libs/prx/libSceVideoOut/tests/PadSdl.cpp:6).
    • audio_out_mix_level_pad_spk aborts: the disk driver opens the output as channels=2, and with the bundled SDL2 the same test passes.

    Either reject sdl2-compat at configure time with a named error, like the VK_KHR_maintenance8 check, or make both tests pass with it.

  • ANYPS5_ENABLE_SPIRV_TOOLS=ON doesn't configure on Arch (cmake/SystemDeps.cmake:80). SPIRV-Tools only exports SPIRV-Tools-static when it is built with SPIRV_TOOLS_BUILD_STATIC=ON (source/CMakeLists.txt); otherwise there is only SPIRV-Tools (shared on Arch) plus SPIRV-Tools-shared. Falling back to SPIRV-Tools when SPIRV-Tools-static is missing would cover both layouts.

  • docs/dev/BUILD.md:48 says the forced SDL/FreeType settings can't be overridden. With ON they don't apply at all: the system SDL2 comes with whatever its distro enabled (e.g. HIDAPI). Worth one sentence next to the new paragraph.

FYI, #1048 touches the line next to yours in core/libs/prx/libSceVideoOut/CMakeLists.txt:30, so whichever PR lands second needs a trivial rebase.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5447986246 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/921#pullrequestreview-5447986246). Originally posted by [adriadam10](https://github.com/adriadam10) on 2026-10-07T20:31:44Z. **Review:** CHANGES_REQUESTED --- Thanks, all three earlier points are addressed. The default build is unchanged: merged onto current main, full ctest is green here (400/400). Tried `-DANYPS5_USE_SYSTEM_DEPS=ON -DBUILD_TESTING=ON` on Arch (sdl2-compat 2.32.72, freetype 2.14.3, glslang/SPIRV-Tools 1.4.357, Vulkan-Headers 1.4.335). It configures, and `all` + `libs` build, but: - **ctest is red with the system SDL2 (2 of 400).** Arch and Fedora now ship SDL2 as `sdl2-compat` (SDL3 underneath): - `pad_sdl` fails: its `SDL_config.h` doesn't define `SDL_JOYSTICK_HIDAPI` (`core/libs/prx/libSceVideoOut/tests/PadSdl.cpp:6`). - `audio_out_mix_level_pad_spk` aborts: the disk driver opens the output as `channels=2`, and with the bundled SDL2 the same test passes. Either reject sdl2-compat at configure time with a named error, like the `VK_KHR_maintenance8` check, or make both tests pass with it. - **`ANYPS5_ENABLE_SPIRV_TOOLS=ON` doesn't configure on Arch** (`cmake/SystemDeps.cmake:80`). SPIRV-Tools only exports `SPIRV-Tools-static` when it is built with `SPIRV_TOOLS_BUILD_STATIC=ON` (`source/CMakeLists.txt`); otherwise there is only `SPIRV-Tools` (shared on Arch) plus `SPIRV-Tools-shared`. Falling back to `SPIRV-Tools` when `SPIRV-Tools-static` is missing would cover both layouts. - **`docs/dev/BUILD.md:48`** says the forced SDL/FreeType settings can't be overridden. With ON they don't apply at all: the system SDL2 comes with whatever its distro enabled (e.g. HIDAPI). Worth one sentence next to the new paragraph. FYI, #1048 touches the line next to yours in `core/libs/prx/libSceVideoOut/CMakeLists.txt:30`, so whichever PR lands second needs a trivial rebase.
011010 commented 2026-10-08 15:39:14 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by 011010 on 2026-10-08T15:39:14Z.


Second round applied; rebased on current main.

  • SDL2 without HIDAPI. ANYPS5_USE_SYSTEM_DEPS=ON now runs the same kind of compile check as the maintenance8 one: the system SDL2's SDL_config.h must define SDL_JOYSTICK_HIDAPI, and the configure fails with a named error otherwise. sdl2-compat ships no such macro (its headers only carry SDL_JOYSTICK_LINUX), so it is rejected here, which also covers the disk-audio failure. On Ubuntu 24.04 with the distribution SDL2 2.30.0 (its SDL_config.h is an indirection to _real_SDL_config.h, which defines the macro) the ON configure, pad_sdl and audio_out_mix_level_pad_spk are all green; a stub SDL2 whose header carries no HIDAPI define is rejected with the new error. The default build is unchanged.
  • SPIRV-Tools. When ANYPS5_ENABLE_SPIRV_TOOLS=ON and the config package provides SPIRV-Tools-opt but not SPIRV-Tools-static, a SPIRV-Tools-static INTERFACE target is aliased to SPIRV-Tools, so a shared Arch-style build configures. Verified with a stub SPIRV-Tools-optConfig.cmake that defines SPIRV-Tools only; the real Arch environment is yours to confirm.
  • BUILD.md. The paragraph now says the forced SDL and FreeType settings do not apply under ON and why HIDAPI is required.

#1048 touches the line next to ours in libSceVideoOut/CMakeLists.txt; whichever lands second rebases, and the conflict is that one line. AI-assisted: yes.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6063508008 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/921#issuecomment-6063508008). Originally posted by [011010](https://github.com/011010) on 2026-10-08T15:39:14Z. --- Second round applied; rebased on current `main`. - **SDL2 without HIDAPI.** `ANYPS5_USE_SYSTEM_DEPS=ON` now runs the same kind of compile check as the `maintenance8` one: the system SDL2's `SDL_config.h` must define `SDL_JOYSTICK_HIDAPI`, and the configure fails with a named error otherwise. sdl2-compat ships no such macro (its headers only carry `SDL_JOYSTICK_LINUX`), so it is rejected here, which also covers the disk-audio failure. On Ubuntu 24.04 with the distribution SDL2 2.30.0 (its `SDL_config.h` is an indirection to `_real_SDL_config.h`, which defines the macro) the ON configure, `pad_sdl` and `audio_out_mix_level_pad_spk` are all green; a stub SDL2 whose header carries no HIDAPI define is rejected with the new error. The default build is unchanged. - **SPIRV-Tools.** When `ANYPS5_ENABLE_SPIRV_TOOLS=ON` and the config package provides `SPIRV-Tools-opt` but not `SPIRV-Tools-static`, a `SPIRV-Tools-static` INTERFACE target is aliased to `SPIRV-Tools`, so a shared Arch-style build configures. Verified with a stub `SPIRV-Tools-optConfig.cmake` that defines `SPIRV-Tools` only; the real Arch environment is yours to confirm. - **BUILD.md.** The paragraph now says the forced SDL and FreeType settings do not apply under ON and why HIDAPI is required. `#1048` touches the line next to ours in `libSceVideoOut/CMakeLists.txt`; whichever lands second rebases, and the conflict is that one line. AI-assisted: yes.
011010 commented 2026-10-08 15:52:54 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by 011010 on 2026-10-08T15:52:54Z.


Conventions job fixed; rebased on current main.

  • Comments. The SDL2 probe was a multi-line CMake string, and the check reads the diff one line at a time, so its #ifndef / #error / #endif lines were reported. It is a single-line string with \n escapes now, like the maintenance8 check.
  • System dependencies. The check rejects find_package for third-party code, but #400 settled that ANYPS5_USE_SYSTEM_DEPS=ON resolves SDL2, freetype, Vulkan-Headers, SPIRV-Headers, glslang and SPIRV-Tools with find_package/pkg-config. I kept the rule and narrowed it for that opt-in: tools/check_conventions.py skips cmake/SystemDeps.cmake, the single file that resolves them, and CONTRIBUTING.md says so. Everything else is still rejected; say the word if you would rather carry that change another way.
  • New main. The rebase brought two 3rdparty/Vulkan-Headers/include includes that landed while this was open (agc_subgroup_clock_tests, agc_recorder_kept_bytes_tests); they go through ANYPS5_VULKAN_HEADERS_INCLUDE_DIR too, and no hard-coded package include is left.

Verified: tools/check_conventions.py reports no findings for this branch; with ANYPS5_USE_SYSTEM_DEPS=ON the configure passes and pad_sdl and audio_out_mix_level_pad_spk are green (Ubuntu SDL2 2.30.0), a header without SDL_JOYSTICK_HIDAPI is rejected with the named error, and the default configure is unchanged with pad_sdl green. AI-assisted: yes.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6063760260 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/921#issuecomment-6063760260). Originally posted by [011010](https://github.com/011010) on 2026-10-08T15:52:54Z. --- Conventions job fixed; rebased on current `main`. - **Comments.** The SDL2 probe was a multi-line CMake string, and the check reads the diff one line at a time, so its `#ifndef` / `#error` / `#endif` lines were reported. It is a single-line string with `\n` escapes now, like the `maintenance8` check. - **System dependencies.** The check rejects `find_package` for third-party code, but #400 settled that `ANYPS5_USE_SYSTEM_DEPS=ON` resolves SDL2, freetype, Vulkan-Headers, SPIRV-Headers, glslang and SPIRV-Tools with `find_package`/`pkg-config`. I kept the rule and narrowed it for that opt-in: `tools/check_conventions.py` skips `cmake/SystemDeps.cmake`, the single file that resolves them, and `CONTRIBUTING.md` says so. Everything else is still rejected; say the word if you would rather carry that change another way. - **New main.** The rebase brought two `3rdparty/Vulkan-Headers/include` includes that landed while this was open (`agc_subgroup_clock_tests`, `agc_recorder_kept_bytes_tests`); they go through `ANYPS5_VULKAN_HEADERS_INCLUDE_DIR` too, and no hard-coded package include is left. Verified: `tools/check_conventions.py` reports no findings for this branch; with `ANYPS5_USE_SYSTEM_DEPS=ON` the configure passes and `pad_sdl` and `audio_out_mix_level_pad_spk` are green (Ubuntu SDL2 2.30.0), a header without `SDL_JOYSTICK_HIDAPI` is rejected with the named error, and the default configure is unchanged with `pad_sdl` green. AI-assisted: yes.
StarMrGamer commented 2026-10-09 11:43:08 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by StarMrGamer on 2026-10-09T11:43:08Z.


Confirming the point the earlier review left as "the real Arch environment is yours to confirm", on current Arch (CachyOS, x86-64), branch a70bc5c8, packages as installed today: spirv-tools 1:1.4.363.0-1.1, glslang 1:1.4.363.0-1.1, spirv-headers 1:1.4.363.0-1, vulkan-headers 1:1.4.363.0-1, freetype2 2.14.3-1.1, sdl2-compat 2.32.74-1.1.

The configure fails on Arch as designed, with the new message. cmake -S . -B build -DANYPS5_USE_SYSTEM_DEPS=ON -DANYPS5_ENABLE_SPIRV_TOOLS=ON, no submodules initialised:

-- Performing Test ANYPS5_SDL2_HAS_HIDAPI
-- Performing Test ANYPS5_SDL2_HAS_HIDAPI - Failed
CMake Error at cmake/SystemDeps.cmake:31 (message):
  ANYPS5_USE_SYSTEM_DEPS: the system SDL2 does not define
  SDL_JOYSTICK_HIDAPI, ...
Call Stack (most recent call first):
  CMakeLists.txt:30 (include)

SDL_JOYSTICK_HIDAPI is not defined for Linux: /usr/include/SDL2/SDL_config.h only dispatches to SDL_config_unix.h, which does not define it (the macro appears in the windows/macos/android headers). The probe is right and nothing falls back.

Everything after the SDL2 probe passes on Arch. With a stub SDL2 package whose SDL_config.h defines SDL_JOYSTICK_HIDAPI (the same technique used for the SPIRV-Tools-opt stub earlier), the rest of SystemDeps.cmake runs unchanged and the configure stops only at the uninitialised bundled submodules:

-- Performing Test ANYPS5_SDL2_HAS_HIDAPI - Success
-- Found Freetype: /usr/lib/libfreetype.so (found version "2.14.3")
-- Performing Test ANYPS5_VULKAN_HAS_MAINTENANCE8
-- Performing Test ANYPS5_VULKAN_HAS_MAINTENANCE8 - Success
CMake Error at CMakeLists.txt:76 (add_subdirectory): 3rdparty/ffmpeg-core
CMake Error at .../ExternalProject: libjpeg-turbo

No SystemDeps.cmake error and no target-name warning anywhere in that log, so SPIRV-Headers, glslang, Freetype, VulkanHeaders (including the VK_KHR_maintenance8 probe) and SPIRV-Tools-opt all resolve, and ensure_agc_glslang() returns early on its three targets.

The glslang layout. Arch exports only namespaced targets — glslang::glslang, glslang::SPIRV, glslang::glslang-default-resource-limits — with no bare glslang/SPIRV and no glslang-standalone. A probe running exactly the three find_package calls in SystemDeps.cmake reports:

PROBE target glslang::glslang: PRESENT
PROBE target glslang::SPIRV: PRESENT
PROBE target glslang: missing
PROBE target glslang-standalone: missing
PROBE target SPIRV-Tools: PRESENT
PROBE target SPIRV-Tools-static: missing
PROBE target SPIRV-Tools-opt: PRESENT

The header checks hold (/usr/include/glslang/Public/ShaderLang.h, /usr/include/glslang/SPIRV/GlslangToSpv.h) and find_program(NAMES glslang glslangValidator) finds /usr/bin/glslang, so the imported glslang-standalone target is real.

The SPIRV-Tools fallback is the branch that is actually taken. Arch installs /usr/lib/cmake/SPIRV-Tools-opt/SPIRV-Tools-optConfig.cmake, and its first line is find_dependency(SPIRV-Tools), so find_package(SPIRV-Tools-opt CONFIG REQUIRED) defines the bare SPIRV-Tools target as a side effect. Arch defines no SPIRV-Tools-static target anywhere (grep -r "add_library(SPIRV-Tools-static" /usr/lib/cmake finds nothing), so if(NOT TARGET SPIRV-Tools-static) → if(TARGET SPIRV-Tools) is exactly the path taken. A find_package(SPIRV-Tools-static) would not have worked here: Arch ships no such config even though libSPIRV-Tools-opt.so is installed — keying off SPIRV-Tools-opt and its find_dependency chain is what makes Arch work.

One consequence worth a sentence in BUILD.md: Arch and Fedora ship sdl2-compat as their sdl2 package, so the HIDAPI probe means ANYPS5_USE_SYSTEM_DEPS=ON cannot be enabled at all on those distributions. The new paragraph says sdl2-compat is rejected but not that it makes the flag Debian/Ubuntu-only in practice. If that is the intended state, saying it explicitly saves the next Arch user the investigation.

Not tested: a complete configure and build (the bundled ffmpeg-core, libjpeg-turbo, stb, VulkanMemoryAllocator and LibAtrac9 submodules are not initialised in this checkout), and Windows.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6080168980 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/921#issuecomment-6080168980). Originally posted by [StarMrGamer](https://github.com/StarMrGamer) on 2026-10-09T11:43:08Z. --- Confirming the point the earlier review left as "the real Arch environment is yours to confirm", on current Arch (CachyOS, x86-64), branch `a70bc5c8`, packages as installed today: `spirv-tools 1:1.4.363.0-1.1`, `glslang 1:1.4.363.0-1.1`, `spirv-headers 1:1.4.363.0-1`, `vulkan-headers 1:1.4.363.0-1`, `freetype2 2.14.3-1.1`, `sdl2-compat 2.32.74-1.1`. **The configure fails on Arch as designed, with the new message.** `cmake -S . -B build -DANYPS5_USE_SYSTEM_DEPS=ON -DANYPS5_ENABLE_SPIRV_TOOLS=ON`, no submodules initialised: ``` -- Performing Test ANYPS5_SDL2_HAS_HIDAPI -- Performing Test ANYPS5_SDL2_HAS_HIDAPI - Failed CMake Error at cmake/SystemDeps.cmake:31 (message): ANYPS5_USE_SYSTEM_DEPS: the system SDL2 does not define SDL_JOYSTICK_HIDAPI, ... Call Stack (most recent call first): CMakeLists.txt:30 (include) ``` `SDL_JOYSTICK_HIDAPI` is not defined for Linux: `/usr/include/SDL2/SDL_config.h` only dispatches to `SDL_config_unix.h`, which does not define it (the macro appears in the windows/macos/android headers). The probe is right and nothing falls back. **Everything after the SDL2 probe passes on Arch.** With a stub SDL2 package whose `SDL_config.h` defines `SDL_JOYSTICK_HIDAPI` (the same technique used for the `SPIRV-Tools-opt` stub earlier), the rest of `SystemDeps.cmake` runs unchanged and the configure stops only at the uninitialised bundled submodules: ``` -- Performing Test ANYPS5_SDL2_HAS_HIDAPI - Success -- Found Freetype: /usr/lib/libfreetype.so (found version "2.14.3") -- Performing Test ANYPS5_VULKAN_HAS_MAINTENANCE8 -- Performing Test ANYPS5_VULKAN_HAS_MAINTENANCE8 - Success CMake Error at CMakeLists.txt:76 (add_subdirectory): 3rdparty/ffmpeg-core CMake Error at .../ExternalProject: libjpeg-turbo ``` No `SystemDeps.cmake` error and no target-name warning anywhere in that log, so `SPIRV-Headers`, `glslang`, `Freetype`, `VulkanHeaders` (including the `VK_KHR_maintenance8` probe) and `SPIRV-Tools-opt` all resolve, and `ensure_agc_glslang()` returns early on its three targets. **The glslang layout.** Arch exports only namespaced targets — `glslang::glslang`, `glslang::SPIRV`, `glslang::glslang-default-resource-limits` — with no bare `glslang`/`SPIRV` and no `glslang-standalone`. A probe running exactly the three `find_package` calls in `SystemDeps.cmake` reports: ``` PROBE target glslang::glslang: PRESENT PROBE target glslang::SPIRV: PRESENT PROBE target glslang: missing PROBE target glslang-standalone: missing PROBE target SPIRV-Tools: PRESENT PROBE target SPIRV-Tools-static: missing PROBE target SPIRV-Tools-opt: PRESENT ``` The header checks hold (`/usr/include/glslang/Public/ShaderLang.h`, `/usr/include/glslang/SPIRV/GlslangToSpv.h`) and `find_program(NAMES glslang glslangValidator)` finds `/usr/bin/glslang`, so the imported `glslang-standalone` target is real. **The SPIRV-Tools fallback is the branch that is actually taken.** Arch installs `/usr/lib/cmake/SPIRV-Tools-opt/SPIRV-Tools-optConfig.cmake`, and its first line is `find_dependency(SPIRV-Tools)`, so `find_package(SPIRV-Tools-opt CONFIG REQUIRED)` defines the bare `SPIRV-Tools` target as a side effect. Arch defines no `SPIRV-Tools-static` target anywhere (`grep -r "add_library(SPIRV-Tools-static" /usr/lib/cmake` finds nothing), so `if(NOT TARGET SPIRV-Tools-static)` → `if(TARGET SPIRV-Tools)` is exactly the path taken. A `find_package(SPIRV-Tools-static)` would not have worked here: Arch ships no such config even though `libSPIRV-Tools-opt.so` is installed — keying off `SPIRV-Tools-opt` and its `find_dependency` chain is what makes Arch work. **One consequence worth a sentence in BUILD.md:** Arch and Fedora ship `sdl2-compat` as their `sdl2` package, so the HIDAPI probe means `ANYPS5_USE_SYSTEM_DEPS=ON` cannot be enabled at all on those distributions. The new paragraph says sdl2-compat is rejected but not that it makes the flag Debian/Ubuntu-only in practice. If that is the intended state, saying it explicitly saves the next Arch user the investigation. Not tested: a complete configure and build (the bundled `ffmpeg-core`, `libjpeg-turbo`, `stb`, `VulkanMemoryAllocator` and `LibAtrac9` submodules are not initialised in this checkout), and Windows.
MarcZX10 commented 2026-10-09 13:59:07 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-09T13:59:07Z.

Review: COMMENTED


I checked this head against current upstream main (d70b8998). The existing Linux and Windows Build results are green for a70bc5c8, but git merge-tree upstream/main upstream/pr-921 reports content conflicts in CMakeLists.txt, core/libs/prx/libSceAgcDriver/CMakeLists.txt, and core/libs/prx/libSceVideoOut/CMakeLists.txt. CONTRIBUTING asks PR branches to stay current with main; please rebase/resolve those files and rerun the checks on the rebased head. The current green results do not cover that merge result.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5471066994 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/921#pullrequestreview-5471066994). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-09T13:59:07Z. **Review:** COMMENTED --- I checked this head against current upstream `main` (`d70b8998`). The existing Linux and Windows Build results are green for `a70bc5c8`, but `git merge-tree upstream/main upstream/pr-921` reports content conflicts in `CMakeLists.txt`, `core/libs/prx/libSceAgcDriver/CMakeLists.txt`, and `core/libs/prx/libSceVideoOut/CMakeLists.txt`. CONTRIBUTING asks PR branches to stay current with `main`; please rebase/resolve those files and rerun the checks on the rebased head. The current green results do not cover that merge result.
011010 commented 2026-10-09 16:35:58 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by 011010 on 2026-10-09T16:35:58Z.


@MarcZX100 Rebased onto current main (d70b8998) and resolved the three conflicts you listed. Head is now a236308a; git merge-tree against main is clean and the checks re-ran on it.

  • CMakeLists.txt: kept main's new APS5_ENABLE_TIMING_LOG description and added the ANYPS5_USE_SYSTEM_DEPS option.
  • libSceAgcDriver / libSceVideoOut: kept the core/shader/recompiler and Vulkan/SPIRV include dirs main had added and routed them through the ANYPS5_*_INCLUDE_DIR variables.
  • The rebase also surfaced main re-adding hard-coded bundled includes to agc_driver_tests, agc_shader_device_profile_tests and agc_shader_fusion_tests; those now go through the variables too, so the ON build still reads no bundled headers.

One note: the Conventions job now runs the trusted base script (0ab2a04d), so the system-dependency rule flags the find_package(...) calls in cmake/SystemDeps.cmake; the exemption has to land in main first. AI-assisted: yes.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6085089908 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/921#issuecomment-6085089908). Originally posted by [011010](https://github.com/011010) on 2026-10-09T16:35:58Z. --- @MarcZX100 Rebased onto current `main` (`d70b8998`) and resolved the three conflicts you listed. Head is now `a236308a`; `git merge-tree` against `main` is clean and the checks re-ran on it. - `CMakeLists.txt`: kept `main`'s new `APS5_ENABLE_TIMING_LOG` description and added the `ANYPS5_USE_SYSTEM_DEPS` option. - `libSceAgcDriver` / `libSceVideoOut`: kept the `core/shader/recompiler` and Vulkan/SPIRV include dirs `main` had added and routed them through the `ANYPS5_*_INCLUDE_DIR` variables. - The rebase also surfaced `main` re-adding hard-coded bundled includes to `agc_driver_tests`, `agc_shader_device_profile_tests` and `agc_shader_fusion_tests`; those now go through the variables too, so the ON build still reads no bundled headers. One note: the Conventions job now runs the trusted base script (`0ab2a04d`), so the `system-dependency` rule flags the `find_package(...)` calls in `cmake/SystemDeps.cmake`; the exemption has to land in `main` first. AI-assisted: yes.
011010 commented 2026-10-09 16:36:00 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by 011010 on 2026-10-09T16:36:00Z.


@StarMrGamer Thanks for the Arch confirmation. The head moved to a236308a (rebased onto main d70b8998, conflicts resolved). Your sdl2-compat/HIDAPI reading stands: the probe rejects it by design, so ANYPS5_USE_SYSTEM_DEPS=ON is effectively Debian/Ubuntu-only for now. AI-assisted: yes.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6085090190 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/921#issuecomment-6085090190). Originally posted by [011010](https://github.com/011010) on 2026-10-09T16:36:00Z. --- @StarMrGamer Thanks for the Arch confirmation. The head moved to `a236308a` (rebased onto `main` `d70b8998`, conflicts resolved). Your `sdl2-compat`/HIDAPI reading stands: the probe rejects it by design, so `ANYPS5_USE_SYSTEM_DEPS=ON` is effectively Debian/Ubuntu-only for now. AI-assisted: yes.
StarMrGamer commented 2026-10-09 16:40:03 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by StarMrGamer on 2026-10-09T16:40:03Z.


@011010 thanks — re-verified on the new head a236308a with the same method as before. cmake/SystemDeps.cmake is byte-identical between a70bc5c8 and a236308a (git diff --stat over that path is empty), so only the include routing moved:

  • Real Arch configure, -DANYPS5_USE_SYSTEM_DEPS=ON -DANYPS5_ENABLE_SPIRV_TOOLS=ON: still fails at cmake/SystemDeps.cmake:31 with the named HIDAPI error.
  • With the stub SDL2: ANYPS5_SDL2_HAS_HIDAPI Success, Found Freetype: /usr/lib/libfreetype.so (found version "2.14.3"), ANYPS5_VULKAN_HAS_MAINTENANCE8 Success, and the configure runs past SystemDeps.cmake to CMakeLists.txt:80 (the uninitialised ffmpeg-core submodule).

So glslang, SPIRV-Headers, Vulkan-Headers and the SPIRV-Tools-static → SPIRV-Tools alias all still resolve on Arch after your rebase, and the sdl2-compat rejection is unchanged.

Nothing further needed from me. For the record on the remaining blocker: I checked and there is no open pull request adding the check_conventions.py exemption for cmake/SystemDeps.cmake, so that still has to land in main before this can go green.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6085153312 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/921#issuecomment-6085153312). Originally posted by [StarMrGamer](https://github.com/StarMrGamer) on 2026-10-09T16:40:03Z. --- @011010 thanks — re-verified on the new head `a236308a` with the same method as before. `cmake/SystemDeps.cmake` is byte-identical between `a70bc5c8` and `a236308a` (`git diff --stat` over that path is empty), so only the include routing moved: - Real Arch configure, `-DANYPS5_USE_SYSTEM_DEPS=ON -DANYPS5_ENABLE_SPIRV_TOOLS=ON`: still fails at `cmake/SystemDeps.cmake:31` with the named HIDAPI error. - With the stub SDL2: `ANYPS5_SDL2_HAS_HIDAPI` Success, `Found Freetype: /usr/lib/libfreetype.so (found version "2.14.3")`, `ANYPS5_VULKAN_HAS_MAINTENANCE8` Success, and the configure runs past `SystemDeps.cmake` to `CMakeLists.txt:80` (the uninitialised `ffmpeg-core` submodule). So glslang, SPIRV-Headers, Vulkan-Headers and the `SPIRV-Tools-static` → `SPIRV-Tools` alias all still resolve on Arch after your rebase, and the `sdl2-compat` rejection is unchanged. Nothing further needed from me. For the record on the remaining blocker: I checked and there is no open pull request adding the `check_conventions.py` exemption for `cmake/SystemDeps.cmake`, so that still has to land in `main` before this can go green.
011010 commented 2026-10-09 16:49:15 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by 011010 on 2026-10-09T16:49:15Z.


@StarMrGamer thanks for the re-verification. Opened #2373 against main with the check_conventions.py exemption for cmake/SystemDeps.cmake. Once it merges I'll rebase #921 and drop the now-redundant checker copy.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6085298490 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/921#issuecomment-6085298490). Originally posted by [011010](https://github.com/011010) on 2026-10-09T16:49:15Z. --- @StarMrGamer thanks for the re-verification. Opened #2373 against `main` with the `check_conventions.py` exemption for `cmake/SystemDeps.cmake`. Once it merges I'll rebase #921 and drop the now-redundant checker copy.
adriadam10 commented 2026-10-09 22:03:39 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-09T22:03:39Z.

Review: CHANGES_REQUESTED


Thanks for the update. Before this can go in:

  • Conflicts with main. CMakeLists.txt conflicts, and main has added more hard-coded bundled include dirs since the last rebase (e.g. core/libs/prx/libSceAgcDriver/CMakeLists.txt, agc_buffer_pool_tests and the other 3rdparty/Vulkan-Headers/include / 3rdparty/SPIRV-Headers/include / 3rdparty/SDL2/include entries). Please rebase and route every remaining one through the ANYPS5_*_INCLUDE_DIR variables (git grep '3rdparty/\(Vulkan-Headers\|SPIRV-Headers\|SDL2/include\|glslang\)' -- '*CMakeLists.txt' should only match cmake/SystemDeps.cmake and the default-path add_subdirectory calls).
  • Conventions job is red. The tools/check_conventions.py exemption is also in #2373. Keep it in only one of the two: once #2373 is merged, rebase and drop the hunk here.
  • After the rebase, rerun the ANYPS5_USE_SYSTEM_DEPS=ON configure plus libs build to confirm nothing else slipped past.

The approach itself matches what was agreed in #400.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5475772532 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/921#pullrequestreview-5475772532). Originally posted by [adriadam10](https://github.com/adriadam10) on 2026-10-09T22:03:39Z. **Review:** CHANGES_REQUESTED --- Thanks for the update. Before this can go in: - **Conflicts with `main`.** `CMakeLists.txt` conflicts, and `main` has added more hard-coded bundled include dirs since the last rebase (e.g. `core/libs/prx/libSceAgcDriver/CMakeLists.txt`, `agc_buffer_pool_tests` and the other `3rdparty/Vulkan-Headers/include` / `3rdparty/SPIRV-Headers/include` / `3rdparty/SDL2/include` entries). Please rebase and route every remaining one through the `ANYPS5_*_INCLUDE_DIR` variables (`git grep '3rdparty/\(Vulkan-Headers\|SPIRV-Headers\|SDL2/include\|glslang\)' -- '*CMakeLists.txt'` should only match `cmake/SystemDeps.cmake` and the default-path `add_subdirectory` calls). - **Conventions job is red.** The `tools/check_conventions.py` exemption is also in #2373. Keep it in only one of the two: once #2373 is merged, rebase and drop the hunk here. - After the rebase, rerun the `ANYPS5_USE_SYSTEM_DEPS=ON` configure plus `libs` build to confirm nothing else slipped past. The approach itself matches what was agreed in #400.
011010 commented 2026-10-09 23:46:30 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by 011010 on 2026-10-09T23:46:30Z.


@adriadam10 pushed the rebase onto current main (6dadeb38). The CMakeLists.txt conflict was main's new ftver.rc freetype filter; it now sits inside the if(NOT ANYPS5_USE_SYSTEM_DEPS) guard.

Routing: the only remaining hard-coded include was agc_buffer_pool_tests; the two set() literals in the recompiler (SPIRV-Headers_SOURCE_DIR, shaderCacheSubmodules) moved into ANYPS5_*_SOURCE_DIR defaults in cmake/SystemDeps.cmake. The grep now matches only the default-path add_subdirectory calls.

Reran -DANYPS5_USE_SYSTEM_DEPS=ON -DANYPS5_ENABLE_SPIRV_TOOLS=ON on Ubuntu 24.04: configure passes (ANYPS5_SDL2_HAS_HIDAPI and ANYPS5_VULKAN_HAS_MAINTENANCE8 both success) and libs builds 820/820. compile_commands.json has no 3rdparty/{Vulkan-Headers,SPIRV-Headers,SDL2/include,glslang} include; it uses /usr/include/{SDL2,glslang,freetype2}.

The tools/check_conventions.py exemption stays in #2373; I'll drop the hunk here and rebase once it merges. Conventions stays red until then.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6091201163 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/921#issuecomment-6091201163). Originally posted by [011010](https://github.com/011010) on 2026-10-09T23:46:30Z. --- @adriadam10 pushed the rebase onto current `main` (`6dadeb38`). The `CMakeLists.txt` conflict was main's new `ftver.rc` freetype filter; it now sits inside the `if(NOT ANYPS5_USE_SYSTEM_DEPS)` guard. Routing: the only remaining hard-coded include was `agc_buffer_pool_tests`; the two `set()` literals in the recompiler (`SPIRV-Headers_SOURCE_DIR`, `shaderCacheSubmodules`) moved into `ANYPS5_*_SOURCE_DIR` defaults in `cmake/SystemDeps.cmake`. The grep now matches only the default-path `add_subdirectory` calls. Reran `-DANYPS5_USE_SYSTEM_DEPS=ON -DANYPS5_ENABLE_SPIRV_TOOLS=ON` on Ubuntu 24.04: configure passes (`ANYPS5_SDL2_HAS_HIDAPI` and `ANYPS5_VULKAN_HAS_MAINTENANCE8` both success) and `libs` builds 820/820. `compile_commands.json` has no `3rdparty/{Vulkan-Headers,SPIRV-Headers,SDL2/include,glslang}` include; it uses `/usr/include/{SDL2,glslang,freetype2}`. The `tools/check_conventions.py` exemption stays in #2373; I'll drop the hunk here and rebase once it merges. Conventions stays red until then.
adriadam10 commented 2026-10-09 23:54:31 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-09T23:54:31Z.


Checked on current main: the default build (flag OFF) configures and builds, and the full ctest passes (565/565). All the include-routing and rebase points from the earlier reviews are addressed, and the two remaining glslang add_subdirectory calls are guarded by if(TARGET glslang).

Two things before this can land:

  • @boykopovar: this changes a CONTRIBUTING rule ("Third-party code ... built from source, not found on the system") by adding an opt-in ANYPS5_USE_SYSTEM_DEPS that resolves six packages via find_package, plus an exemption of cmake/SystemDeps.cmake in tools/check_conventions.py. Are you fine with this opt-in and with that wording?
  • tools/check_conventions.py is changed here and in #2373 (same exemption). Please keep it in only one of them: drop the hunk here, or land #2373 first and rebase.

Not verified on our side: the ANYPS5_USE_SYSTEM_DEPS=ON path (Arch's sdl2-compat is rejected by design) and Windows; StarMrGamer's Arch run covers the rejection message.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6091278359 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/921#issuecomment-6091278359). Originally posted by [adriadam10](https://github.com/adriadam10) on 2026-10-09T23:54:31Z. --- Checked on current `main`: the default build (flag OFF) configures and builds, and the full ctest passes (565/565). All the include-routing and rebase points from the earlier reviews are addressed, and the two remaining glslang `add_subdirectory` calls are guarded by `if(TARGET glslang)`. Two things before this can land: - @boykopovar: this changes a CONTRIBUTING rule ("Third-party code ... built from source, not found on the system") by adding an opt-in `ANYPS5_USE_SYSTEM_DEPS` that resolves six packages via `find_package`, plus an exemption of `cmake/SystemDeps.cmake` in `tools/check_conventions.py`. Are you fine with this opt-in and with that wording? - `tools/check_conventions.py` is changed here and in #2373 (same exemption). Please keep it in only one of them: drop the hunk here, or land #2373 first and rebase. Not verified on our side: the `ANYPS5_USE_SYSTEM_DEPS=ON` path (Arch's sdl2-compat is rejected by design) and Windows; StarMrGamer's Arch run covers the rejection message.
011010 commented 2026-10-09 23:58:14 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by 011010 on 2026-10-09T23:58:14Z.


@adriadam10 thanks. On the duplicate: I'll land #2373 first, then rebase #921 and drop the hunk here, so the exemption lives only in #2373.

On the ANYPS5_USE_SYSTEM_DEPS=ON path you flagged as unverified on your side: I ran it in an Ubuntu 24.04 container with system SDL2 2.30.0 (HIDAPI), freetype 2.13.2, glslang 15.1.0, Vulkan-Headers, SPIRV-Headers and SPIRV-Tools. Configure passes (ANYPS5_SDL2_HAS_HIDAPI and ANYPS5_VULKAN_HAS_MAINTENANCE8 both success) and libs builds 820/820. compile_commands.json has no 3rdparty/{Vulkan-Headers,SPIRV-Headers,SDL2/include,glslang} include and uses /usr/include/{SDL2,glslang,freetype2}, so the ON build reads only system headers. Windows is still untested.

@boykopovar on the rule change: the opt-in is off by default (the default build never reads the system), the resolution is confined to cmake/SystemDeps.cmake, and the CONTRIBUTING paragraph documents the exception next to the rule it relaxes. Happy to reword it if you prefer.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6091317727 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/921#issuecomment-6091317727). Originally posted by [011010](https://github.com/011010) on 2026-10-09T23:58:14Z. --- @adriadam10 thanks. On the duplicate: I'll land #2373 first, then rebase #921 and drop the hunk here, so the exemption lives only in #2373. On the `ANYPS5_USE_SYSTEM_DEPS=ON` path you flagged as unverified on your side: I ran it in an Ubuntu 24.04 container with system SDL2 2.30.0 (HIDAPI), freetype 2.13.2, glslang 15.1.0, Vulkan-Headers, SPIRV-Headers and SPIRV-Tools. Configure passes (`ANYPS5_SDL2_HAS_HIDAPI` and `ANYPS5_VULKAN_HAS_MAINTENANCE8` both success) and `libs` builds 820/820. `compile_commands.json` has no `3rdparty/{Vulkan-Headers,SPIRV-Headers,SDL2/include,glslang}` include and uses `/usr/include/{SDL2,glslang,freetype2}`, so the ON build reads only system headers. Windows is still untested. @boykopovar on the rule change: the opt-in is off by default (the default build never reads the system), the resolution is confined to `cmake/SystemDeps.cmake`, and the CONTRIBUTING paragraph documents the exception next to the rule it relaxes. Happy to reword it if you prefer.
011010 commented 2026-10-10 04:45:37 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by 011010 on 2026-10-10T04:45:37Z.


Rebased onto current main (c72d5ce1) and dropped the duplicated tools/check_conventions.py hunk; the exemption now lives only in #2373, as requested. CONTRIBUTING.md keeps the wording here because it documents the flag this PR adds. Head is f99c761e.

  • tools/check_conventions.py is byte-identical to main again.
  • Include routing: git grep '3rdparty/\(Vulkan-Headers\|SPIRV-Headers\|SDL2/include\|glslang\)' -- '*CMakeLists.txt' now matches only cmake/SystemDeps.cmake and the default-path glslang add_subdirectory calls.
  • Conventions: with #2373's exemption applied to the base script, tools/check_conventions.py --base main --head feat/cmake-use-system-deps reports All conventions checks passed. Without it, the only findings are the 6 system-dependency ones in cmake/SystemDeps.cmake, nothing else. So Conventions stays red here until #2373 lands in main.

The ANYPS5_USE_SYSTEM_DEPS=ON configure + libs build was not re-run after this rebase (it only replayed already-reviewed commits onto main); Windows is still untested.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6093896077 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/921#issuecomment-6093896077). Originally posted by [011010](https://github.com/011010) on 2026-10-10T04:45:37Z. --- Rebased onto current `main` (`c72d5ce1`) and dropped the duplicated `tools/check_conventions.py` hunk; the exemption now lives only in #2373, as requested. `CONTRIBUTING.md` keeps the wording here because it documents the flag this PR adds. Head is `f99c761e`. - `tools/check_conventions.py` is byte-identical to `main` again. - Include routing: `git grep '3rdparty/\(Vulkan-Headers\|SPIRV-Headers\|SDL2/include\|glslang\)' -- '*CMakeLists.txt'` now matches only `cmake/SystemDeps.cmake` and the default-path glslang `add_subdirectory` calls. - Conventions: with #2373's exemption applied to the base script, `tools/check_conventions.py --base main --head feat/cmake-use-system-deps` reports `All conventions checks passed`. Without it, the only findings are the 6 `system-dependency` ones in `cmake/SystemDeps.cmake`, nothing else. So Conventions stays red here until #2373 lands in `main`. The `ANYPS5_USE_SYSTEM_DEPS=ON` configure + `libs` build was not re-run after this rebase (it only replayed already-reviewed commits onto `main`); Windows is still untested.
Mouhand-Kaddo commented 2026-10-10 10:05:42 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Mouhand-Kaddo on 2026-10-10T10:05:42Z.


Additional platform validation on standalone PR head f99c761e50ec79908591cf8aca988d1a9518d6b4:

Windows: passed — Windows 11, supported WinLibs GCC 15.2.0 UCRT/POSIX/SEH r7; CMake 4.3.1 / Ninja.

Release / BUILD_TESTING=ON: built the selected test targets; 1 CTest cases, 0 failures, 0 CTest skips.

Tests: pad_sdl.

Reproduce after building the test targets: ctest --test-dir <build> --verbose --no-tests=error --timeout 30 -R "^pad_sdl$".

Default bundled-dependency mode passed. ANYPS5_USE_SYSTEM_DEPS=ON also passed with separately installed real packages built from the pinned dependency sources: 4/4 tests (pad_sdl, audio_out_mix_level_pad_spk, agc_shader_device_profile, agc_driver_graphics), zero skips. Checked project compile commands use installed dependency headers. Missing SDL2 is rejected cleanly at configure time.

Integration limitation: a local merge against main 948a526c2 has source conflicts; these results validate the standalone PR head, not a resolved merge.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6096398764 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/921#issuecomment-6096398764). Originally posted by [Mouhand-Kaddo](https://github.com/Mouhand-Kaddo) on 2026-10-10T10:05:42Z. --- <!-- anyps5-platform-validation:f99c761e50ec79908591cf8aca988d1a9518d6b4 --> Additional platform validation on standalone PR head `f99c761e50ec79908591cf8aca988d1a9518d6b4`: **Windows: passed** — Windows 11, supported WinLibs GCC 15.2.0 UCRT/POSIX/SEH r7; CMake 4.3.1 / Ninja. Release / `BUILD_TESTING=ON`: built the selected test targets; 1 CTest cases, 0 failures, 0 CTest skips. Tests: `pad_sdl`. Reproduce after building the test targets: `ctest --test-dir <build> --verbose --no-tests=error --timeout 30 -R "^pad_sdl$"`. Default bundled-dependency mode passed. `ANYPS5_USE_SYSTEM_DEPS=ON` also passed with separately installed real packages built from the pinned dependency sources: 4/4 tests (`pad_sdl`, `audio_out_mix_level_pad_spk`, `agc_shader_device_profile`, `agc_driver_graphics`), zero skips. Checked project compile commands use installed dependency headers. Missing SDL2 is rejected cleanly at configure time. Integration limitation: a local merge against main `948a526c2` has source conflicts; these results validate the standalone PR head, not a resolved merge.
adriadam10 commented 2026-10-11 08:26:52 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-11T08:26:52Z.

Review: APPROVED


Rebased onto current main (it conflicted in docs/dev/BUILD.md and libSceAgcDriver/CMakeLists.txt) and added one commit:

  • Routed the four 3rdparty/Vulkan-Headers/include entries that main added to AgcDriver tests since the last rebase through ANYPS5_VULKAN_HEADERS_INCLUDE_DIR.

Checked on the rebased head: default build (flag OFF) configures, builds, full ctest passes (795/795); git grep for hard-coded bundled include dirs only matches cmake/SystemDeps.cmake and the default-path glslang add_subdirectory calls. The ANYPS5_USE_SYSTEM_DEPS=ON path relies on the Ubuntu 24.04 and Windows runs above (this host's SDL2 is sdl2-compat, which the check rejects by design).

The conventions job is red only because the exemption lives in #2373; merging after it.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5482548923 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/921#pullrequestreview-5482548923). Originally posted by [adriadam10](https://github.com/adriadam10) on 2026-10-11T08:26:52Z. **Review:** APPROVED --- Rebased onto current `main` (it conflicted in `docs/dev/BUILD.md` and `libSceAgcDriver/CMakeLists.txt`) and added one commit: - Routed the four `3rdparty/Vulkan-Headers/include` entries that `main` added to AgcDriver tests since the last rebase through `ANYPS5_VULKAN_HEADERS_INCLUDE_DIR`. Checked on the rebased head: default build (flag OFF) configures, builds, full ctest passes (795/795); `git grep` for hard-coded bundled include dirs only matches `cmake/SystemDeps.cmake` and the default-path glslang `add_subdirectory` calls. The `ANYPS5_USE_SYSTEM_DEPS=ON` path relies on the Ubuntu 24.04 and Windows runs above (this host's SDL2 is sdl2-compat, which the check rejects by design). The `conventions` job is red only because the exemption lives in #2373; merging after it.
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!921
No description provided.