[PR #1939] [MERGED] fix(rust): Fix 32-bit build failures (i686, armv7l) #2738

Open
opened 2026-01-29 17:23:41 +00:00 by claunia · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/CCExtractor/ccextractor/pull/1939
Author: @cfsmp3
Created: 12/31/2025
Status: Merged
Merged: 12/31/2025
Merged by: @cfsmp3

Base: masterHead: fix/i686-32bit-build-1937


📝 Commits (2)

  • 7041441 fix(rust): Fix 32-bit x86 (i686) build failure
  • ace6361 fix(rust): Fix armv7l build failure with 64-bit literal

📊 Changes

2 files changed (+11 additions, -2 deletions)

View changed files

📝 src/rust/src/avc/core.rs (+3 -1)
📝 src/rust/src/libccxr_exports/demuxer.rs (+8 -1)

📄 Description

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


🔄 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/1939 **Author:** [@cfsmp3](https://github.com/cfsmp3) **Created:** 12/31/2025 **Status:** ✅ Merged **Merged:** 12/31/2025 **Merged by:** [@cfsmp3](https://github.com/cfsmp3) **Base:** `master` ← **Head:** `fix/i686-32bit-build-1937` --- ### 📝 Commits (2) - [`7041441`](https://github.com/CCExtractor/ccextractor/commit/7041441d39fd58f44f9c86772b9734c081dd5c9c) fix(rust): Fix 32-bit x86 (i686) build failure - [`ace6361`](https://github.com/CCExtractor/ccextractor/commit/ace6361bfbb12b5fbf92f22efea0130bbb7a6dd8) fix(rust): Fix armv7l build failure with 64-bit literal ### 📊 Changes **2 files changed** (+11 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `src/rust/src/avc/core.rs` (+3 -1) 📝 `src/rust/src/libccxr_exports/demuxer.rs` (+8 -1) </details> ### 📄 Description ## 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: ```rust #[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 - [x] 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](https://claude.com/claude-code) --- <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:23:41 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/ccextractor#2738