ffmpeg的不会iOS5.1运行./configure [英] ffmpeg won't ./configure in iOS5.1

查看:199
本文介绍了ffmpeg的不会iOS5.1运行./configure的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想对iOS5.1(ARMv7的),建立的ffmpeg当我试图像这样运行./configure:

  ./配置--disable-doc的--disable-ffmpeg的--disable-ffplay --disable-ffserver的
   --enable-交叉编译--arch =手臂--target-OS =达尔文
   --CC = /应用/ X code.app /内容/开发人员的/ usr / bin中/海湾合作委员会
   --as ='气preprocessor ​​/天然气preprocessor.pl /applications/x$c$c.app/contents/Developer/usr/bin/gcc
   --sysroot=/applications/x$c$c.app/contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk
   --cpu = Cortex-A8的--extra-CFLAGS =' - 拱的ARMv7
   --extra-LDFLAGS =' - 拱的ARMv7 -isysroot /applications/x$c$c.app/contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk'
   --enable-PIC

我收到以下错误:

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


  

如果你想配置犯了一个错误,请确保您使用的是最新
  从版本SVN。如果最新版本的失败,将问题报告给
  ffmpeg-user@mplayerhq.hu邮件列表,或在irc.freenode.net IRC #ffmpeg。
  包括由配置所产生的这个日志文件config.err将帮助
  解决问题


可能有人请在iOS5.1提供正确的参数?

在此先感谢


解决方案

的说明已经改变,因为不再有在x code SDK中的 GCC

您需要做的是指定CC是使用xcrun的的iPhoneOS编译器,所以在这里我们previously只是把路径 GCC ,我们现在打算把以 xcrun 引用为

我从网上下载的git最新的ffmpeg,确信我有气preprocess.pl的道路上的一个副本,然后改变了 - CC = 行:

   -  CC ='xcrun -sdk的iPhoneOS铛-mios版本分钟= 5.1'

(假设您正在构建,仍然打靶的ios 5.1 - 如果你打靶更新,那么你的值更改为新版本我指定的7.0矿井,但我还使用了iOS 8.4 SDK,所以配置行看起来像:

  ./配置--disable-doc的--disable-ffmpeg的--disable-ffplay --disable-ffserver的\\
 --enable-交叉编译--arch =手臂--target-OS =达尔文\\
 --CC ='xcrun -sdk的iPhoneOS铛-mios版本分钟= 7.0'\\
 --sysroot=/applications/x$c$c.app/contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.4.sdk \\
 --cpu = Cortex-A8的--extra-CFLAGS =' - 拱的ARMv7'\\
 --extra-LDFLAGS =' - 拱的ARMv7 -isysroot /applications/x$c$c.app/contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.4.sdk' \\
 --enable-PIC

这从ios8.4 SDK构建的ffmpeg。这些说明应该继续工作;您只需要更换相应的 7.0 / 为新的SDK 8.4 值。

OLD答案

这是当你尝试使用编译器的版本的MacOS编译的iOS code会发生什么。

您需要使用指定的GCC的iPhoneOS版本:

  ./配置--disable-doc的--disable-ffmpeg的--disable-ffplay --disable-ffserver的
   --enable-交叉编译--arch =手臂--target-OS =达尔文
   --CC = /应用/ X code.app /内容/开发/平台/ iPhoneOS.platform /开发人员的/ usr / bin中/海湾合作委员会
   --as ='气preprocessor ​​/天然气preprocessor.pl /applications/x$c$c.app/contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc
   --sysroot=/applications/x$c$c.app/contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk
   --cpu = Cortex-A8的--extra-CFLAGS =' - 拱的ARMv7
   --extra-LDFLAGS =' - 拱的ARMv7
   -isysroot /applications/x$c$c.app/contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk'
   --enable-PIC

尝试调试的问题配置是看它是的config.log 文件时

第一步作为运行的一部分生成。

I am trying to build ffmpeg on iOS5.1 (armv7), when I try to run ./configure like this:

./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

I get the following error:

/applications/xcode.app/contents/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. If the latest version fails, report the problem to the ffmpeg-user@mplayerhq.hu mailing list or IRC #ffmpeg on irc.freenode.net. Include the log file "config.err" produced by configure as this will help solving the problem.

Could somebody please provide the correct parameters in iOS5.1?

Thanks in advance

解决方案

the instructions have changed since there is no longer a gcc in the xcode SDK.

What you need to do is specify that cc is the iphoneos compiler using xcrun, so where we previously just put the path to gcc, we're now going to put a reference to xcrun for clang.

I downloaded the latest ffmpeg from git, made sure I had a copy of gas-preprocess.pl on the path, and then changed the --cc= line to read:

--cc='xcrun -sdk iphoneos clang -mios-version-min=5.1'

(this assumes you're building and still targetting ios 5.1 - if you're targetting newer, then you change the value to the newer release. I specified 7.0 for mine, but I'm also using the iOS 8.4 SDK, so the configure line looks like:

./configure --disable-doc --disable-ffmpeg --disable-ffplay --disable-ffserver \
 --enable-cross-compile --arch=arm --target-os=darwin \
 --cc='xcrun -sdk iphoneos clang -mios-version-min=7.0' \
 --sysroot=/applications/xcode.app/contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.4.sdk \
 --cpu=cortex-a8 --extra-cflags='-arch armv7' \
 --extra-ldflags='-arch armv7 -isysroot /applications/xcode.app/contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.4.sdk' \
 --enable-pic

which builds ffmpeg from the ios8.4 SDK. These instructions should keep working; you just need to replace the appropriate 7.0/8.4 values for the newer SDKs.

OLD ANSWER

That's what happens when you try to compile iOS code using the MacOS version of the compiler.

You need to specify the iPhoneOS version of gcc using:

./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/bin/gcc
   --as='gas-preprocessor/gas-preprocessor.pl /applications/xcode.app/contents/Developer/Platforms/iPhoneOS.platform/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

The first step when trying to debug problems with configure is to look at the config.log file which is generated as part of the run.

这篇关于ffmpeg的不会iOS5.1运行./configure的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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