Issue
I was trying to compile FFMPEG library under ubuntu for android with including all possible codecs. i followed this tutorial http://www.roman10.net/2013/08/18/how-to-build-ffmpeg-with-ndk-r9/. but when i execute ./build_android.sh it gives me this Error:
root@AK-74:/home/rango/Desktop/android-ndk-r10e/sources/ffmpeg-3.0# ./build_android.sh ERROR: libfaac not found
If you think configure made a mistake, make sure you are using the latest version from Git. 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 solve the problem.
Here is my build_android.sh content:
#!/bin/bash
NDK=/home/rango/Desktop/android-ndk-r10e
SYSROOT=$NDK/platforms/android-19/arch-arm/
TOOLCHAIN=$NDK/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86
function build_one
{
./configure \
--prefix=$PREFIX \
--enable-shared \
--disable-static \
--disable-doc \
--disable-ffmpeg \
--disable-ffplay \
--disable-ffprobe \
--disable-ffserver \
--disable-avdevice \
--disable-doc \
--disable-symver \
--enable-gpl \
--enable-version3 \
--enable-nonfree \
--enable-shared \
--enable-libopencore-amrnb \
--enable-libopencore-amrwb \
--enable-libfaac \
--enable-libgsm \
--enable-libmp3lame \
--enable-libtheora \
--enable-libvorbis \
--enable-libx264 \
--enable-libxvid \
--cross-prefix=$TOOLCHAIN/bin/arm-linux-androideabi- \
--target-os=linux \
--arch=arm \
--enable-cross-compile \
--sysroot=$SYSROOT \
--extra-cflags="-Os -fpic $ADDI_CFLAGS" \
--extra-ldflags="$ADDI_LDFLAGS" \
$ADDITIONAL_CONFIGURE_FLAG
make clean
make -j4
make install
}
CPU=arm
PREFIX=$(pwd)/android/$CPU
ADDI_CFLAGS="-marm"
build_one
Solution
Finally i got it to work . The problem was that it can't find the lib's location. I typed this command : locate libfaac. and from the output i realized that its under "/usr/lib/i386-linux-gnu/" :
/usr/lib/i386-linux-gnu/libfaac.a
/usr/lib/i386-linux-gnu/libfaac.so
/usr/lib/i386-linux-gnu/libfaac.so.0
/usr/lib/i386-linux-gnu/libfaac.so.0.0.0
so what i did next is adding this line to "./build_android.sh" to tell it to look there:
--extra-ldflags=-L/usr/lib/i386-linux-gnu/
so the script becomes:
#!/bin/bash
NDK=/home/rango/Desktop/android-ndk-r10e
SYSROOT=$NDK/platforms/android-19/arch-arm/
TOOLCHAIN=$NDK/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86
function build_one
{
echo $PREFIX
./configure \
--prefix=$PREFIX \
--enable-shared \
--disable-static \
--disable-doc \
--disable-ffmpeg \
--disable-ffplay \
--disable-ffprobe \
--disable-ffserver \
--disable-avdevice \
--disable-doc \
--enable-nonfree \
--disable-symver \
--enable-gpl \
--enable-version3 \
--enable-shared \
--enable-libmp3lame \
--enable-libopencore-amrnb \
--enable-libopencore-amrwb \
--enable-libtheora \
--enable-libvorbis \
--enable-libx264 \
--enable-libxvid \
--enable-libgsm \
--enable-libfaac \
--extra-ldflags=-L/usr/lib/i386-linux-gnu/
--cross-prefix=$TOOLCHAIN/bin/arm-linux-androideabi- \
--target-os=linux \
--arch=arm \
--enable-cross-compile \
--sysroot=$SYSROOT \
--extra-cflags="-Os -fpic $ADDI_CFLAGS" \
--extra-ldflags="$ADDI_LDFLAGS" \
$ADDITIONAL_CONFIGURE_FLAG
make clean
make -j4
make install
}
CPU=arm
PREFIX=$(pwd)/android/$CPU
ADDI_CFLAGS="-marm"
build_one
Answered By - SaidTagnit
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.