Skip to content

Commit 60ae6fb

Browse files
cfsmp3claudesteel-bucket
authored
[FIX] Fix Windows build by updating vcpkg baseline and other packages (#1778)
* [FIX] Update vcpkg baseline and use forked rsmpeg for FFmpeg 7 Update vcpkg baseline from Feb 2024 to Dec 2025 to resolve libxml2 hash mismatch. GitLab regenerates archives dynamically, causing SHA512 verification failures with old baselines. Switch to CCExtractor's forked rsmpeg (github.com/CCExtractor/rsmpeg) which pins rusty_ffmpeg to 0.16.4 for FFmpeg 7.1 compatibility. This provides consistent FFmpeg 7 support across all platforms. Changes: - Update vcpkg baseline in workflow and vcpkg.json - Use forked rsmpeg from git for all platforms - Use ffmpeg7_1 feature instead of ffmpeg6/ffmpeg8 - Use link_vcpkg_ffmpeg for Windows 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * Enable use_prebuilt_binding feature for rsmpeg This ensures consistent FFmpeg 7 API signatures across all platforms, regardless of the system FFmpeg version installed. Ubuntu's FFmpeg 6 has different function signatures than FFmpeg 7. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * Standardize on FFmpeg 6.1.1 across all platforms Use FFmpeg 6 consistently: - Linux: uses apt packages (libavcodec-dev, etc.) which provide FFmpeg 6 - Windows: vcpkg baseline pinned to FFmpeg 6.1.1 (commit 5a58e645) - macOS: uses system FFmpeg 6 This ensures consistent behavior and API compatibility across all platforms. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * Use platform-appropriate FFmpeg versions - Linux: FFmpeg 6 (from Ubuntu apt packages) - Windows: FFmpeg 7 (from vcpkg with recent baseline) - macOS: FFmpeg 7 (from Homebrew) This fixes the Windows build which was failing due to vcpkg baseline hash mismatch for libxml2 in older baselines. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * Use FFmpeg 7 with prebuilt bindings for Linux Use ffmpeg7 feature everywhere and use_prebuilt_binding for Linux to ensure FFmpeg 7 API signatures regardless of system FFmpeg version. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * Fix library names for Windows build with updated vcpkg - Update leptonica library name from 1.83.1 to 1.85.0 - Update tesseract library name from tesseract53 to tesseract55 (v5.5.1) - Update libiconv library names: charset.lib -> libcharset.lib, iconv.lib -> libiconv.lib 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * Fix iconv library name for vcpkg static build vcpkg libiconv for x64-windows-static produces only iconv.lib with charset functionality bundled in, not separate libcharset.lib and libiconv.lib files. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * Fix iconv library names: use charset.lib and iconv.lib Restores the correct vcpkg libiconv library names: - charset.lib (libcharset library) - iconv.lib (libiconv library) These are the original names from vcpkg libiconv package for x64-windows-static. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * try: New Hash Updated the builtin baseline hash for ccextractor. * Remove charset.lib and iconv.lib from dependencies The project has its own win_iconv.c implementation in src/thirdparty/win_iconv/ which provides iconv functionality. With the updated vcpkg baseline (ab2977be), the libiconv library doesn't produce charset.lib or libcharset.lib files. FFmpeg is also built with --disable-iconv in this vcpkg configuration, so the external iconv libraries are not needed by any of the vcpkg dependencies. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com> Co-authored-by: Deepnarayan Sett <71217129+steel-bucket@users.noreply.github.com>
1 parent 42d7509 commit 60ae6fb

File tree

4 files changed

+12
-10
lines changed

4 files changed

+12
-10
lines changed

.github/workflows/build_windows.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ env:
44
RUSTFLAGS: -Ctarget-feature=+crt-static
55
VCPKG_DEFAULT_TRIPLET: x64-windows-static
66
VCPKG_DEFAULT_BINARY_CACHE: C:\vcpkg\.cache
7-
VCPKG_COMMIT: fba75d09065fcc76a25dcf386b1d00d33f5175af
7+
VCPKG_COMMIT: ab2977be50c702126336e5088f4836060733c899
88

99
on:
1010
workflow_dispatch:

src/rust/Cargo.toml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,16 +26,17 @@ lib_ccxr = { path = "lib_ccxr" }
2626
url = "2.5.4"
2727
encoding_rs = "0.8.5"
2828

29-
# Use rsmpeg with platform-specific FFmpeg features and versions
29+
# Use CCExtractor's forked rsmpeg with FFmpeg 7
30+
# All platforms use ffmpeg7 feature with prebuilt bindings for API consistency
3031
[target.'cfg(target_os = "linux")'.dependencies]
31-
rsmpeg = { version = "0.14.2", default-features = false, features = ["ffmpeg6", "link_system_ffmpeg"], optional = true }
32+
rsmpeg = { git = "https://github.com/CCExtractor/rsmpeg.git", default-features = false, features = ["ffmpeg7", "link_system_ffmpeg", "use_prebuilt_binding"], optional = true }
3233

3334
[target.'cfg(target_os = "windows")'.dependencies]
34-
rsmpeg = { version = "0.14.2", default-features = false, features = ["ffmpeg6", "link_system_ffmpeg"], optional = true }
35+
rsmpeg = { git = "https://github.com/CCExtractor/rsmpeg.git", default-features = false, features = ["ffmpeg7", "link_vcpkg_ffmpeg"], optional = true }
3536

36-
# Fallback for other platforms (FreeBSD, etc.)
37+
# macOS and other platforms use FFmpeg 7
3738
[target.'cfg(not(any(target_os = "linux", target_os = "windows")))'.dependencies]
38-
rsmpeg = { version = "0.18.0", default-features = false, features = ["ffmpeg8", "link_system_ffmpeg"], optional = true }
39+
rsmpeg = { git = "https://github.com/CCExtractor/rsmpeg.git", default-features = false, features = ["ffmpeg7", "link_system_ffmpeg"], optional = true }
3940

4041
[build-dependencies]
4142
bindgen = "0.64.0"

windows/ccextractor.vcxproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@
248248
</ClCompile>
249249
<Link>
250250
<AdditionalDependencies>
251-
ccx_rust.lib;UserEnv.lib;Crypt32.lib;WS2_32.Lib;ntdll.lib;Bcrypt.lib;Mfplat.lib;Mfuuid.lib;Secur32.lib;Strmiids.lib;Ole32.lib;User32.lib;libcrypto.lib;libcurl.lib;avcodec.lib;avformat.lib;avutil.lib;avfilter.lib;swscale.lib;swresample.lib;leptonica-1.83.1.lib;tesseract53.lib;gif.lib;archive.lib;avdevice.lib;bz2.lib;charset.lib;iconv.lib;jpeg.lib;libpng16.lib;libsharpyuv.lib;libssl.lib;libwebp.lib;libwebpdecoder.lib;libwebpdemux.lib;libwebpmux.lib;libxml2.lib;lz4.lib;lzma.lib;openjp2.lib;tiff.lib;turbojpeg.lib;zlib.lib;zstd.lib;libgpac.lib;%(AdditionalDependencies)</AdditionalDependencies>
251+
ccx_rust.lib;UserEnv.lib;Crypt32.lib;WS2_32.Lib;ntdll.lib;Bcrypt.lib;Mfplat.lib;Mfuuid.lib;Secur32.lib;Strmiids.lib;Ole32.lib;User32.lib;libcrypto.lib;libcurl.lib;avcodec.lib;avformat.lib;avutil.lib;avfilter.lib;swscale.lib;swresample.lib;leptonica-1.85.0.lib;tesseract55.lib;gif.lib;archive.lib;avdevice.lib;bz2.lib;jpeg.lib;libpng16.lib;libsharpyuv.lib;libssl.lib;libwebp.lib;libwebpdecoder.lib;libwebpdemux.lib;libwebpmux.lib;libxml2.lib;lz4.lib;lzma.lib;openjp2.lib;tiff.lib;turbojpeg.lib;zlib.lib;zstd.lib;libgpac.lib;%(AdditionalDependencies)</AdditionalDependencies>
252252
<ShowProgress>NotSet</ShowProgress>
253253
<GenerateDebugInformation>true</GenerateDebugInformation>
254254
<SubSystem>Console</SubSystem>
@@ -294,7 +294,7 @@
294294
</ClCompile>
295295
<Link>
296296
<AdditionalDependencies>
297-
ccx_rust.lib;UserEnv.lib;Crypt32.lib;WS2_32.Lib;ntdll.lib;Bcrypt.lib;Mfplat.lib;Mfuuid.lib;Secur32.lib;Strmiids.lib;Ole32.lib;User32.lib;libcrypto.lib;libcurl.lib;avcodec.lib;avformat.lib;avutil.lib;avfilter.lib;swscale.lib;swresample.lib;leptonica-1.83.1.lib;tesseract53.lib;gif.lib;archive.lib;avdevice.lib;bz2.lib;charset.lib;iconv.lib;jpeg.lib;libpng16.lib;libsharpyuv.lib;libssl.lib;libwebp.lib;libwebpdecoder.lib;libwebpdemux.lib;libwebpmux.lib;libxml2.lib;lz4.lib;lzma.lib;openjp2.lib;tiff.lib;turbojpeg.lib;zlib.lib;zstd.lib;libgpac.lib;%(AdditionalDependencies)</AdditionalDependencies>
297+
ccx_rust.lib;UserEnv.lib;Crypt32.lib;WS2_32.Lib;ntdll.lib;Bcrypt.lib;Mfplat.lib;Mfuuid.lib;Secur32.lib;Strmiids.lib;Ole32.lib;User32.lib;libcrypto.lib;libcurl.lib;avcodec.lib;avformat.lib;avutil.lib;avfilter.lib;swscale.lib;swresample.lib;leptonica-1.85.0.lib;tesseract55.lib;gif.lib;archive.lib;avdevice.lib;bz2.lib;jpeg.lib;libpng16.lib;libsharpyuv.lib;libssl.lib;libwebp.lib;libwebpdecoder.lib;libwebpdemux.lib;libwebpmux.lib;libxml2.lib;lz4.lib;lzma.lib;openjp2.lib;tiff.lib;turbojpeg.lib;zlib.lib;zstd.lib;libgpac.lib;%(AdditionalDependencies)</AdditionalDependencies>
298298
<GenerateDebugInformation>true</GenerateDebugInformation>
299299
<SubSystem>Console</SubSystem>
300300
<OptimizeReferences>true</OptimizeReferences>

windows/vcpkg.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,6 @@
66
"tesseract",
77
"ffmpeg"
88
],
9-
"builtin-baseline": "fba75d09065fcc76a25dcf386b1d00d33f5175af"
10-
}
9+
"builtin-baseline": "189fcdcb953b871d206ffada6db047496fc3f496"
10+
11+
}

0 commit comments

Comments
 (0)