I'm trying to build a universal binary of ffmpeg on MacOS, by compiling it twice (for arm64 and x86_64) and then using the lipo tool to combine the resulting binaries. I'm on an M1 Mac, so uname -m
returns arm64
on my machine.
When running the configure script like so:
./configure --arch=x86_64
It outputs:
install prefix /usr/local
source path .
C compiler gcc
C library
ARCH c (generic)
...
And after running make
, inspecting the built binaries with lipo -archs
reveals that it's building them for arm64
.
The result is the same if I add --enable-crosscompile
to the configure call.
Based on this post, I also tried --arch=x86
, but that had the exact same result, configure script displayed arch as c (generic)
and inspecting artefacts with lipo shows they are built for arm64
architecture.
Does anyone have any ideas? Why is the configure script just refusing to build for x86_64?