Skip to content

Make public gain-map and ICC helpers linkable through libjxl - #1

Open
gregbenz wants to merge 6 commits into
codex/gain-map-ci-basefrom
codex/gain-map-public-api
Open

gregbenz wants to merge 6 commits into
codex/gain-map-ci-basefrom
codex/gain-map-public-api

Conversation

@gregbenz

@gregbenz gregbenz commented Sep 28, 2026 •

Copy link
Copy Markdown
Owner

CI validation in this fork before upstream submission.

The installed gain-map and compressed-ICC headers declare functions that applications cannot link through libjxl. Their implementations currently live in extras.

This moves the five existing helpers into libjxl without changing their signatures or behavior. Read and write implementations are split so decoder-only builds do not pull in encoder code. The generated CMake, Bazel, and GN source lists are updated accordingly.

A new C example links through the libjxl pkg-config package alone, reproduces the link failure before this change, and checks bundle and ICC roundtrips afterward. It runs in the existing installed-examples CI step. Linux now refreshes the loader cache after installation so the example can find libjxl's shared-library dependencies.

A separate CTest consumer links only to the build-tree jxl_dec target and reads fixed synthetic bundle and ICC bytes. It calls no writer helpers, so encoder linkage cannot hide missing decoder symbols.

CI maintenance changes use the already-pinned GoogleTest submodule for mingw32, where the system package is unavailable, and replace the unavailable Intel SDE download with version 10.13.1. Both cross-test and conformance workflows use the updated download. The SDE archive is checked against Intel's published SHA-256. Existing jobs and test coverage are retained.

Related upstream issue: libjxl#4865.

Testing

  • The new decoder-only test fails to link against clean upstream with exactly the two reader symbols missing. It passes through CTest in macOS shared, lean decoder-only, and static-libjxl builds, and runs directly against the Linux decoder library. Linux CTest configuration in the cached local image lacked PNG development files.

  • Shared and static consumers pass on macOS arm64, Linux arm64, and Windows x64. The shared consumer fails with all five symbols missing on unmodified upstream on macOS and Linux.

  • Decoder-only consumers pass on macOS and Windows with tools, boxes, and JPEG transcoding disabled. Only the two reader helpers are exported, with no Brotli dependency.

  • Existing gain-map and compressed-ICC tests pass on macOS, and cjxl/djxl build successfully.

  • The Linux loader failure was reproduced in an isolated container. The same C executable passes after refreshing the loader cache.

  • Bundled GoogleTest selection was verified with the repository's CMake logic and pinned submodule. The new SDE download matches Intel's published checksum and recognizes the existing -spr option. The prior CI run passed mingw32 and a native cross-test shard using SDE. Conformance validation with the updated download is pending.

The macOS static lcms build needs lcms linked explicitly because its existing package metadata omits that dependency. Windows linkage was checked with MSVC and explicit libraries; pkg-config integration was not tested there. Bazel and GN builds were not run locally.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 28, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-28T05:37:35.942123Z be2d8ec PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

gregbenz added a commit that referenced this pull request Sep 28, 2026
The installed gain-map and compressed-ICC headers declare five helpers whose
implementations live in extras, leaving normal libjxl consumers with undefined
symbols. Move the existing implementations into libjxl and separate readers
from writers so jxl_dec does not acquire encoder dependencies. Update the
CMake, Bazel, and GN source lists without changing public signatures or codec
behavior.

Add an installed C consumer that links using only libjxl pkg-config metadata
and checks bundle/ICC serialization, plus a decoder-only CTest consumer that
reads fixed synthetic bytes without encoder linkage. Refresh the Linux loader
cache before the existing installed-examples CI step.

Fixes libjxl#4865.

Validation: the installed consumer fails with all five symbols missing on
unmodified upstream on macOS and Linux; the decoder-only consumer fails with
both reader symbols missing. Patched shared/static consumers pass on macOS,
Linux, and Windows. The decoder regression passes CTest in macOS shared,
static-libjxl, and lean builds and runs directly on Linux. Existing focused
bundle/ICC tests and formatting/source-list checks pass.

The identical library/test changes passed 114 checks in
#1, including Bazel, WASM, Windows,
macOS, Linux, cross-testing, and conformance. That validation branch also
contains unrelated mingw32 and Intel SDE CI repairs excluded here.
Windows pkg-config and GN builds were not tested; local static lcms testing
on macOS needed an explicit lcms dependency due to existing package metadata.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant