[PR #2073] [MERGED] [FIX]macOS: Fix hardsub pipeline failing due to arm64/x86_64 build mismatch #2883

Closed
opened 2026-01-29 17:24:26 +00:00 by claunia · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/CCExtractor/ccextractor/pull/2073
Author: @gaurav02081
Created: 1/28/2026
Status: Merged
Merged: 1/29/2026
Merged by: @cfsmp3

Base: masterHead: gaurav-v2


📝 Commits (1)

  • f1bb0f4 macOS: Fix hardsub pipeline failing due to arm64/x86_64 build mismatch

📊 Changes

1 file changed (+10 additions, -1 deletions)

View changed files

📝 mac/build.command (+10 -1)

📄 Description

In raising this pull request, I confirm the following (please check boxes):

  • I have read and understood the contributors guide.
  • I have checked that another pull request for this purpose does not exist.
  • I have considered, and confirmed that this submission will be valuable to others.
  • I accept that this submission may not be used, and the pull request closed at the will of the maintainer.
  • I give this submission freely, and claim no ownership to its content.
  • I have mentioned this change in the changelog.

My familiarity with the project is as follows (check one):

  • I have never used CCExtractor.
  • I have used CCExtractor just a couple of times.
  • I absolutely love CCExtractor, but have not contributed previously.
  • I am an active contributor to CCExtractor.

PR Description

On macOS (Apple Silicon), hardsub (burned-in subtitle) OCR exited early with
“No captions were found in input”, even when subtitles were visible.

This was caused by an architecture mismatch:

C code built as arm64

Rust toolchain and Homebrew deps (FFmpeg/Tesseract) built as x86_64 (Rosetta)

The mixed build silently prevented the hardsub pipeline from reaching frame/OCR processing.

Fix

Update the macOS build script to:

detect Cargo’s architecture

force the C build to match it (-arch x86_64 or -arch arm64)

This restores proper hardsub OCR execution on macOS.

Files changed

mac/build.command

Feedback on any macOS CI / Sample Platform impact is welcome.

Fix ---------------------------------------

CARGO_ARCH=$(file $(which cargo) | grep -o 'x86_64\|arm64')

if [[ "$CARGO_ARCH" == "x86_64" ]]; then
    BLD_ARCH="-arch x86_64"
else
    BLD_ARCH="-arch arm64"


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/CCExtractor/ccextractor/pull/2073 **Author:** [@gaurav02081](https://github.com/gaurav02081) **Created:** 1/28/2026 **Status:** ✅ Merged **Merged:** 1/29/2026 **Merged by:** [@cfsmp3](https://github.com/cfsmp3) **Base:** `master` ← **Head:** `gaurav-v2` --- ### 📝 Commits (1) - [`f1bb0f4`](https://github.com/CCExtractor/ccextractor/commit/f1bb0f4dcec075d61218cdec5b95779a2a66b24f) macOS: Fix hardsub pipeline failing due to arm64/x86_64 build mismatch ### 📊 Changes **1 file changed** (+10 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `mac/build.command` (+10 -1) </details> ### 📄 Description <!-- Please prefix your pull request with one of the following: **[FEATURE]** **[FIX]** **[IMPROVEMENT]**. --> **In raising this pull request, I confirm the following (please check boxes):** - [x] I have read and understood the [contributors guide](https://github.com/CCExtractor/ccextractor/blob/master/.github/CONTRIBUTING.md). - [x] I have checked that another pull request for this purpose does not exist. - [x] I have considered, and confirmed that this submission will be valuable to others. - [x] I accept that this submission may not be used, and the pull request closed at the will of the maintainer. - [x] I give this submission freely, and claim no ownership to its content. - [ ] **I have mentioned this change in the [changelog](https://github.com/CCExtractor/ccextractor/blob/master/docs/CHANGES.TXT).** **My familiarity with the project is as follows (check one):** - [ ] I have never used CCExtractor. - [ ] I have used CCExtractor just a couple of times. - [ ] I absolutely love CCExtractor, but have not contributed previously. - [x] I am an active contributor to CCExtractor. --- PR Description On macOS (Apple Silicon), hardsub (burned-in subtitle) OCR exited early with “No captions were found in input”, even when subtitles were visible. This was caused by an architecture mismatch: C code built as arm64 Rust toolchain and Homebrew deps (FFmpeg/Tesseract) built as x86_64 (Rosetta) The mixed build silently prevented the hardsub pipeline from reaching frame/OCR processing. Fix Update the macOS build script to: detect Cargo’s architecture force the C build to match it (-arch x86_64 or -arch arm64) This restores proper hardsub OCR execution on macOS. Files changed mac/build.command Feedback on any macOS CI / Sample Platform impact is welcome. Fix --------------------------------------- ``` CARGO_ARCH=$(file $(which cargo) | grep -o 'x86_64\|arm64') if [[ "$CARGO_ARCH" == "x86_64" ]]; then BLD_ARCH="-arch x86_64" else BLD_ARCH="-arch arm64" ``` --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
claunia added the pull-request label 2026-01-29 17:24:26 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/ccextractor#2883