[FFmpeg-user] Compiling FFmpeg for 32 bits (i386) on Mac OS X

Michael Bradshaw mbradshaw at sorensonmedia.com
Fri Jun 1 18:53:43 CEST 2012


On Fri, Jun 1, 2012 at 10:39 AM, Michael Bradshaw
<mbradshaw at sorensonmedia.com> wrote:
> On Fri, Jun 1, 2012 at 12:08 AM, Carl Eugen Hoyos <cehoyos at ag.or.at> wrote:
>> Michael Bradshaw <mbradshaw <at> sorensonmedia.com> writes:
>>
>>> ./configure --enable-shared --disable-static --arch=x86_32
>>> --extra-cflags="-arch i386" --extra-ldflags="-arch i386"
>>> --extra-cxxflags="-arch i386" --target-os=darwin
>>> --enable-cross-compile
>>
>> Does ./configure --cc='gcc -m32' work?
>> (I suspect --enable-cross-compile disables some configure tests.)
>
> Perfect, "./configure --cc='gcc -m32'" works, and file reports they
> are indeed i386 32-bit binaries.

Actually, I lied. The above command does indeed compile correctly, but
I need the shared libs (which aren't built by default). "./configure
--enable-shared --disable-static --cc='gcc -m32'" fails with the same
error. If you're curious, make V=1 gives:

gcc -m32 -I. -I./ -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64
-D_LARGEFILE_SOURCE -DPIC -DHAVE_AV_CONFIG_H -std=c99
-fomit-frame-pointer -fPIC -g -Wdeclaration-after-statement -Wall
-Wno-parentheses -Wno-switch -Wno-format-zero-length
-Wdisabled-optimization -Wpointer-arith -Wredundant-decls
-Wno-pointer-sign -Wcast-qual -Wwrite-strings -Wundef
-Wmissing-prototypes -Wno-pointer-to-int-cast -Wstrict-prototypes -O3
-fno-math-errno -fno-tree-vectorize
-Werror=implicit-function-declaration -Werror=missing-prototypes  -MMD
-MF libswscale/x86/rgb2rgb.d -MT libswscale/x86/rgb2rgb.o -c -o
libswscale/x86/rgb2rgb.o libswscale/x86/rgb2rgb.c
libswscale/x86/rgb2rgb_template.c: In function ‘rgb15tobgr24_MMX’:
libswscale/x86/rgb2rgb_template.c:814: error: can't find a register in
class ‘GENERAL_REGS’ while reloading ‘asm’
libswscale/x86/rgb2rgb_template.c:811: error: ‘asm’ operand has
impossible constraints
libswscale/x86/rgb2rgb_template.c:814: error: ‘asm’ operand has
impossible constraints
libswscale/x86/rgb2rgb_template.c:879: error: ‘asm’ operand has
impossible constraints
make: *** [libswscale/x86/rgb2rgb.o] Error 1


More information about the ffmpeg-user mailing list