尝试使用armv6和arv7架构编译用于iPhoneOS平台的FFMPEG库 [英] Trying to compile the FFMPEG libraries for iPhoneOS platform with armv6 and arv7 architecture

查看:173
本文介绍了尝试使用armv6和arv7架构编译用于iPhoneOS平台的FFMPEG库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试用arm7架构编译IOS平台的FFMPEG库。我从 http://www.ffmpeg.org 下载了FFMPEG图书馆。

I'm trying to compile the FFMPEG Libraries for IOS platform with arm7 architecture. I downloaded the FFMPEG libraries from http://www.ffmpeg.org.

我能够为iPhoneSimulator构建i386架构的静态库。但是我需要iPhoneOS的图书馆。使用configure命令我收到一个错误。以下是我的命令详细信息。

I'm successfully able to build the static libraries for the i386 architecture for the iPhoneSimulator. But I need the libraries for iPhoneOS. Using the configure command I'm getting an error. Below are my command details.

对于i386(无错误):

For i386(which is error free):

./configure  --enable-cross-compile --disable-debug --disable-ffmpeg --disable-ffplay --disable-ffprobe --disable-ffserver --disable-doc --disable-network  --disable-everything  --enable-protocol=file --enable-demuxer=mov  --enable-muxer=mpegts --enable-bsf=h264_mp4toannexb   --arch=i386 --target-os=darwin --cc=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc --as='./gas-preprocessor/gas-preprocessor.pl /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc' --sysroot=/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneOS6.1.sdk --cpu=i386 --extra-cflags='-arch i386' --extra-ldflags='-arch i386 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator6.1.sdk' --prefix="/Users/amit/Desktop/LivuLib-master/LivuLIb/ffmpeg/bin/newLib"

对于armv7:

./configure  --enable-cross-compile --disable-debug --disable-ffmpeg --disable-ffplay --disable-ffprobe --disable-ffserver --disable-doc --disable-network  --disable-everything  --enable-protocol=file --enable-demuxer=mov  --enable-muxer=mpegts --enable-bsf=h264_mp4toannexb   --arch=armv7 --target-os=darwin --cc=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc --as='./gas-preprocessor/gas-preprocessor.pl /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc' --sysroot=/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk --cpu=cortex-a9 --extra-cflags='-arch armv7' --extra-ldflags='-arch armv7 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk' --prefix="/Users/amit/Desktop/LivuLib-master/LivuLIb/ffmpeg/bin/newLib"

对于Arm7的上述命令,我收到此错误:

For above command for Arm7 I'm getting this error:

/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc is unable to create an executable file.
C compiler test failed.

If you think configure made a mistake, make sure you are using the latest
version from SVN.

所以请给我一个可能的解决方案。为什么不起作用?或者我需要更新任何东西。谢谢。

So please suggest me a possible solution. Why is it not working? Or do I need to update anything. Thanks.

推荐答案

我意识到这个问题在〜2.5个月前被问到,所以asker可能已经移动了,但我来了在寻找相同问题的答案时,会同时发生。所以,希望这将有助于某人在那里!

I realize this question was asked about ~2.5 months ago, so the asker may have moved on, but I came across it while searching for an answer to the same issue. So, hopefully, this will be of help to someone out there!

所有我真正要做的是验证我所使用的所有路径实际上是指向存在。

All I really had to do was verify that ALL the paths I was using were actually pointing to something that existed.

具体来说,我试图运行:

Specifically, I was trying to run:

./configure \
--prefix=armv7 \
--disable-ffmpeg --disable-ffplay --disable-ffprobe --disable-ffserver \
--enable-avresample --enable-cross-compile \
--sysroot="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.0.sdk" \
--target-os=darwin \
--cc="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc" \
--extra-cflags="-arch armv7 -mfpu=neon -miphoneos-version-min=6.0" \
--extra-ldflags="-arch armv7 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.0.sdk -miphoneos-version-min=6.0" \
--arch=arm --cpu=cortex-a9 --enable-pic

^ from http://www.tangentsoftworks .com / 2012/11/12 / how-to-prepare-your-mac-for-ios-development-with-ffmpeg-libraries /

当我无法使它工作时,我决定停止懒惰,实际检查路径中列出的目录:以/ Applications / ...开头的任何内容。
我发现我没有安装iPhoneOS6.0.sdk(在上面引用的路径)。

When I couldn't get it to work, I decided to stop being lazy and actually checked the directories listed in the paths: anything that starts with "/Applications/...". What I found is that I didn't have "iPhoneOS6.0.sdk" (it's referenced above in the paths) installed.

将脚本更改为正常工作:

Changing the script to this worked:

./configure \
--prefix=armv7 \
--disable-ffmpeg --disable-ffplay --disable-ffprobe --disable-ffserver \
--enable-avresample --enable-cross-compile \
--sysroot="/applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk" \
--target-os=darwin --cc="/applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc" \
--extra-cflags="-arch armv7 -mfpu=neon -miphoneos-version-min=6.0" \
--extra-ldflags="-arch armv7 -isysroot /applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk -miphoneos-version-min=6.0" \
--arch=arm --cpu=cortex-a9 --enable-pic 

总之,只需仔细检查路径。希望有帮助!

In short, just double-check your paths. Hope that helps!

这篇关于尝试使用armv6和arv7架构编译用于iPhoneOS平台的FFMPEG库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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