Skip to content

support riscv64 builds#214

Open
threexc wants to merge 5 commits intoPyAV-Org:mainfrom
threexc:tgamblin/riscv64
Open

support riscv64 builds#214
threexc wants to merge 5 commits intoPyAV-Org:mainfrom
threexc:tgamblin/riscv64

Conversation

@threexc
Copy link

@threexc threexc commented Mar 9, 2026

This makes the changes necessary to support riscv64 builds in pyav-ffmpeg. The work here is being done with the goal of supporting video_reader-rs using pyav-ffmpeg in its CI, which in turn is of interest to the RISE Project.

Note that there's a patch labeled revertme which reduces the test matrix down to just riscv64 for testing purposes.

I started by testing this on my fork: threexc#1

What I found there is that the manylinux build succeeds once cuda and amf are also disabled for riscv64, but musllinux is a different story. I looked to see what version of musl the musllinux_1_2 image includes:

tgamblin@megalith ~ $ docker run --rm --platform linux/riscv64 quay.io/pypa/musllinux_1_2_riscv64:2026.03.01-1 sh -c "apk info musl"
WARNING: opening from cache https://dl-cdn.alpinelinux.org/alpine/v3.22/main: No such file or directory
WARNING: opening from cache https://dl-cdn.alpinelinux.org/alpine/v3.22/community: No such file or directory
musl-1.2.5-r10 description:
the musl c library (libc) implementation

musl-1.2.5-r10 webpage:
https://musl.libc.org/

musl-1.2.5-r10 installed size:
598 KiB

Seems that the missing header (stdbit.h) is a C23 addition

I guess we'd need to wait for musl to support it, and then for a new musllinux_1_2 image to be built?

Alternatively, it looks like there's a compatibility layer for it in ffmpeg, which we could try to use.

threexc added 5 commits March 9, 2026 10:55
We'll need a newer one to use cmake binaries for riscv64.

Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
Fix policy definitions and minimum required CMake version in
CMakeLists.txt so that we can build using riscv64 wheels.

Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
This probably breaks, but let's test it out.

Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
@WyattBlue
Copy link
Member

x265 and cmake patches should be in a separate PR since it benefits all builds.

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.

2 participants