所以我创建了 ffmpeg 配置文件,使它成为纯 C (平台独立,但只是理论上)
所以我的配置很简单(0.6.1,0.6.3 测试):
./configure --disable-doc --disable-ffplay --disable-ffprobe --disable-ffserver --disable-avdevice --disable-avfilter --disable-pthreads --disable-everything --enable-muxer=flv --enable-encoder=flv --enable-encoder=h263 --disable-mmx --disable-shared --prefix=bin/ --disable-protocols --disable-network --disable-optimizations --disable-debug --disable-asm --disable-stripping
在 Linux 上编译它会解析 4 个库,总大小为 1 mb。
但我需要使用自定义编译器编译 ffmpeg(开源 gcc 模拟称为Adobe Alchemy,让我们将 C/c++ 编译成 Flash)
在标准 Make 期间,它几乎在每个文件上都给了我错误:
Array @ARGV missing the @ in argument 1 of shift() at /home/rupert/Downloads/alchemy-ubuntu-v0.5a/achacks/gcc line 218.
cc1: error: unrecognized command line option "-Wtype-limits"
cc1: error: unrecognized command line option "-fno-signed-zeros"
那么我该怎么办 - 如何通过炼金术编译 ffmpeg(至少是它的最小部分)?
更新 如果我们手动修复这些错误(configure.mak 中有 2 个,alchemy gcc 中有 1 个),我们会得到一个非常混乱且冗长的输出,例如:
> $ make -w install
make: Entering directory `/home/rupert/Downloads/ffmpeg-0.6.1'
AR libavformat/libavformat.a
llvm-ld: error opening 'avformat/libavformat.l.bc' for writing!
llvm-ranlib: Archive file does not exist
INSTALL libavformat/libavformat.a
install: cannot stat `libavformat/libavformat.a': No such file or directory
llvm-ranlib: Archive file does not exist
AR libavcodec/libavcodec.a
llvm-ld: error opening 'avcodec/libavcodec.l.bc' for writing!
llvm-ranlib: Archive file does not exist
INSTALL libavcodec/libavcodec.a
install: cannot stat `libavcodec/libavcodec.a': No such file or directory
llvm-ranlib: Archive file does not exist
AR libswscale/libswscale.a
llvm-ld: error opening 'swscale/libswscale.l.bc' for writing!
llvm-ranlib: Archive file does not exist
INSTALL libswscale/libswscale.a
install: cannot stat `libswscale/libswscale.a': No such file or directory
llvm-ranlib: Archive file does not exist
AR libavutil/libavutil.a
llvm-ld: error opening 'avutil/libavutil.l.bc' for writing!
llvm-ranlib: Archive file does not exist
INSTALL libavutil/libavutil.a
install: cannot stat `libavutil/libavutil.a': No such file or directory
llvm-ranlib: Archive file does not exist
INSTALL libavformat/avformat.h
INSTALL libavformat/avio.h
INSTALL libavformat/libavformat.pc
INSTALL libavcodec/avcodec.h
INSTALL libavcodec/avfft.h
INSTALL libavcodec/dxva2.h
INSTALL libavcodec/opt.h
INSTALL libavcodec/vaapi.h
INSTALL libavcodec/vdpau.h
INSTALL libavcodec/xvmc.h
INSTALL libavcodec/libavcodec.pc
INSTALL libswscale/swscale.h
INSTALL libswscale/libswscale.pc
INSTALL libavutil/adler32.h
INSTALL libavutil/attributes.h
INSTALL libavutil/avstring.h
INSTALL libavutil/avutil.h
INSTALL libavutil/base64.h
INSTALL libavutil/common.h
INSTALL libavutil/crc.h
INSTALL libavutil/error.h
INSTALL libavutil/fifo.h
INSTALL libavutil/intfloat_readwrite.h
INSTALL libavutil/log.h
INSTALL libavutil/lzo.h
INSTALL libavutil/mathematics.h
INSTALL libavutil/md5.h
INSTALL libavutil/mem.h
INSTALL libavutil/pixdesc.h
INSTALL libavutil/pixfmt.h
INSTALL libavutil/rational.h
INSTALL libavutil/sha1.h
INSTALL libavutil/avconfig.h
INSTALL libavutil/libavutil.pc
LD ffmpeg_g
WARNING: While resolving call to function 'main' arguments were dropped!
Cannot yet select: 0x8e707e8: i32 = ConstantPool < i64 6881500230622117888> 0
llc[0x86c7dec]
make: *** [ffmpeg_g] Error 6
make: Leaving directory `/home/rupert/Downloads/ffmpeg-0.6.1'