build(zlib): update to 1.4 and use it for libSceZlib #24048

Open
akaydesu wants to merge 1 commit from upstream-pr/24048 into main
akaydesu commented 2026-11-20 02:13:42 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by akaydesu on 2026-11-20T02:13:42Z.


What

Update the bundled zlib from 1.3.2 to 1.4. Link libSceZlib directly to zlibstatic so it uses the updated library for decompression. The module previously used the private zlib copy inside libjpeg-turbo.

Keep zlib symbols out of the module's exports on MinGW and Linux.

Tested

Windows 11 x64, MinGW GCC 15.2.0, Release. All 11 focused AnyPS5 tests passed across libSceZlib, WebKit zlib and gzip, PNG encoding and decoding, and Cairo PNG. All 18 tests in zlib 1.4's own suite passed. Built the NID-patched libSceZlib module. No game run.

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 and the licence notice of code adapted from upstream (see AGENTS.md)
  • 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
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5406493780 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/24048). Originally posted by [akaydesu](https://github.com/akaydesu) on 2026-11-20T02:13:42Z. --- ### What Update the bundled zlib from 1.3.2 to 1.4. Link `libSceZlib` directly to `zlibstatic` so it uses the updated library for decompression. The module previously used the private zlib copy inside libjpeg-turbo. Keep zlib symbols out of the module's exports on MinGW and Linux. ### 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 x64, MinGW GCC 15.2.0, Release. All 11 focused AnyPS5 tests passed across libSceZlib, WebKit zlib and gzip, PNG encoding and decoding, and Cairo PNG. All 18 tests in zlib 1.4's own suite passed. Built the NID-patched libSceZlib module. No game run. ### 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) and the licence notice of code adapted from upstream (see AGENTS.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 <!-- #PR, or none --> - [x] Fixes: none <!-- issue it closes as Fixes #N, or none --> - [x] Unblocks: none <!-- title ID and Game bring-up discussion, e.g. PPSA01325 #3232, or none --> - [x] GPUs tested: n/a <!-- for AGC, shader recompiler or VideoOut changes: vendor, model, driver and OS of each GPU the GPU tests ran on; otherwise n/a --> - [x] AI-assisted: yes <!-- yes / no -->
MarcZX10 commented 2026-11-20 10:13:08 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-20T10:13:08Z.

Review: COMMENTED


Reviewed — no blocking findings

Nothing blocks this change; the points below are optional.

What I ran

Reviewed head 7523a6dfb19a10e98a221bdb03cee22df97ad2f3. I read the prepared description, commit summary, manifest and diff, then inspected the changed CMake file and the shared zlib setup and comparable PNG/WebKit link configuration through repo_read.py. I ran no build or tests; the test results in the description are author-reported.

Results

Check Result Note
Diff and CMake wiring passed Reviewed changed build configuration
Build and tests not run Reported by the author, not reproduced

Findings

Blocking

None.

Non-blocking

None.

Not verified

The full text of the changed 3rdparty/zlib submodule was excluded from the review bundle and was not read. The CMake change links the existing zlibstatic target, and its target configuration was inspected, but the updated upstream submodule contents and its own 18-test result were not independently verified. No build, AnyPS5 test suite, module build, or PS5 game run was performed. The only full changed file read was core/libs/prx/libSceZlib/CMakeLists.txt; the manifest lists both changed paths as reviewed.

To get this to a good state

Nothing is required.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5990999591 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/24048#pullrequestreview-5990999591). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-20T10:13:08Z. **Review:** COMMENTED --- # Reviewed — no blocking findings Nothing blocks this change; the points below are optional. ## What I ran Reviewed head `7523a6dfb19a10e98a221bdb03cee22df97ad2f3`. I read the prepared description, commit summary, manifest and diff, then inspected the changed CMake file and the shared zlib setup and comparable PNG/WebKit link configuration through `repo_read.py`. I ran no build or tests; the test results in the description are author-reported. ## Results | Check | Result | Note | |---|---|---| | Diff and CMake wiring | passed | Reviewed changed build configuration | | Build and tests | not run | Reported by the author, not reproduced | ## Findings ### Blocking None. ### Non-blocking None. ## Not verified The full text of the changed `3rdparty/zlib` submodule was excluded from the review bundle and was not read. The CMake change links the existing `zlibstatic` target, and its target configuration was inspected, but the updated upstream submodule contents and its own 18-test result were not independently verified. No build, AnyPS5 test suite, module build, or PS5 game run was performed. The only full changed file read was `core/libs/prx/libSceZlib/CMakeLists.txt`; the manifest lists both changed paths as reviewed. ## To get this to a good state Nothing is required.
ligmaSec commented 2026-12-03 12:18:38 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by ligmaSec on 2026-12-03T12:18:38Z.

Review: COMMENTED


Built zlib from the exact pinned 1.4 commit and linked the PR’s libSceZlib sources to it on Linux. GuestZlib and GuestZlibWindow passed, including 24 distance, overlap, and output-capacity cases. This run used standalone fixtures with the existing libc and libkernel libraries.

AI-assisted: yes.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:6169646099 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/24048#pullrequestreview-6169646099). Originally posted by [ligmaSec](https://github.com/ligmaSec) on 2026-12-03T12:18:38Z. **Review:** COMMENTED --- Built zlib from the exact pinned 1.4 commit and linked the PR’s `libSceZlib` sources to it on Linux. `GuestZlib` and `GuestZlibWindow` passed, including 24 distance, overlap, and output-capacity cases. This run used standalone fixtures with the existing libc and libkernel libraries. AI-assisted: yes.
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/24048:upstream-pr/24048'
git switch 'upstream-pr/24048'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'upstream-pr/24048'
git switch 'upstream-pr/24048'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/24048'
git switch 'upstream-pr/24048'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/24048'
git switch 'main'
git merge --squash 'upstream-pr/24048'
git switch 'main'
git merge --ff-only 'upstream-pr/24048'
git switch 'main'
git merge 'upstream-pr/24048'
git push origin 'main'
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!24048
No description provided.