FFMPEG 2.8.x 交叉编译错误在 Mac OS X 10.10 上
ffmpeg 2.8.x cross compile error on mac os x 10.10
我想在Mac OS X 10.10上交叉编译ffmpeg 2.8.x,但是我遇到了以下错误。
HOSTCC libavcodec/cabac_tablegen.o
In file included from libavcodec/cabac_tablegen.c:25:
In file included from libavcodec/cabac_functions.h:43:
libavcodec/arm/cabac.h:96:25: error: value '24' out of range for constraint 'M'
[byte]"M"(offsetof(CABACContext, bytestream)),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/7.0.2/include/stddef.h:120:24: note:
expanded from macro 'offsetof'
#define offsetof(t, d) __builtin_offsetof(t, d)
^~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
make: *** [libavcodec/cabac_tablegen.o] Error 1
错误显示主机 cc 中出现一些错误,主机 cc clang-700.1.81
$ gcc --version
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 7.0.2 (clang-700.1.81)
Target: x86_64-apple-darwin14.5.0
Thread model: posix
在我将 Xcode 升级到 7.2 之前,它工作正常。
对于 ffmpeg 3.x,没有这样的问题。但是我需要的 ffmpeg 版本是 2.8.x。如何在不将 Xcode 降级到以前版本的情况下修复?
这是主机cc的问题。
我保留了当前版本的Xcode,并在Command_Line_Tools_OS_X_10.10_for_Xcode_6.4
安装了另一个版本的命令行工具。
此命令行工具的 clang 版本是
$ /Library/Developer/CommandLineTools/usr/bin/cc --version
Apple LLVM version 6.1.0 (clang-602.0.53) (based on LLVM 3.6.0svn)
Target: x86_64-apple-darwin14.5.0
Thread model: posix
并在配置 ffmpeg 时将主机 cc 更改为此编译器。
./configure --host-cc=/Library/Developer/CommandLineTools/usr/bin/cc
现在它可以编译而不会出错。
相关文章:
- libprotobuf 检查在 Mac OS 上执行程序时失败
- C++读取用户输入而不按回车键(Mac OS X),与Turbo Pascal中的读取键相同
- 如何在 MAC OS c/c++ 中阻止 USB 存储设备
- Mac os x app bundle 在下载并运行时崩溃,但在终端或更改 Info.plist 时运行良好
- const 如何防止写入特定内存 [Clang, Mac OS]
- 如何在 Mac OS 上安装 boost-mpi 及其对 clang 的依赖关系?
- 在 Mac OS 中将 QT 与 CMAKE 集成
- 从我的2d数组中的一列返回的字符串值被压缩为一个字符串(在Mac os上打开Windows txt文件)
- VK_ERROR_INCOMPATIBLE_DRIVER with Mac OS and Vulkan MoltenVK
- 我无法在C++(Clion,Mac OS)中运行Gurobi
- 如何在Mac OS的发布版本中包含Qt库?
- 如何将C++项目从 32 位迁移到 64 位以支持 MAC OS 10.14(莫哈韦)?
- 在 Mac OS x 中制造期间出现错误未知类型名称"constexpr"
- 无法在 Mac OS X 上链接静态资源库
- 在Mac OS X Mountain Lion(或更高版本)和Linux上使用X11/Xlib.h
- Mac OS c++ Link OpenCV and libtiff
- 使用 c++ 在 Mac OS X 上启动"new email"窗口
- 在 Mac OS 上运行 x11
- 为什么 Mac OS 指定的 TCP 端口不侦听?
- Mac OS X:应用程序可以创建日志文件