rust-ffmpeg-sys
rust-ffmpeg-sys copied to clipboard
Can’t cross-compile from aarch64-unknowm-linux-gnu target.
I’m using ubuntu 22.04 LTS as a host.
Here’s the command I use.
env PKG_CONFIG_SYSROOT_DIR=/usr/aarch64-linux-gnu/ PKG_CONFIG_PATH=/usr/lib/aarch64-linux-gnu/pkgconfig/ CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=/usr/bin/aarch64-linux-gnu-gcc cargo check
It fails when compiling check.c
. I’ve debugged enough to see that you’ve harcoded using host as target and as a result it doesn’t see arm versions of ffmpeg libraries installed for cross compilation like so apt install libav-util:arm64
.
Do you support cross-compilation?
And why is your build script so complex? sys
crate supposed to just create bindings. You’re trying to compile ffmpeg for some reason… Can you elaborate on that?
Same issue for gifski on void aarch64 and armv7l cross compiles https://github.com/void-linux/void-packages/pull/50117 (fork used in gifski is https://github.com/kornelski/rust-ffmpeg-sys-1)