Armv7 fixes#2313
Merged
Merged
Conversation
da1a227 to
999a410
Compare
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.