2016-04-22 20 views
0

Mac OS X 10.10でffmpeg 2.8.xをクロスコンパイルしたいが、次のエラーが出る。ffmpeg 2.8.x Mac OS X 10.10でクロスコンパイルエラー

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でいくつかのエラーを示して、私は7.2にXcodeのをアップグレードする前に、ホスト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 

で、それがうまく働きました。

ffmpeg 3.xでは、このような問題はありません。しかし私が必要とするffmpegのバージョンは2.8.xです。 Xcodeを以前のバージョンにダウングレードしないで修正する方法はありますか?

答えて

1

これはホストccの問題でした。

私は現在のバージョンXcodeを維持し、別のバージョンのコマンドラインツールCommand_Line_Tools_OS_X_10.10_for_Xcode_6.4をインストールしました。

このコマンドラインツールのための打ち鳴らすのバージョンが

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

されており、このコンパイラのconfigureのffmpegにホストCCを変更します。

./configure --host-cc=/Library/Developer/CommandLineTools/usr/bin/cc 

エラーなしでコンパイルできます。