[FFmpeg-user] Building ffmpeg for Android on Windows through MinGW problem

Harish Pulimi pulimiharish at gmail.com
Wed May 23 11:05:28 CEST 2012


Hi

Can you please help me in building ffmpeg for Android on Windows MiNGW. I
am facing the below problem:

AR libavcodec/libavcodec.a
LD ffmpeg_g.exe
LD ffplay_g.exe
LD ffprobe_g.exe
INSTALL libavcodec/libavcodec.a
CP ffmpeg.exe
STRIP ffmpeg.exe
CP ffprobe.exe
STRIP ffprobe.exe
CP ffplay.exe
STRIP ffplay.exe
INSTALL install-progs-yes
INSTALL ffmpeg.exe
INSTALL ffplay.exe
INSTALL ffprobe.exe
d:\android-ndk-r8\toolchains\arm-linux-androideabi-4.4.3\prebuilt\windows\bin\ar
m-linux-androideabi-ld.exe: cannot open output file
./android/armv7-a/libffmpeg.
so: No such file or directory

libavcodec/tscc.c:97:24: warning: assignment discards qualifiers from
pointer ta
rget type
./libavcodec/avcodec.h:40:0: fatal error: when writing output to : Invalid
argum
ent
compilation terminated.
libavcodec/vc1dsp.c: In function 'ff_vc1dsp_init':

This is my build script:
NDK=/d/android-ndk-r8
PLATFORM=$NDK/platforms/android-9/arch-arm/
PREBUILT=$NDK/toolchains/arm-linux-androideabi-4.4.3/prebuilt/windows
function build_one_r6
{
./configure \
--disable-shared \
--enable-static \
--enable-gpl \
--enable-version3 \
--enable-nonfree \
--disable-doc \
--disable-ffmpeg \
--disable-ffplay \
--disable-ffprobe \
--disable-ffserver \
--disable-avdevice \
--disable-avfilter \
--disable-postproc \
--enable-small \
--cross-prefix=$PREBUILT/bin/arm-linux-androideabi- \
--enable-cross-compile \
--target-os=linux \
--extra-cflags="-I$PLATFORM/usr/include" \
--extra-ldflags="-L$PLATFORM/usr/lib -nostdlib" \
--arch=arm \
--disable-symver \
--disable-debug \
--disable-stripping \
$ADDITIONAL_CONFIGURE_FLAG
sed -i 's/HAVE_LRINT 0/HAVE_LRINT 1/g' config.h
sed -i 's/HAVE_LRINTF 0/HAVE_LRINTF 1/g' config.h
sed -i 's/HAVE_ROUND 0/HAVE_ROUND 1/g' config.h
sed -i 's/HAVE_ROUNDF 0/HAVE_ROUNDF 1/g' config.h
sed -i 's/HAVE_TRUNC 0/HAVE_TRUNC 1/g' config.h
sed -i 's/HAVE_TRUNCF 0/HAVE_TRUNCF 1/g' config.h
make clean
make -j4 install
$PREBUILT/bin/arm-linux-androideabi-ar d libavcodec/libavcodec.a inverse.o
$PREBUILT/bin/arm-linux-androideabi-ld -rpath-link=$PLATFORM/usr/lib
-L$PLATFORM/usr/lib -soname libffmpeg.so -shared -nostdlib -z,noexecstack
-Bsymbolic --whole-archive --no-undefined -o $PREFIX/libffmpeg.so
libavcodec/libavcodec.a libavformat/libavformat.a libavutil/libavutil.a
libswscale/libswscale.a -lc -lm -lz -ldl -llog --warn-once
--dynamic-linker=/system/bin/linker
$PREBUILT/lib/gcc/arm-linux-androideabi/4.4.3/libgcc.a
}
CPU=armv7-a
OPTIMIZE_CFLAGS="-mfloat-abi=softfp -mfpu=vfpv3-d16 -marm -march=$CPU "
PREFIX=./android/$CPU
ADDITIONAL_CONFIGURE_FLAG=

Any idea what I'm missing here? Please note that I am able to build ffmpeg
for Windows desktop successfully so I assume the setup is correct.


More information about the ffmpeg-user mailing list