arm-linux-androideabi-gcc is unable to create an executable - compile ffmpeg for android armeabi devices

"arm-linux-androideabi-pkg-config not found"
ffmpeg android arm64
armv7a linux androideabi24 clang is unable to create an executable file
android toolchain
c compiler test failed
android ndk download

I am trying to compile ffmpeg for android armeabi devices. I am following tutorial by roman10.net His given build script builds ffmpeg for armv7-a devices. I want to build it for armeabi.

My ultimate aim is to run ffmpeg commands on android armeabi and armv7-a devices.

So I change the script's CPU part from

#arm v7vfpv3
CPU=armv7-a
OPTIMIZE_CFLAGS="-mfloat-abi=softfp -mfpu=vfpv3-d16 -marm -march=$CPU "
PREFIX=./android/$CPU
ADDITIONAL_CONFIGURE_FLAG=
build_one 

to

#arm v6
CPU=armv6
OPTIMIZE_CFLAGS="-marm -march=$CPU"
PREFIX=./android/$CPU 
ADDITIONAL_CONFIGURE_FLAG=
build_one

(I thought changing it to armv6 would build ffmpeg compatible with armeabi devices. m I wrong?)

Doubt 1: Do I also have to change toolchain? i.e from arm-linux-androideabi-4.4.3 to arm-eabi-4.4.0 ?????

Doubt 2:

When I try running ./build.sh (without changing toolchain) it gives me following error:

/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

after that I got lot of warnings saying: ‘sub_id’ is deprecated and many other function deprecated warnings.

platform: ubuntu 11.10 ffmpeg version: 0.11.2 NDK : android-ndk-r5b

Here is my build script:

#!/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

How do I tackle this problem? what is going wrong?

I'm not sure if this is what you are looking but I created a script in order to build FFmpeg 0.11.1 for Android. I modified the scripts provided with older Bambuser FFmpeg builds in order to get them working with 0.11.1. I'm currently using this script to build FFmpeg in my own application so I know the build works. The script located at http://servestream.sourceforge.net/build-ffmpeg.sh. I'm using android-ndk-r8b and Ubuntu 12.04 (x64) to do the building. In order to use the script do the following:

1.) Download the script 2.) Open the script and modify the PACKAGE variable to match application's package 3.) Make it executable: chmod +x build-ffmpeg.sh 4.) Set the NDK variable used by the script, for example: export NDK=/home/user/android-ndk-r8b 5.) Run the script: ./build-ffmpeg.sh

The compiled binaries will be located in the newly created "final-builds" folder in the current working directory. (Note: the script builds binaries for armeabi, armeabi-v7a and x86 architectures)

I hope this answers your question.

UPDATE:

If script isn't found, http://sourceforge.net/p/servestream/code/HEAD/tree/ffmpeg/scripts/arm-build.sh

Build FFmpeg for Android without GCC � Issue #562 � bytedeco , is unable to create an executable file. arm-linux-androideabi/bin/ld: error: cannot find -lgnustl_static collect2: error: ld returned 1 exit status C compiler test failed. other libs Build FFmpeg for Android without GCC on May 19, 2018 I can't get it work on my KitKat device (19 API, armeabi-v7a ) - failed:� ddpatel2606. Did you fix the issue? me too getting the same issue while build ffmpeg for Android I am using Mac OSX 10.9.5,NDK r10d and ffmpeg 2.6.1.If you solve your issue please post what have you done.

I finally found the problem with my setup when facing this same issue... Looking at the arm-build.sh script, I started following the script. Notice the "TOOLCHAIN=..." path.

Originally the path was: TOOLCHAIN=echo $NDK/toolchains/arm-linux-androideabi-4.6/prebuilt/*-x86

When I went to verify this path exists, I noticed that it did not. I think the reason is that I have a 64-bit build.

My path is actually: .../toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86_64

What I ended up doing was copying the folder, and renaming it to "linux-x86" and now all is compiling.

Hope this helps someone!

FFMPEG extension -arm-linux-androideabi-clang is unable to create , configure --libdir=android-libs/armeabi-v7a --arch=arm FFMPEG extension - arm-linux-androideabi-clang is unable to create an executable file #5852. Closed While fetch and build FFmpeg got "C compiler test failed" error� FFMPEG build issue arm-linux-androideabi-gcc is unable to create an executable file. C compiler test failed. Hi Team, I have tried to build FFMPEG for android using ndk-r12b and ffmpeg-3.1.2, but I am

In my case, I was trying to build exoplayer's ffmpeg extension. It's not able to build with current versions of the NDK (gcc was removed in NDK 18b), so you have to revert to NDK 15c.

See here: https://github.com/google/ExoPlayer/issues/4940

Android-NDK building using the Bambuser source, build/ffmpeg FLAGS="--target-os=linux --cross-prefix=arm-linux-androideabi- choosing neon vs non-neon requires # renamed files ABI="armeabi-v7a" ; WARNING: Unknown C compiler arm-linux-androideabi-gcc, unable to select optimal I got a node executable and some object files and .a files, I need to build as .so� edit the build_ffmpeg_for_android.sh file, remove lines:--enable-encoder=libx264 --enable-libx264 and try. x264 is used for encoding. if you want to compile it, try. change #++ build x264 ++# if false; then if [ ! -d x264 ]; then. if false; then -> if true; then

I got a similar error (C compiler test failed) while trying to build ffmpeg using r8d ndk version and also r8b.

The problem I later found out was that "Extract here" option on latest ubuntu seems to have some bug. It does not extract everything. So, using 'tar -jxf ' extracts properly and you will see more executables in the bin folder.

You could check this out for reference. http://code.google.com/p/android/issues/detail?id=41187

Unable to port FFmpeg C library into android, arm-linux-androideabi-gcc is unable to create an executable - compile ffmpeg for android armeabi devices. I am trying to compile ffmpeg for android armeabi� Dismiss Join GitHub today. GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.

ExoPlayer播放器播放MP2音频格式视频无声音加入Ffmpeg软解码功能, build.sh:行24: --libdir=android-libs/armeabi-v7a: No such file or directory. build. sh:行27: --cross-prefix=/toolchains/arm-linux-androideabi-4.9/prebuilt//bin/arm- windows-x86_64/bin/arm-linux-androideabi-gcc is unable to create an executable file. NDK binaries will not be comptible with devices older than android-14. FFMPEG extension -arm-linux-androideabi-clang is unable to create an executable file #5852. FFMPEG extension -arm-linux-androideabi-clang is unable to create an executable file. #5852.

Using the NDK with other build systems, If you're unable to upgrade, see the Standalone Toolchain guide. The NDK contains official support for ndk-build and CMake. Note: For 32-bit ARM, the compiler is prefixed with armv7a-linux-androideabi , but the binutils Many projects' build scripts will expect GCC-style cross compilers where each� 13 arm-linux-androideabi-gcc is unable to create an executable - compile ffmpeg for android armeabi devices Sep 30 '12 13 Android , Java - Rendering a video using bitmap frames to reverse a video (Xuggler) Aug 12 '12

Building FFmpeg 4.0 for Android with Clang, In this article, I will concentrate on the specifics of building FFmpeg with Clang. it's highly advised to migrate to Clang (since GCC is not maintained). Contrary to GCC, Clang has only one binary, which is used to build Let's start from “ armeabi-v7a”: "armeabi-v7a") TARGET="arm-linux-androideabi" Arm-linux-androideabi-gcc не может создать исполняемый файл – компиляция ffmpeg для устройств android armeabi Я пытаюсь скомпилировать ffmpeg для устройств android arm eabi.

Comments
  • I tried this and still get "arm-linux-androideabi-gcc unable to create an executable file" I am running Ubuntu 12.10 64 bit, ffmpeg-1.0 and using your script above. Please help
  • I'm using 12.04 (64 bit) and NDK version r8b. That error usually occurs when you are using a different NDK version. If that's not the case please respond and I will try to help you sort out the issue.
  • Sorry Vikas, these scripts will only work with Linux. Compiling under Windows is a whole other battle that I probably won't pursue.
  • I managed to get "final-builds" folder and inside that there are three folders called , armeabi,armeabi-v7a and x86 . inside armeabi-v7a & armeabi folder there are another folders available. but inside x86 only the configuration.txt and info.txt files avaiable , i have a bad feeling i have done something wrong.
  • for arm v7 it's not a problem, what about arm v8 and x84_64?
  • Mine was /darwin-x86_64 on Mac OS X