Note that there are some explanatory texts on larger screens.

plurals
  1. POarm-linux-androideabi-gcc is unable to create an executable - compile ffmpeg for android armeabi devices
    text
    copied!<p>I am trying to compile ffmpeg for android armeabi devices. <br /> I am following tutorial by <a href="http://www.roman10.net/how-to-build-ffmpeg-for-android/" rel="noreferrer">roman10.net</a> <br /> His given build script builds ffmpeg for armv7-a devices. I want to build it for armeabi. <br /> </p> <p><strong>My ultimate aim is to run ffmpeg commands on android armeabi and armv7-a devices.</strong></p> <p>So I change the script's CPU part from</p> <pre><code>#arm v7vfpv3 CPU=armv7-a OPTIMIZE_CFLAGS="-mfloat-abi=softfp -mfpu=vfpv3-d16 -marm -march=$CPU " PREFIX=./android/$CPU ADDITIONAL_CONFIGURE_FLAG= build_one </code></pre> <p>to</p> <pre><code>#arm v6 CPU=armv6 OPTIMIZE_CFLAGS="-marm -march=$CPU" PREFIX=./android/$CPU ADDITIONAL_CONFIGURE_FLAG= build_one </code></pre> <p>(I thought changing it to armv6 would build ffmpeg compatible with armeabi devices. m I wrong?)</p> <p><strong>Doubt 1:</strong> <br /> Do I also have to change toolchain?<br /> i.e from <strong>arm-linux-androideabi-4.4.3</strong> to <strong>arm-eabi-4.4.0</strong> ?????</p> <p><strong>Doubt 2:</strong></p> <p>When I try running ./build.sh (without changing toolchain) it gives me following error: <br /></p> <pre><code>/home/chaitanya/android/android-ndk-r5b/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/arm-linux-androideabi-gcc is unable to create an executable file. C compiler test failed. If you think configure made a mistake,.. blaah blahh blaah </code></pre> <p>after that I got lot of warnings saying: <br /> ‘sub_id’ is deprecated and many other function deprecated warnings.</p> <p><strong>platform</strong>: ubuntu 11.10 <br /> <strong>ffmpeg version</strong>: 0.11.2 <br /> <strong>NDK</strong> : android-ndk-r5b</p> <p>Here is my build script:</p> <pre><code>#!/bin/bash ###################################################### # Usage: # put this script in top of FFmpeg source tree # ./build_android # It generates binary for following architectures: # ARMv6 # ARMv6+VFP # ARMv7+VFPv3-d16 (Tegra2) # ARMv7+Neon (Cortex-A8) # Customizing: # 1. Feel free to change ./configure parameters for more features # 2. To adapt other ARM variants # set $CPU and $OPTIMIZE_CFLAGS # call build_one ###################################################### NDK=~/android/android-ndk-r5b PLATFORM=$NDK/platforms/android-8/arch-arm/ PREBUILT=$NDK/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86 function build_one { ./configure --target-os=linux \ --prefix=$PREFIX \ --enable-cross-compile \ --extra-libs="-lgcc" \ --arch=arm \ #--cc=$PREBUILT/bin/arm-linux-androideabi-gcc \ --cross-prefix=$PREBUILT/bin/arm-linux-androideabi- \ #--nm=$PREBUILT/bin/arm-linux-androideabi-nm \ --sysroot=$PLATFORM \ --extra-cflags=" -O3 -fpic -DANDROID -DHAVE_SYS_UIO_H=1 -Dipv6mr_interface=ipv6mr_ifindex -fasm -Wno-psabi -fno-short-enums -fno-strict-aliasing -finline-limit=300 $OPTIMIZE_CFLAGS " \ --disable-shared \ --enable-static \ --extra-ldflags="-Wl,-rpath-link=$PLATFORM/usr/lib -L$PLATFORM/usr/lib -nostdlib -lc -lm -ldl -llog" \ --disable-everything \ --enable-demuxer=mov \ --enable-demuxer=h264 \ --disable-ffplay \ --enable-protocol=file \ --enable-avformat \ --enable-avcodec \ --enable-decoder=rawvideo \ --enable-decoder=mjpeg \ --enable-decoder=h263 \ --enable-decoder=mpeg4 \ --enable-decoder=h264 \ --enable-parser=h264 \ --disable-network \ --enable-zlib \ --disable-avfilter \ --disable-avdevice \ $ADDITIONAL_CONFIGURE_FLAG 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 } #arm v6 CPU=armv6 OPTIMIZE_CFLAGS="-marm -march=$CPU" PREFIX=./android/$CPU ADDITIONAL_CONFIGURE_FLAG= build_one #arm v7vfpv3 #CPU=armv7-a #OPTIMIZE_CFLAGS="-mfloat-abi=softfp -mfpu=vfpv3-d16 -marm -march=$CPU " #PREFIX=./android/$CPU #ADDITIONAL_CONFIGURE_FLAG= #build_one #arm v7vfp #CPU=armv7-a #OPTIMIZE_CFLAGS="-mfloat-abi=softfp -mfpu=vfp -marm -march=$CPU " #PREFIX=./android/$CPU-vfp #ADDITIONAL_CONFIGURE_FLAG= #build_one #arm v7n #CPU=armv7-a #OPTIMIZE_CFLAGS="-mfloat-abi=softfp -mfpu=neon -marm -march=$CPU -mtune=cortex-a8" #PREFIX=./android/$CPU #ADDITIONAL_CONFIGURE_FLAG=--enable-neon #build_one #arm v6+vfp #CPU=armv6 #OPTIMIZE_CFLAGS="-DCMP_HAVE_VFP -mfloat-abi=softfp -mfpu=vfp -marm -march=$CPU" #PREFIX=./android/${CPU}_vfp #ADDITIONAL_CONFIGURE_FLAG= #build_one </code></pre> <p>How do I tackle this problem? what is going wrong?</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload