尝试为 iPhone 编译 x264 和 ffmpeg - “文件中缺少所需的架构臂”
我正在尝试编译 x264 以在 iPhone 应用程序中使用。我看到这里有关于如何编译 ffmpeg 以在平台上使用的说明: http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/2009-October/076618.html ,但我似乎找不到任何在 iPhone 上编译 x264 的完整内容。我找到了这个源树: http://gitorious.org/x264-arm 似乎支持ARM平台。
这是我的配置行:
./configure --cross-prefix=/usr/bin/ --host=arm-apple-darwin10 --extra-cflags="-B /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.2.sdk/usr/lib/ -I /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.2.sdk/usr/lib/"
...在 configure
中,我使用气体预处理器脚本(上面的第一个链接)作为我的汇编器:
gas-preprocessor.pl gcc
当我开始编译时,它会分块一段时间,然后它会输出这些警告和一大堆未定义的符号:
ld: warning: option -s is obsolete and being ignored ld: warning: -force_cpusubtype_ALL will become unsupported for ARM architectures ld: warning: in /usr/lib/crt1.o, missing required architecture arm in file ld: warning: in /usr/X11R6/lib/libX11.dylib, missing required architecture arm in file ld: warning: in /usr/lib/libm.dylib, missing required architecture arm in file ld: warning: in /usr/lib/libpthread.dylib, missing required architecture arm in file ld: warning: in /usr/lib/libgcc_s.1.dylib, missing required architecture arm in file ld: warning: in /usr/lib/libSystem.dylib, missing required architecture arm in file Undefined symbols:
我的猜测是问题与“文件中缺少所需的架构臂”警告有关......有什么想法吗?
I'm trying to compile x264 for use in an iPhone application. I see there are instructions on how to compile ffmpeg for use on the platform here: http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/2009-October/076618.html , but I can't seem to find anything this complete for compiling x264 on the iPhone. I've found this source tree: http://gitorious.org/x264-arm that seems to have support for the ARM platform.
Here is my config line:
./configure --cross-prefix=/usr/bin/ --host=arm-apple-darwin10 --extra-cflags="-B /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.2.sdk/usr/lib/ -I /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.2.sdk/usr/lib/"
...and inside configure
I'm using the gas-preprocessor script (first link above) as my assembler:
gas-preprocessor.pl gcc
When I start compiling, it chunks away for a little while, then it spits out these warnings and a huge list of undefined symbols:
ld: warning: option -s is obsolete and being ignored ld: warning: -force_cpusubtype_ALL will become unsupported for ARM architectures ld: warning: in /usr/lib/crt1.o, missing required architecture arm in file ld: warning: in /usr/X11R6/lib/libX11.dylib, missing required architecture arm in file ld: warning: in /usr/lib/libm.dylib, missing required architecture arm in file ld: warning: in /usr/lib/libpthread.dylib, missing required architecture arm in file ld: warning: in /usr/lib/libgcc_s.1.dylib, missing required architecture arm in file ld: warning: in /usr/lib/libSystem.dylib, missing required architecture arm in file Undefined symbols:
My guess would be that the problem has to do with the "missing required architecture arm in file" warning...any ideas?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
检查此网站:http://github.com/gabriel/ffmpeg-iphone-build
文件:build-x264-armv6
你一定会喜欢它!
再见&祝你好运!
Check this site: http://github.com/gabriel/ffmpeg-iphone-build
File: build-x264-armv6
You will love it!
Bye & Good Luck!
许多开发人员在转换到 XCode 4.3 后在编译 FFMpeg 源代码时遇到问题。这主要是因为,与以前的版本不同,XCode4.3 作为捆绑包提供,并且最初不包含命令行工具。
我们尝试构建通用脚本;您可以在此处下载构建 FFMpeg 以及 XCode4.3 的完整环境:https://github.com/melnikov /ffmpeg4iphone_4.3
先决条件:
说明和说明:
顺便说一句,我已经在许多同事的 Mac 上测试了该脚本,其中一些往往不会在 Xcode.app 的 mdfind 中返回任何结果。因此,如果脚本返回“Xcode 未安装”,请随意将 XCODEPATH 变量设置为 Xcode.app 的路径
Many of the developers experience issues compiling FFMpeg sources after transition to XCode 4.3. This is mostly due to the fact, that unlike in previous releases, XCode4.3 comes as a bundle, and doesn't include the command-line tools initially.
We've tried to build the universal script; you can download the complete environment for building FFMpeg along with XCode4.3 here: https://github.com/melnikov/ffmpeg4iphone_4.3
PREREQUISITES:
INSTRUCTIONS and EXPLANATIONS:
BTW, I've tested the script on a number of my colleague's macs, and some of them tend to not return any results in mdfind for Xcode.app. So, if the script will return 'Xcode is not installed', please feel free to set XCODEPATH variable to the path to Xcode.app