Skip to content

Armv7 fixes#2313

Merged
WyattBlue merged 3 commits into
mainfrom
armv7-fixes
Jun 16, 2026
Merged

Armv7 fixes#2313
WyattBlue merged 3 commits into
mainfrom
armv7-fixes

Conversation

@WyattBlue

Copy link
Copy Markdown
Member

No description provided.

@WyattBlue WyattBlue force-pushed the armv7-fixes branch 2 times, most recently from da1a227 to 999a410 Compare June 15, 2026 23:04
The cross-built wheels loaded but crashed on real armv7 hardware. Two
root causes:
- zig/lld aligns our extensions' PT_LOAD vaddrs to 64K but file offsets
  to 4K, which the dynamic loader rejects. Pass -Wl,-z,max-page-size=4096
  to align both to the armv7l 4K page size.
- ubuntu-24.04's system patchelf 0.18.0 (invoked by auditwheel) corrupts
  ELF files with large p_align, breaking the prebuilt FFmpeg libraries at
  runtime. Pin patchelf <0.18 and prepend it to PATH so auditwheel uses
  it instead of the system version.
PRs never exercised the armv7 path: tests.yml only builds wheels on
release/dispatch. Add a smoke job that cross-builds the armv7l wheels
(fast, no emulation) and then boots them in an armv7 container under
QEMU to assert 'python -m av --version' imports and loads FFmpeg.
Setting CFLAGS for the cross build replaces the target Python's default
OPT flags, so extensions were compiled at -O0 with assertions enabled.
The free-threaded (cp314t) build then tripped a Py_SET_REFCNT 'refcnt >= 0'
assertion at import that release wheels compile out. Pass -O2 -DNDEBUG
explicitly so the cross-built wheels match a normal release build.
@WyattBlue WyattBlue merged commit a3424b7 into main Jun 16, 2026
8 checks passed
@WyattBlue WyattBlue deleted the armv7-fixes branch June 16, 2026 00:46
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.

1 participant