Skip to content

build: FFmpeg's source paths come out the same on every system - #1328

Merged
vdmkenny merged 1 commit into
mainfrom
build/reproducible-windows
Oct 23, 2026
Merged

vdmkenny merged 1 commit into
mainfrom
build/reproducible-windows

Conversation

@vdmkenny

Copy link
Copy Markdown
Collaborator

FFmpeg's assertion messages hold their source files' paths (__FILE__). A build on Windows wrote the package's folders with backslashes, and a cross-build with slashes. So the release's openreliant.exe differed from a cross-build of the same commit by those paths alone.

  • deps/ffmpeg compiles with Clang's -ffile-reproducible, which writes __FILE__ with the target's separators, whatever system builds it.
  • The platform docs say so.

Checked: a cross-build for x86_64-windows-gnu from macOS (--release=fast -Dstrip, as the release builds) now holds FFmpeg's paths as zig-pkg\N-V-…\libavcodec\options.c, with no slashes left. That's what a build on Windows writes with the flag. A byte-for-byte comparison needs a Windows build of the same commit: the next release, or a manual run of the release workflow.

Closes #1162

FFmpeg's assertion messages hold their source files' paths (__FILE__).
A build on Windows wrote the package's folders with backslashes and a
cross-build with slashes, so the release's openreliant.exe differed from
a cross-build of the same commit by those paths alone. Clang's
-ffile-reproducible writes them with the target's separators, so both
now hold the same paths: a cross-build for Windows writes
zig-pkg\<package>\libavcodec\options.c, as Windows does.
@vdmkenny
vdmkenny merged commit 79dbbf1 into main Oct 23, 2026
4 checks passed
@vdmkenny
vdmkenny deleted the build/reproducible-windows branch October 23, 2026 18:20
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.

Windows builds of openreliant.exe differ from cross-builds in FFmpeg's source paths

1 participant