无法在 Mac OS X 上编译 i386 兼容的 ffmpeg dylib
我正在运行 64 位 Lion,但我需要编译 32 位版本的 ffmpeg,因为我使用的另一个库仅提供 32 位版本。我尝试了多种不同的配置,但它们都给我带来了错误。这是我尝试过的:
./configure --disable-static --enable-shared --disable-outdev=sdl --disable-bzlib --disable-libfreetype --disable-libopenjpeg --enable-zlib --enable-runtime-cpudetect --arch=i386 --extra-cflags="-arch i386" --extra-ldflags="-arch i386" --target-os=darwin --启用交叉编译
./configure --disable-static --enable-shared --disable-outdev=sdl --disable-bzlib --disable-libfreetype --disable-libopenjpeg --enable-zlib --enable-runtime-cpudetect --arch=i386 --extra-cflags="-arch i386" --extra-ldflags="-arch i386"
./configure --disable-static --enable-shared --disable-outdev=sdl --disable-bzlib --disable-libfreetype --disable-libopenjpeg --enable-zlib --enable-runtime-cpudetect --arch=x86_32
我要么得到“在注册期间耗尽寄存器” make 或 gcc 期间出现“分配”错误,抱怨交叉编译未激活。
I'm running 64-bit Lion but I need to compile a 32-bit version of ffmpeg because another library I'm using is only available as 32-bit. I've tried a number of different configurations but they're all giving me errors. Here's what I've tried:
./configure --disable-static --enable-shared --disable-outdev=sdl --disable-bzlib --disable-libfreetype --disable-libopenjpeg --enable-zlib --enable-runtime-cpudetect --arch=i386 --extra-cflags="-arch i386" --extra-ldflags="-arch i386" --target-os=darwin --enable-cross-compile
./configure --disable-static --enable-shared --disable-outdev=sdl --disable-bzlib --disable-libfreetype --disable-libopenjpeg --enable-zlib --enable-runtime-cpudetect --arch=i386 --extra-cflags="-arch i386" --extra-ldflags="-arch i386"
./configure --disable-static --enable-shared --disable-outdev=sdl --disable-bzlib --disable-libfreetype --disable-libopenjpeg --enable-zlib --enable-runtime-cpudetect --arch=x86_32
I either get a "ran out of registers during register allocation" error during make or gcc complains that cross-compile is not active.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
我可以通过使用 clang 而不是 gcc 在 ffmpeg build 08d2cee4 上实现此功能。所以这里的配置行有效:
感谢 libav-user 上的 Carl!
这是我的线程,以防它对任何人有帮助: http://ffmpeg.org/pipermail/libav- user/2011-12月/001013.html
I was able to get this working on ffmpeg build 08d2cee4 by using clang instead of gcc. So here was configure line that worked:
Thanks to Carl on libav-user!
Here was my thread in case it helps anyone: http://ffmpeg.org/pipermail/libav-user/2011-December/001013.html
您可以尝试使用 -m32 标志,它告诉 gcc 仅编译 32 位。
You might try using the -m32 flag which tells gcc to compile for 32-bit only.
我要大胆猜测 - 它是否正在构建:libavcodec/h264_cabac.o?
尝试添加
-fomit-frame-pointer
。 IIRC,有一些 gcc 内联汇编无法获得足够的寄存器。此选项释放%ebp
以用作通用寄存器。I'm going to take a wild guess - was it building:
libavcodec/h264_cabac.o
?Try adding
-fomit-frame-pointer
. IIRC, there's some gcc inline assembly that can't get hold of enough registers. This option frees up%ebp
for use as a general purpose register.我用 --disable-asm 解决了错误“在寄存器分配期间耗尽了寄存器”,
也许你可以尝试一下。
i resolve the error "ran out of registers during register allocation" with --disable-asm
maybe you could try it.