Skip to content

fix: update libaom POSIX_C_SOURCE patch context for current CMakeLists.txt - #1223

Merged
crazywhalecc merged 1 commit into
crazywhalecc:v3from
dunglas:fix/libaom-posix-patch-context
Aug 5, 2026
Merged

fix: update libaom POSIX_C_SOURCE patch context for current CMakeLists.txt#1223
crazywhalecc merged 1 commit into
crazywhalecc:v3from
dunglas:fix/libaom-posix-patch-context

Conversation

@dunglas

@dunglas dunglas commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

libaom's main moved the aom_encoder_stats target from if(ENABLE_EXAMPLES) at CMakeLists.txt:269 to if(ENABLE_APPS) at line 312 (a CONFIG_HIGHWAY block got inserted above it). Since libaom_posix_implict.patch is applied with plain patch -p1 against a fresh git checkout of libaom's main, the hunk no longer matches and patch fails outright, aborting the whole build.

This currently breaks https://github.com/php/frankenphp CI: https://github.com/php/frankenphp/actions/runs/30942582659/job/92104518685

patching file CMakeLists.txt
Hunk #1 FAILED at 269.
1 out of 1 hunk FAILED -- saving rejects to file CMakeLists.txt.rej
✗ File system error: Cannot extract source libaom: Patch file [libaom_posix_implict.patch] failed to apply

Fix updates the hunk to the current context (if(ENABLE_APPS) at line 312).

Separate question: since libaom.yml pins rev: main (not a tag/commit), this patch will keep bit-rotting every time upstream touches nearby CMake code. _POSIX_C_SOURCE for ftello (https://bugs.gentoo.org/869419) looks like a genuine portability gap in libaom's own build, not something specific to static-php-cli. Wouldn't it be more durable to get this upstreamed into libaom directly (their Gerrit, since they don't take GitHub PRs) rather than carrying a patch that has to be rebased on every drift?

…s.txt

libaom moved the aom_encoder_stats target from if(ENABLE_EXAMPLES) at
line 269 to if(ENABLE_APPS) at line 312, breaking the patch hunk
context and failing every build that fetches libaom's main branch.
@crazywhalecc
crazywhalecc merged commit 9daf9da into crazywhalecc:v3 Aug 5, 2026
8 checks passed
@dunglas
dunglas deleted the fix/libaom-posix-patch-context branch August 5, 2026 08:28
crazywhalecc pushed a commit that referenced this pull request Aug 5, 2026
…s.txt

libaom's main moved the aom_encoder_stats target from
if(ENABLE_EXAMPLES) at CMakeLists.txt:269 to if(ENABLE_APPS) at
line 312, so the hunk no longer matches and patch fails outright,
breaking any build that falls back to a source build of libaom
(e.g. musl targets with no pre-built asset).

Same fix as #1223, backported to main (v2); that one only landed on v3.
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.

3 participants