[FFmpeg-user] ffmpeg4android and missing math functions

Срђан Обућина obucinac at gmail.com
Tue Oct 28 18:54:00 CET 2014


This thread came to my attention today:

http://ffmpeg.org/pipermail/ffmpeg-user/2014-July/022377.html

Although the problem is solved, I want to point to the root cause, which I
reported long time ago, here:

https://code.google.com/p/android/issues/detail?id=38423

Because Android build system is so different than "regular" ./configure;
make; it introduces all kinds of ugly porting problems, which may be
resolved only by all kind of ugly hacks (which You may see in
ffmpeg4android makefiles), especially when You step away from default
architecture.

So, there is libc in NDK which You can download from android homepage,
there is libc in NDK which is embedded in android source code tree, and
there is bionic, Android's version of libc. And the problem is - although
highly compatible, THEY ARE NOT THE SAME. Same may apply for other
libraries. configure/make is not aware of bionic, or any other library
present in Android source code tree, it is aware of libc and libraries
installed in NDK sysroot (which is minimal), and in the end Your software
needs to be linked and run against bionic, and libraries in Android source
code tree. This is a source of horrendous problems when trying to port
something to Android. E.g. in order to enable libx264, the library needs to
be installed in NDK sysroot, so it may be found during configure phase, but
in order to use Android build system to build FFmpeg with libx264 enabled,
libx264 needs to be ported, compiled, and its binaries in
out/target/product/.../wherever folder.

The horror increases when You involve C++.


More information about the ffmpeg-user mailing list