Skip to content

build: repair reference decoder patch headers on Windows - #421

Open
ylatuya wants to merge 1 commit into
masterfrom
fix/windows-decoder-patches
Open

ylatuya wants to merge 1 commit into
masterfrom
fix/windows-decoder-patches

Conversation

@ylatuya

@ylatuya ylatuya commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

Follow-up to #419 discussion_r4464811839, based directly on master.

Several issues prevented the Windows reference builds:

  • subprojects/packagefiles/jm/0001-Fix-ARM64-build-disable-SSE-on-ARM-architectures.patch declared 8/10 lines but has 7/9, so git apply rejected it. GNU patch tolerated the mismatch on Linux/macOS, which is why JM was silently disabled only on Windows.
  • build/patches/mpeg4aac-windows-headers.patch declared 11/11 lines but has 14/12, so it never applied. It also guarded sys/wait.h only with WIN32, which MinGW does not define (it defines _WIN32), so the include still failed after applying it.
  • Git on Windows checked *.patch files out with CRLF line endings, which makes git apply report the patches as corrupt before it reads the headers.
  • download_deps.py ran git apply --directory <absolute path>, which git apply rejects on Windows, so every MPEG-4 AAC patch failed there.

This fixes both hunk headers, guards the POSIX headers with WIN32 and _WIN32, marks *.patch as text eol=lf, runs the git apply fallback from the target directory, and removes the Windows CI exclusions for ldecod and mp4audec. Verify decoders now checks the full set on every platform.

Base automatically changed from fix/windows-subproject-links to master November 5, 2026 15:28
@ylatuya
ylatuya force-pushed the fix/windows-decoder-patches branch 2 times, most recently from a5e6332 to 723aade Compare November 5, 2026 15:30
@ylatuya ylatuya changed the title fix: repair reference decoder patch headers on Windows build: repair reference decoder patch headers on Windows Nov 5, 2026
@ylatuya
ylatuya force-pushed the fix/windows-decoder-patches branch from 723aade to 49d6ee1 Compare November 5, 2026 15:37
@ylatuya
ylatuya force-pushed the fix/windows-decoder-patches branch from 49d6ee1 to 5caf872 Compare November 5, 2026 15:49
The JM ARM64 patch declared 8/10 lines while its body has 7/9, so git
apply rejected it on Windows. GNU patch tolerated the mismatch on the
other platforms, which is why JM was silently disabled only on Windows.

The MPEG-4 AAC Windows headers patch declared 11/11 lines while its body
has 14/12, so it never applied. It also guarded sys/wait.h only with
WIN32, which MinGW does not define (it defines _WIN32), so the include
would still fail after applying the patch.

Fix both hunk headers, guard the POSIX headers with both WIN32 and
_WIN32, and stop excluding ldecod and mp4audec from the Windows decoder
verification.

Also mark *.patch as text eol=lf. Git on Windows checked the patches out
with CRLF, which makes git apply report them as corrupt before it even
looks at the headers.

Run the git apply fallback from the target directory: --directory with
an absolute path is rejected by git apply on Windows, so every MPEG-4
AAC patch failed there.
@rsanchez87

Copy link
Copy Markdown
Contributor

related with this PR

#422

@ylatuya
ylatuya added this pull request to stack #423 November 6, 2026 09:28
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.

2 participants