Bambuser ffmpeg - "arm-linux-androideabi-gcc is unable to create an executable file."
Asked Answered
M

3

7

I know this may be possible duplicate of some questions. but answers for those threads are not helping me.

I am trying to compile ffmpeg library for android using Bambuser's ffmpeg.
I downloaded Archive for client versions 1.3.7 to 1.6.0. from bambuser.

I followed instruction given in REAME.
While running ./build.sh i came across following error

arm-linux-androideabi-gcc is unable to create an executable file.
C compiler test failed.

If you think configure made a mistake, make sure you are using the latest
version from SVN.  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.

Here are last few lines of config.log of ffmpeg

mktemp is /bin/mktemp
check_ld
check_cc
BEGIN /tmp/ffconf.qflVj27Q.c
    1   int main(void){ return 0; }
END /tmp/ffconf.qflVj27Q.c
arm-linux-androideabi-gcc --sysroot=/home/chaitanya/android/android-ndk-r5b/platforms/android-8/arch-arm -c -o /tmp/ffconf.gc6um0Ki.o /tmp/ffconf.qflVj27Q.c
arm-linux-androideabi-gcc: error trying to exec 'cc1': execvp: No such file or directory
C compiler test failed.

in tmp i do not find any relative folder or file as per config.log says "ffconf.qflVj27Q.c".

I am doing this on
1. Ubuntu 11.10
2. OpenJDK 6
3. android-ndk-r5b

NOte:
I only have API-10 Installed in eclipse. (if it matters :D)

What could be the solution for this?

Mahoney answered 21/9, 2012 at 6:52 Comment(3)
Found a solution yet?Lema
facing same problem in windowsKwangtung
@AZone Did you find solution in windows?Huberman
L
11

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!

Lafollette answered 25/7, 2013 at 17:17 Comment(1)
Is it possible to edit build.sh file (change *-x86 to *-x86_64) instead?Huberman
M
1

I also faced this problem this morning and tried solutions suggested for similar questions here. But none of the solutions worked for me.

But finally i solved it. In my case, it was problem with Android NDK package. My system is 64bit ubuntu and my ndk pkg was also linux-64bit. But when i used the ndk-linux-x86, this problem was solved. I hope that this might help someone else.

Maud answered 14/4, 2014 at 13:6 Comment(0)
I
0

I meet similar problem when cross compile FFmpeg.

    --extra-cflags="-arm -std=gnu99 -fPIC" \
    --extra-ldflags="-arm" \

switched to

    --extra-cflags="-std=gnu99 -fPIC" \

solves my problem.

Insurmountable answered 3/11, 2023 at 8:1 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.