ffmpegをMacでコンパイルしたいけど出来なかった備忘録
最新のffmpegをMacでコンパイルしたいと思ってやってみたところ。ハマってますorz。結果的に途中で諦めましたが、その備忘録。
1)MacPortsを使って必要なコーデック等をいれる。
2)1で足したコーデックなどのヘッダファイルを/usr/includeにシンボリックリンクを張る
ln -s /opt/local/include/**/*.h ./
※**/*.hは適当に
3)ffmpegのconfigureを書き換える(libのパスを指定)
# toolchain - cc="gcc" + cc="gcc -L/opt/local/lib" ar="ar"
4)configureをかける。
./configure --enable-libmp3lame --enable-libfaac --enable-libfaad --disable-ffplay --enable-small --enable-memalign-hack --enable-gpl --enable-libxvid --enable-liba52 --disable-vhook --enable-pthreads --enable-libx264
--enable-libamr-nbも入れたかったけどportに何故か無かった。
configureでコケてるようであればconfig.errをチェック、大概はlibが無いとかヘッダファイルが無いと文句を言って来てるはず。
5)makeをする。
今回はここでハマってる。
/Users/koyanagi3106/Download/ffmpeg/src/ffmpeg-checkout-2007-11-24/libavutil/bswap.h:43: warning: ‘bswap_16’ defined but not used gcc -L/opt/local/lib -I"/Users/koyanagi3106/Download/ffmpeg/src/ffmpeg-checkout-2007-11-24"/libswscale -I"/Users/koyanagi3106/Download/ffmpeg/src/ffmpeg-checkout-2007-11-24"/libavcodec -DHAVE_AV_CONFIG_H -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_ISOC9X_SOURCE -I"/Users/koyanagi3106/Download/ffmpeg/src/ffmpeg-checkout-2007-11-24" -I"/Users/koyanagi3106/Download/ffmpeg/src/ffmpeg-checkout-2007-11-24" -I"/Users/koyanagi3106/Download/ffmpeg/src/ffmpeg-checkout-2007-11-24"/libavutil -no-cpp-precomp -pipe -force_cpusubtype_ALL -Wno-sign-compare -fomit-frame-pointer -g -Wdeclaration-after-statement -Wall -Wno-switch -Wdisabled-optimization -Wpointer-arith -Wredundant-decls -Wno-pointer-sign -Os -c -o i386/dsputil_mmx.o i386/dsputil_mmx.c i386/dsputil_mmx.c: In function ‘gmc_mmx’: i386/dsputil_mmx.c:2667: warning: suggest parentheses around arithmetic in operand of | i386/dsputil_mmx.c:2667: warning: suggest parentheses around arithmetic in operand of | i386/dsputil_mmx.c:2668: warning: suggest parentheses around arithmetic in operand of | i386/dsputil_mmx.c:2668: warning: suggest parentheses around arithmetic in operand of | i386/dsputil_mmx.c:2668: warning: suggest parentheses around arithmetic in operand of | i386/dsputil_mmx.c: In function ‘dsputil_init_mmx’: i386/dsputil_mmx.c:3758: warning: assignment from incompatible pointer type i386/dsputil_mmx.c:3766: warning: assignment from incompatible pointer type i386/dsputil_mmx.c: In function ‘flac_compute_autocorr_sse2’: i386/dsputil_mmx.c:3008: error: can't find a register in class ‘GENERAL_REGS’ while reloading ‘asm’ i386/dsputil_mmx.c:3010: error: can't find a register in class ‘GENERAL_REGS’ while reloading ‘asm’ i386/dsputil_mmx.c: At top level: /Users/koyanagi3106/Download/ffmpeg/src/ffmpeg-checkout-2007-11-24/libavutil/bswap.h:43: warning: ‘bswap_16’ defined but not used /Users/koyanagi3106/Download/ffmpeg/src/ffmpeg-checkout-2007-11-24/libavcodec/bitstream.h:879: warning: ‘get_vlc2’ defined but not used {standard input}:22284:non-relocatable subtraction expression, "_put_vc1_mspel_mc00_mmx" minus "L00000000068$pb" {standard input}:22284:symbol: "_put_vc1_mspel_mc00_mmx" can't be undefined in a subtraction expression make[1]: *** [i386/dsputil_mmx.o] Error 1 make: *** [lib] Error 2