为armv6-7构建ffmpeg失败
我一直在尝试以我能想到的各种可能的方式构建 ffmpeg。我正在尝试使用他们的 git 存储库中的最新版本和构建脚本,我确认它可以工作,它来自这个问题: iPhone SDK 4.3 libav编译问题。该脚本昨天更新了,显然适用于问题中的那个人。
我的问题是它不会为armv6和armv7生成.a文件(或实际上任何文件)。因此,连接到通用库的 lipo 命令会失败。我还尝试使用 iFrameExtractor 中的构建脚本,但没有成功,而且 lipo-commands 也失败最后,我得到以下信息:
lipo: can't open input file: ./compiled/armv6/lib/libavcodec.a (No such file or directory)
lipo: can't open input file: ./compiled/armv6/lib/libavdevice.a (No such file or directory)
lipo: can't open input file: ./compiled/armv6/lib/libavfilter.a (No such file or directory)
lipo: can't open input file: ./compiled/armv6/lib/libavformat.a (No such file or directory)
lipo: can't open input file: ./compiled/armv6/lib/libavutil.a (No such file or directory)
lipo: can't open input file: ./compiled/armv6/lib/libpostproc.a (No such file or directory)
lipo: can't open input file: ./compiled/armv6/lib/libswscale.a (No such file or directory)
并且我还发布了整个输出 这里如果有人知道要在那里寻找什么(因为我不知道从哪里开始,它几乎有 5000 行输出。) 我还应该提到,我正在为 armv6、armv7 和 i386 编译它。我想将其导入到 XCode 中以从视频源中获取 H.264 帧。
当我尝试为armv6构建时,我使用以下配置:
./configure \
--enable-cross-compile \
--arch=arm \
--extra-cflags='-arch armv6' \
--extra-ldflags='-arch armv6' \
--target-os=darwin \
--cc=/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc \
--sysroot=/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.3.sdk \
--cpu=arm1176jzf-s \
--extra-ldflags=-L/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneSimulator4.3.sdk/usr/lib/system \
--prefix=compiled/armv6
并获得以下输出:
/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 Git. If the latest version fails, report the problem to the
[email protected] mailing list or IRC #ffmpeg on irc.freenode.net.
Include the log file "config.log" produced by configure as this will help
solving the problem.
所以问题是,我应该使用什么c编译器?我尝试过不同的: 手臂-苹果-darwin10-gcc-4.2.1 手臂-苹果-darwin10-llvm-gcc-4.2 gcc
但结果相同。 gcc 适用于 i386 和 armv7 所以我想它也应该适用于 armv6
I've been trying to build ffmpeg in every possible way I can think of. I'm trying with the latest revision from their git repository and with a build script which I have confirmation that it works, it's from this question: iPhone SDK 4.3 libav compiling problem. The script was updated yesterday and apparently works for the guy in the question.
my problem is that it doesn't generate the .a files (or actually any files) for armv6 anc armv7. and therefor the lipo commands, to concat into universal libs, fail. I've also tried using the build scripts from iFrameExtractor without any success it also fails with the lipo-commands in the end, i get the following:
lipo: can't open input file: ./compiled/armv6/lib/libavcodec.a (No such file or directory)
lipo: can't open input file: ./compiled/armv6/lib/libavdevice.a (No such file or directory)
lipo: can't open input file: ./compiled/armv6/lib/libavfilter.a (No such file or directory)
lipo: can't open input file: ./compiled/armv6/lib/libavformat.a (No such file or directory)
lipo: can't open input file: ./compiled/armv6/lib/libavutil.a (No such file or directory)
lipo: can't open input file: ./compiled/armv6/lib/libpostproc.a (No such file or directory)
lipo: can't open input file: ./compiled/armv6/lib/libswscale.a (No such file or directory)
and i have also posted the entire output here if anyone has any idea what to look for there (because i don't know where to start, it almost 5000 lines of output.)
i should also mention that i'm compiling it for armv6, armv7 and i386. I want to import it in XCode to get H.264 frames from video feed.
when i try to build for armv6 i use the following configure:
./configure \
--enable-cross-compile \
--arch=arm \
--extra-cflags='-arch armv6' \
--extra-ldflags='-arch armv6' \
--target-os=darwin \
--cc=/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc \
--sysroot=/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.3.sdk \
--cpu=arm1176jzf-s \
--extra-ldflags=-L/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneSimulator4.3.sdk/usr/lib/system \
--prefix=compiled/armv6
and get the following output:
/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 Git. If the latest version fails, report the problem to the
[email protected] mailing list or IRC #ffmpeg on irc.freenode.net.
Include the log file "config.log" produced by configure as this will help
solving the problem.
so the question, what c compiler should I use? i've tried different:
arm-apple-darwin10-gcc-4.2.1
arm-apple-darwin10-llvm-gcc-4.2
gcc
but with the same result. gcc works for both i386 and armv7 so i guess it should work for armv6 aswell
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我使用以下代码仅针对armv6和armv7进行编译。我无法让它在 i386 上工作,我收到 cputype 和 subcputype 错误的错误。显然,cputype 应该是 x86,subcputype 应该是 intel。
无论如何,我使用以下构建脚本来编译arm架构(我最终使用了gcc并且它起作用了,我猜这是配置标志从一开始就是错误的):
构建脚本:
并组合libs脚本:
然后我导入来自 BUILD-FOLDER/dist-uarch 的 .a 文件,它像魅力一样在 xcode 中构建!
i used the following to compile only for armv6 and armv7. I couldn't get it working for i386, i receive errors that the cputype and subcputype are wrong. apparently the cputype is supposed to be x86 and subcputype should be intel.
anyhow i used the following build scripts to compile (i ended up using gcc and it worked, it was the configure flags that were wrong from the beginning i guess) for the arm architectures:
build script:
and combine libs script:
then i import the .a files from BUILD-FOLDER/dist-uarch and it builds in xcode like a charm!