我想为iOS编译ffmpeg。我之前做过几次。但是现在我在使用干净的新Mavericks,并在配置上我总是
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
GNU assembler not found, install gas-preprocessor
If you think configure made a mistake, make sure you are using the latest
version from Git. If the latest version fails, report the problem to the
[email protected] mailing list or IRC #ffmpeg on irc.freenode.net.
Include the log file "config.log" produced by configure as this will help
solving the problem.
我已经安装了当前的Xcode。还酿造。以及
gas-preprocessor.pl
和usr/bin
中的当前usr/local/bin
(https://github.com/yuvi/gas-preprocessor)。在
perl /usr/bin/gas-preprocessor.pl gcc
上,我正在获取Unrecognized input filetype at /usr/bin/gas-preprocessor.pl line 33.
此配置有效:
./configure \
--extra-cflags='-arch arm64 -mios-version-min=7.0 -mthumb' \
--extra-ldflags='-arch arm64 -mios-version-min=7.0' \
--enable-cross-compile \
--arch=arm64 \
--target-os=darwin \
--cc=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang \
--sysroot=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk \
--prefix=arm64 \
--disable-doc \
--disable-shared \
--disable-everything \
--enable-static \
--enable-pic \
--disable-muxers \
--enable-muxer=flv \
--disable-demuxers \
--enable-demuxer=h264 \
--enable-demuxer=pcm_s16le \
--disable-devices \
--disable-parsers \
--enable-parser=h264 \
--disable-encoders \
--enable-encoder=aac \
--disable-decoders \
--enable-decoder=h264 \
--enable-decoder=pcm_s16le \
--disable-protocols \
--enable-protocol=rtmp \
--disable-filters \
--disable-bsfs
此配置在上面抛出错误(找不到GNU汇编器,请安装gas预处理器):
./configure \
--cpu=cortex-a8 \
--extra-cflags='-arch armv7 -mios-version-min=7.0 -mthumb' \
--extra-ldflags='-arch armv7 -mios-version-min=7.0' \
--enable-cross-compile \
--arch=armv7 \
--target-os=darwin \
--cc=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang \
--sysroot=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk \
--prefix=armv7 \
--disable-doc \
--disable-shared \
--disable-everything \
--enable-static \
--enable-pic \
--disable-muxers \
--enable-muxer=flv \
--disable-demuxers \
--enable-demuxer=h264 \
--enable-demuxer=pcm_s16le \
--disable-devices \
--disable-parsers \
--enable-parser=h264 \
--disable-encoders \
--enable-encoder=aac \
--disable-decoders \
--enable-decoder=h264 \
--enable-decoder=pcm_s16le \
--disable-protocols \
--enable-protocol=rtmp \
--disable-filters \
--disable-bsfs
最佳答案
chmod +x gas-preprocessor.pl
完成了!
关于ios - 为iOS和gas-preprocessor.pl编译ffmpeg,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/20749650/