Skip to content

Conversation

@cfsmp3
Copy link
Contributor

@cfsmp3 cfsmp3 commented Dec 31, 2025

Summary

Fix two build failures on 32-bit architectures reported by Void Linux maintainer.

Fix 1: i686 build failure (#1937)

The code was importing std::arch::x86_64::* even when compiled for 32-bit x86:

#[cfg(any(target_arch = "x86", target_arch = "x86_64"))]
use std::arch::x86_64::*;  // ERROR: x86_64 module doesn't exist on i686

Fix: Use separate conditional imports for each architecture.

Fix 2: armv7l build failure (#1938)

The literal 0xcdcdcdcdcdcdcdcd is a 64-bit value that doesn't fit in 32-bit usize:

error: literal out of range for `usize`
   --> src/libccxr_exports/demuxer.rs:269:63
    |
269 |             if buffer_ptr.is_null() || buffer_ptr as usize == 0xcdcdcdcdcdcdcdcd {
    |                                                               ^^^^^^^^^^^^^^^^^^

Fix: Define a platform-appropriate constant (64-bit: 0xcdcdcdcdcdcdcdcd, 32-bit: 0xcdcdcdcd).

Test plan

  • Verified cargo check passes on x86_64
  • Void Linux maintainer to verify i686 build works
  • Void Linux maintainer to verify armv7l build works

Fixes #1937
Fixes #1938

🤖 Generated with Claude Code

cfsmp3 and others added 2 commits December 31, 2025 12:42
The code was using `std::arch::x86_64::*` unconditionally for both
x86 and x86_64 architectures. On 32-bit x86 (i686), the correct
module is `std::arch::x86`, not `std::arch::x86_64`.

This caused a build failure on i686:
  error[E0432]: unresolved import `std::arch::x86_64`

The fix uses separate conditional imports:
- `std::arch::x86::*` for 32-bit x86
- `std::arch::x86_64::*` for 64-bit x86_64

Both modules provide the same SSE2 intrinsics used by find_next_zero().

Fixes CCExtractor#1937

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
The literal `0xcdcdcdcdcdcdcdcd` is a 64-bit value used as a "poison"
pattern to detect uninitialized pointers. On 32-bit systems like
armv7l, this causes a compile error because `usize` is only 32 bits.

The fix defines a platform-appropriate constant:
- 64-bit: 0xcdcdcdcdcdcdcdcd
- 32-bit: 0xcdcdcdcd

Fixes CCExtractor#1938

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
@cfsmp3 cfsmp3 changed the title fix(rust): Fix 32-bit x86 (i686) build failure fix(rust): Fix 32-bit build failures (i686, armv7l) Dec 31, 2025
@cfsmp3 cfsmp3 merged commit da79ee4 into CCExtractor:master Dec 31, 2025
23 of 25 checks passed
@ccextractor-bot
Copy link
Collaborator

CCExtractor CI platform finished running the test files on linux. Below is a summary of the test results, when compared to test for commit 64ce4ac...:
Report Name Tests Passed
Broken 13/13
CEA-708 14/14
DVB 7/7
DVD 3/3
DVR-MS 2/2
General 25/27
Hardsubx 1/1
Hauppage 3/3
MP4 3/3
NoCC 10/10
Options 81/86
Teletext 21/21
WTV 13/13
XDS 34/34

Your PR breaks these cases:

  • ccextractor --autoprogram --out=ttxt --latin1 --ucla dab1c1bd65...
  • ccextractor --out=srt --latin1 --autoprogram 29e5ffd34b...
  • ccextractor --startcreditstext "CCextractor Start crdit Testing" c4dd893cb9...
  • ccextractor --startcreditsnotbefore 1 --startcreditstext "CCextractor Start crdit Testing" c4dd893cb9...
  • ccextractor --startcreditsnotafter 2 --startcreditstext "CCextractor Start crdit Testing" c4dd893cb9...
  • ccextractor --startcreditsforatleast 1 --startcreditstext "CCextractor Start crdit Testing" c4dd893cb9...
  • ccextractor --startcreditsforatmost 2 --startcreditstext "CCextractor Start crdit Testing" c4dd893cb9...

It seems that not all tests were passed completely. This is an indication that the output of some files is not as expected (but might be according to you).

Check the result page for more info.

@cfsmp3 cfsmp3 deleted the fix/i686-32bit-build-1937 branch January 1, 2026 08:25
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.

ccextractor 0.96.3 fails to build on armv7l ccextractor 0.96.3 fails to build on i686

2 participants