chmod +x gas-preprocessor.pl
did it!
Compiling ffmpeg for iOS and gas-preprocessor.pl
-
21-09-2022 - |
Question
I want to compile ffmpeg for iOS. I did it a few times before. But now I'm on clean new Mavericks and on configure I'm always getting
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
ffmpeg-user@ffmpeg.org 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.
I have current Xcode installed. Also brews. And current gas-preprocessor.pl
(https://github.com/yuvi/gas-preprocessor) in usr/bin
and also in usr/local/bin
.
On perl /usr/bin/gas-preprocessor.pl gcc
I'm getting Unrecognized input filetype at /usr/bin/gas-preprocessor.pl line 33.
This config works:
./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
This config throws error above (GNU assembler not found, install gas-preprocessor):
./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
Solution
OTHER TIPS
You must use special version of gas-preprocessor.pl for ffmpeg compilation: git://git.libav.org/gas-preprocessor.git
Version from yuvi (https://github.com/yuvi/gas-preprocessor) is outdated (3 years without changes) and doesn't work with modern ffmpeg versions
Download
gas-preprocessor.pl
from https://github.com/mansr/gas-preprocessorCopy
gas-preprocessor.pl
to/usr/local/bin
Modify the file permissions:
chmod 777 /usr/local/bin/gas-preprocessor.pl
Get gas-preprocessor.pl
from https://github.com/yuvi/gas-preprocessor and make sure it's on your path when you run configure.
E.g., copy gas-preprocessor.pl
to /usr/bin
or run configure with
PATH=$PATH:/path/to/gas-preprocessor configure ...
where /path/to/gas-preprocessor
is the directory where gas-preprocessor.pl
resides.