akgl.pc names no dependencies, and akerror.h is part of the public interface #17

Open
opened 2026-08-02 18:32:57 -04:00 by tachikoma · 0 comments
Collaborator

Source: TODO.md, "akgl.pc names no dependencies" (at bbb7b8f)

akgl.pc.in carries Libs: -L${libdir} -lakgl and no Requires: or
Requires.private: line, so a consumer that finds libakgl through pkg-config is
told nothing about libakerror, libakstdlib, SDL3, SDL3_image, SDL3_mixer, SDL3_ttf
or jansson.

That has always been wrong, and libakerror 2.x makes it sharper: akerror.h is
part of libakgl's public interface -- IGNORE and the FAIL_* macros expand
in the consumer's own translation units and reference __akerr_last_ignored,
which is thread-local as of 2.0.0. A consumer that builds against whatever
akerror.h happens to be on its include path and links whatever libakerror.so
the loader finds can get a mismatch that pkg-config had every opportunity to
prevent and did not mention.

Fix: a Requires: line for the libraries whose headers libakgl's headers
include (akerror, akstdlib, SDL3), Requires.private: for the rest, and a version
floor of akerror >= 2.0.1.

Its own commit with an install-tree test behind it, because it changes what
pkg-config --libs akgl emits for every existing consumer.

Files: akgl.pc.in, CMakeLists.txt:933


Filed by Tachikoma (Claude Code, Opus 5, 1M context)

**Source:** TODO.md, "akgl.pc names no dependencies" (at bbb7b8f) `akgl.pc.in` carries `Libs: -L${libdir} -lakgl` and no `Requires:` or `Requires.private:` line, so a consumer that finds libakgl through pkg-config is told nothing about libakerror, libakstdlib, SDL3, SDL3_image, SDL3_mixer, SDL3_ttf or jansson. That has always been wrong, and libakerror 2.x makes it sharper: `akerror.h` is part of libakgl's **public** interface -- `IGNORE` and the `FAIL_*` macros expand in the consumer's own translation units and reference `__akerr_last_ignored`, which is thread-local as of 2.0.0. A consumer that builds against whatever `akerror.h` happens to be on its include path and links whatever `libakerror.so` the loader finds can get a mismatch that pkg-config had every opportunity to prevent and did not mention. **Fix:** a `Requires:` line for the libraries whose headers libakgl's headers include (akerror, akstdlib, SDL3), `Requires.private:` for the rest, and a version floor of `akerror >= 2.0.1`. Its own commit with an install-tree test behind it, because it changes what `pkg-config --libs akgl` emits for every existing consumer. **Files:** `akgl.pc.in`, `CMakeLists.txt:933` --- Filed by Tachikoma (Claude Code, Opus 5, 1M context)
tachikoma added this to the 0.10.0 milestone 2026-08-02 18:32:57 -04:00
tachikoma added the packagingblast-radius:high labels 2026-08-02 18:32:57 -04:00
tachikoma added the status::grooming label 2026-08-02 18:49:13 -04:00
Sign in to join this conversation.