Skip to content

support riscv64 builds#214

Open
threexc wants to merge 1 commit intoPyAV-Org:mainfrom
threexc:tgamblin/riscv64
Open

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

Conversation

@threexc
Copy link
Contributor

@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.

@WyattBlue
Copy link
Member

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

@threexc
Copy link
Contributor Author

threexc commented Mar 13, 2026

Looks like the musllinux build failed on a bad hash for the x265 tarball, which also happened to me once when I was working on the cmake/x265 PR. A retrigger should be enough...

Disable cuda and amf for this mode (like arm64) since they don't seem to
support riscv64 yet.

Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
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