错误编译ffmpeg for iPhone [英] Errors compiling ffmpeg for iPhone

查看:292
本文介绍了错误编译ffmpeg for iPhone的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在OS X Lion上,我试图为iPhone编译ffmpeg的armv7库。

  ./ configure --disable-doc --disable -ffmpeg --disable -ffplay --disable -ffserver --disable -ffprobe --enable -cross-compile --arch = arm --target-os = darwin  - cc = / Developer / Platforms / iPhoneOS.platform / Developer / usr / bin / gcc --as ='gas-preprocessor / gas-preprocessor.pl /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc' - -sysroot = / Developer / Platforms / iPhoneOS.platform / Developer / SDKs / iPhoneOS5.0.sdk --cpu = cortex-a8 --extra-cflags =' -  arch armv7'--extra-ldflags =' -  arch armv7  - isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk'--enable-pic --disable-avdevice --disable-avfilter --disable-zlib --disable-bzlib 

配置运行良好,尽管它结束于:警告:编译器不会指示浮点ABI,猜测软。



以下是我的结果:

 用户-MacBook-Pro:ffmpeg-0.10使用r $ make 
CC libavformat / 4xm.o
CC libavformat / a64.o
CC libavformat / aacdec.o
CC libavformat / ac3dec.o
CC libavformat / act.o
CC libavformat / adtsenc.o
CC libavformat / adxdec.o
CC libavformat / aea.o
CC libavformat / aiffdec.o
CC libavformat / aiffenc.o
CC libavformat / allformats.o
CC libavformat / amr.o
CC libavformat / anm.o
CC libavformat / apc.o
CC libavformat / ape.o
CC libavformat / apetag.o
CC libavformat / applehttp.o
CC libavformat / applehttpproto.o
CC libavformat / asf.o
CC libavformat / asfcrypt.o
错误:inline asm中的无效操作数:'ldr $ {0:Q},$ 1
ldr $ {0:R},$ 2
'
make:* ** [libavformat / asfcrypt.o]错误1
用户-MacBook-Pro:ffmpeg-0.10用户$

有什么想法?谢谢!

解决方案

内联汇编程序存在一个问题。我不知道为什么,但编译ffmpeg(在配置行中使用--disable-asm)时必须禁用汇编优化。



然而,我没有试着编译这个版本的ffmpeg。 =>我尝试编译FFmpeg v0.10并禁用了asm,它工作正常。不过,我认为它会在设备上变慢。


I'm on OS X Lion and I'm trying to compile the armv7 libraries of ffmpeg for the iPhone. I'm using ffmpeg 0.10.

Here's my configure line:

./configure --disable-doc --disable-ffmpeg --disable-ffplay --disable-ffserver --disable-ffprobe --enable-cross-compile --arch=arm --target-os=darwin --cc=/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc --as='gas-preprocessor/gas-preprocessor.pl /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc' --sysroot=/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk --cpu=cortex-a8 --extra-cflags='-arch armv7' --extra-ldflags='-arch armv7 -isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk' --enable-pic --disable-avdevice --disable-avfilter --disable-zlib --disable-bzlib

Configure runs fine although it ends with: WARNING: Compiler does not indicate floating-point ABI, guessing soft.

Here are my make results:

Users-MacBook-Pro:ffmpeg-0.10 user$ make
CC    libavformat/4xm.o
CC    libavformat/a64.o
CC    libavformat/aacdec.o
CC    libavformat/ac3dec.o
CC    libavformat/act.o
CC    libavformat/adtsenc.o
CC    libavformat/adxdec.o
CC    libavformat/aea.o
CC    libavformat/aiffdec.o
CC    libavformat/aiffenc.o
CC    libavformat/allformats.o
CC    libavformat/amr.o
CC    libavformat/anm.o
CC    libavformat/apc.o
CC    libavformat/ape.o
CC    libavformat/apetag.o
CC    libavformat/applehttp.o
CC    libavformat/applehttpproto.o
CC    libavformat/asf.o
CC    libavformat/asfcrypt.o
error: invalid operand in inline asm: 'ldr   ${0:Q}, $1 
    ldr   ${0:R}, $2 
    '
make: *** [libavformat/asfcrypt.o] Error 1
Users-MacBook-Pro:ffmpeg-0.10 user$

Any ideas? Thanks!

解决方案

There is a problem with inline assembler. I do not know why but you have to disable assembler optimization when compiling ffmpeg (--disable-asm in your configure line).

However, I did not try yet to compile this version of ffmpeg. => I did try to compile FFmpeg v0.10 with disabling asm and it works. However, I think that it will slow on device.

这篇关于错误编译ffmpeg for iPhone的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆