[FFmpeg-trac] #2659(build system:new): Compiling for i386 on 64bit OSX is hard
FFmpeg
trac at avcodec.org
Tue Jun 11 19:41:20 CEST 2013
#2659: Compiling for i386 on 64bit OSX is hard
-------------------------------------+-------------------------------------
Reporter: hendrik | Type: defect
Status: new | Priority: normal
Component: build | Version: git-
system | master
Keywords: i386 OSX | Blocked By:
Darwin | Reproduced by developer: 0
Blocking: |
Analyzed by developer: 0 |
-------------------------------------+-------------------------------------
Summary of the bug:
When building on OS X 10.7.5 (64bit), it is hard to build a ''small'' or
''shared'' 32bit version.
How to reproduce:
Specifying `--arch=i386` has no effect, as `configure` differentiates
between 32 and 64 bit by compiling some code.
Forcing 32bit via `--cc="clang -m32"` works, but then the flag `--enable-
small` leads to a compilation error:
{{{
CC libavcodec/h264_cabac.o
In file included from libavcodec/h264_cabac.c:43:
libavcodec/x86/h264_i386.h:137:9: error: ran out of registers during
register allocation
"mov %1, %6 \n\t"
}}}
Since the failing code is assembler, specifying `--disable-asm` avoids the
failure.
What if we use gcc instead of clang? Well, that works partially. I.e. it
does not work with shared libs enabled:
`--enable-small --enable-shared --disable-static --arch=i386 --cc="gcc
-m32"`
again leads to
{{{
CC libavcodec/h264_cabac.o
cc1: error in backend: Ran out of registers during register allocation!
make: *** [libavcodec/h264_cabac.o] Error 1
}}}
$ gcc --version
i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1 (Based on Apple Inc. build
5658) (LLVM build 2336.9.00)
$ clang --version
Apple clang version 3.1 (tags/Apple/clang-318.0.58) (based on LLVM 3.1svn)
Target: x86_64-apple-darwin11.4.2
Thread model: posix
--
Ticket URL: <https://ffmpeg.org/trac/ffmpeg/ticket/2659>
FFmpeg <http://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list