【问题标题】:Building FFMpeg Error in IOS6.1 unable to create an executable file在IOS6.1中构建FFMpeg错误无法创建可执行文件
【发布时间】:2013-07-03 16:16:27
【问题描述】:

当我尝试像这样运行 ./configure 时,我正在尝试在 iOS6.1 (armv7) 上构建 ffmpeg:

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

我收到以下错误:

/applications/xcode.app/contents/Developer/usr/bin/gcc 无法 创建一个可执行文件。 C 编译器测试失败。

谁能提供iOS6.1的正确参数?

更新命令:

./configure --disable-doc --disable-ffmpeg --disable-ffplay --disable-ffserver --enable-cross-compile --arch=arm --target-os=darwin --cc=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/llvm -gcc-4.2/bin/arm-apple-darwin10-llvm-gcc-4.2 --as='gas-preprocessor/gas-preprocessor.pl /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/llvm-gcc-4.2/bin/arm-apple-darwin10-llvm -gcc-4.2' --sysroot=/applications/xcode.app/contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk --cpu=cortex-a8 --extra-cflags='-arch armv7' --extra-ldflags='-arch armv7 -isysroot /applications/xcode.app/contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk' --enable-pic

更新命令出错:

/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/llvm-gcc-4.2/bin/arm-apple-darwin10-llvm-gcc-4.2 无法创建可执行文件。 C 编译器测试失败。

如果您认为配置出错,请确保您使用的是最新的 来自 Git 的版本。如果最新版本失败,请将问题报告给 ffmpeg-user@ffmpeg.org 邮件列表或 irc.freenode.net 上的 IRC #ffmpeg。 包括由 configure 生成的日志文件“config.log”,因为这将有所帮助 解决问题。

【问题讨论】:

  • 之前您的 sysroot 和 isysroot 指向 iPhoneOS5.1。现在您已将它们更改为 iPhoneOS6.1(这是正确的路径)再次尝试使用 --cc=/applications/xcode.app/contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc 而不是 arm-apple-darwin10...

标签: iphone objective-c ffmpeg


【解决方案1】:

你正在使用...

--cc=/applications/xcode.app/contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc

armv7 错了,你应该这样做......

--cc=/applications/xcode.app/contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/arm-apple-darwin10-gcc-4.2.1

将上面的内容更改为您拥有该bin 文件夹的任何arm-apple-darwin10-gcc-x.x.x 版本。

同样,将气体预处理器的目标编译器更改为相同。

--as='gas-preprocessor/gas-preprocessor.pl /applications/xcode.app/contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/arm-apple-darwin10-gcc-4.2.1'

另外,不要在您的--extra-cflags 中添加-arch armv7,您不需要它,您可能会收到错误:unrecognized command line option "-arch"

【讨论】:

  • 感谢您的回复。我已经改变了你提到的参数。但我仍然遇到同样的错误。请检查我在问题中的新命令(更新命令:部分)你能指导一下有什么问题吗?
  • 确保您实际上是在/applications/xcode.app/contents/...。例如我的编译器在/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/arm-apple-darwin10-gcc-4.2.1。你应该进入Finder然后执行shift+cmd+G,复制/applications/xcode.app/contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin//Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/看看哪个给出了积极的结果然后告诉我。
  • @ cube - 两条路径都在“转到文件夹”中工作。在这里查看我的屏幕截图:picpaste.com/Screen_Shot_2013-07-10_at_8.50.47_AM-FLhOwODp.png 这里引用了可执行文件的快捷方式链接。原始 arm-apple-darwin10-llvm-gcc-4.2 路径在这里:/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/llvm-gcc-4.2/bin/ 无论如何我都试过了,但它仍然无法正常工作。在此处查看我的屏幕截图:picpaste.com/Screen_Shot_2013-07-10_at_9.03.38_AM-pa3sXrx7.png 和此处的代码pastebin.com/7LbzYjSM。请检查一下。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2012-09-13
  • 1970-01-01
  • 2021-04-11
  • 1970-01-01
  • 1970-01-01
  • 2013-09-24
  • 2012-05-08
相关资源
最近更新 更多