[FFmpeg-user] FFmpeg refuses to build with requested architecture

Ben Vining ben.the.vining at gmail.com
Tue Mar 15 04:25:56 EET 2022


I'm trying to configure a Mac universal binary build of FFmpeg by building
it for both arm64 and x86_64, but the output of the configure script always
shows ARCH: c (generic).

Here's the command for my x86_64 configuration:

'./configure' '--disable-static' '--disable-doc' '--disable-asm'
'--enable-shared' '--enable-protocol=file'
'--shlibdir=/Users/benvining/Documents/Foleys/VideoExamples/Builds/_deps/foleys_video_engine-build/ffmpeg/x86_64'
'--libdir=/Users/benvining/Documents/Foleys/VideoExamples/Builds/_deps/foleys_video_engine-build/ffmpeg/x86_64'
'--incdir=/Users/benvining/Documents/Foleys/VideoExamples/Builds/_deps/foleys_video_engine-build/ffmpeg/x86_64/include'
'--prefix=/Users/benvining/Documents/Foleys/VideoExamples/Builds/_deps/foleys_video_engine-build/ffmpeg/x86_64'
'--arch=x86_64' '--cc=clang' '--cxx=clang++'

install prefix
/Users/benvining/Documents/Foleys/VideoExamples/Builds/_deps/foleys_video_engine-build/ffmpeg/x86_64



And the configure script outputs:


source path               .

C compiler                clang

C library

ARCH                      c (generic)

...



Here's the command for my arm64 configuration:


'./configure' '--disable-static' '--disable-doc' '--disable-asm'
'--enable-shared' '--enable-protocol=file'
'--shlibdir=/Users/benvining/Documents/Foleys/VideoExamples/Builds/_deps/foleys_video_engine-build/ffmpeg/x86_64'
'--libdir=/Users/benvining/Documents/Foleys/VideoExamples/Builds/_deps/foleys_video_engine-build/ffmpeg/x86_64'
'--incdir=/Users/benvining/Documents/Foleys/VideoExamples/Builds/_deps/foleys_video_engine-build/ffmpeg/x86_64/include'
'--prefix=/Users/benvining/Documents/Foleys/VideoExamples/Builds/_deps/foleys_video_engine-build/ffmpeg/x86_64'
'--arch=arm64' '--cc=clang' '--cxx=clang++'

install prefix
/Users/benvining/Documents/Foleys/VideoExamples/Builds/_deps/foleys_video_engine-build/ffmpeg/x86_64



And again the configure script outputs:


source path               .

C compiler                clang

C library

ARCH                      c (generic)

...



And after building both build trees, the library artefacts produced are
both arm64 (verified with lipo -archs).


Does anyone have any suggestions?

Thanks,

Ben Vining


More information about the ffmpeg-user mailing list