2

I'm trying to compile ffmpeg for Android using this guy script (https://github.com/guardianproject/android-ffmpeg) because it looked like the simplest and the whole NDK is really not my area of expertise.

So let's see what I've done so far:

  • Downloaded and installed a fresh Ubuntu 12.04 LTS from: http://www.ubuntu.com/download/desktop in a VirtualBox. (had some little problems with video but a few updates later in the terminal ubuntu is up and running)
  • installed the Android SDk and downloded/unzipped the NDK into /Documents/ndk
  • I used those commands to install the compiler:

$ sudo apt-get update

$ sudo apt-get upgrade

$ sudo apt-get install build-essential

$ gcc -v

$ make -v

  • then sudo install git (or something like that to install git)
  • then git clone https://github.com/guardianproject/android-ffmpeg.git
  • then copied from the guys page building section
  • cd android-ffmpeg
  • git submodule init
  • git submodule update
  • NDK_BASE=/path/to/android-ndk ./configure_make_everything.sh

it mostly goes well until it says:

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

I'm not sure what it means or where to go from here. from this I did some chmod 777 on the folders to make sure stuff can be execute.

also from this I tried his script but without any luck.

help?

Community
  • 1
  • 1
Budius
  • 39,391
  • 16
  • 102
  • 144

1 Answers1

2

decompose what the script 'config_make_everything' is doing.. and run one step at a time...

https://github.com/guardianproject/android-ffmpeg/blob/master/configure_make_everything.sh

each step will create a file like 'config.log' where you can go to the tail and find more details about what went wrong finding the compiler.

When u start using the NDK, IMO, invest a bit of learn curve time going thru its ./doc directory and making sure that you have it integrated correctly. With NDK install, there are some samples. Build a few from CLI just to make sure that the ENV is correct and that the install is good, and that u have at least some idea of the build as a repeatable process. That will prove that you can do good 'cross compiles' with the build tools. Then you can return to guardian.ffmpeg stuff.

IMO - there is alot going on with an NDK build of this project and getting it all to build without understanding any of the underlying configuration / build stack would require lots of luck.

Robert Rowntree
  • 6,230
  • 2
  • 24
  • 43
  • I'm shutting down for today but I'll certainly give a try on your comments, tips, suggestions. Thanks. – Budius Mar 24 '13 at 22:52
  • Using NDK, you should have a lil understand of what a 'cross-toolchain' is and how it gets it's compiler. Thats in the 'docs' directory. Then, with guardian, you should know at least some of what each step in 'build_all" is doing.. where the input is , where the config is , where the output is... – Robert Rowntree Mar 24 '13 at 23:08