title: FFMPEG for Android toolchains: arm-linux-armeabi-eabi-pkg-config - is there any toolchain in existence containing the pkg-config tool
body: <p>Does anybody know  any toolchain for <b>ffmpeg linux arm </b> platform which contains the <b>arm-linux-androideabi-pkg-config</b> tool? <br><br>The Android NDK does not contain it. Also has anybody succeeded in building ffmpeg for android that contains the alsa device? Please note that libasound is present on my Ubuntu x86 PC.<br><br>After very extensive research visiting forums including ffmpeg.org, ffmpeg--nabbles, groups.google.com including the andro and android-ndk gropus, and the Internet in general, I have not succeeded in finding anyone who seems to know of its existence. At best, I have read people saying ignore it. Considering what it is needed for, I consider that a naive thing to say.<br><br>A careful review of the standard ffmpeg configure script shows that for certain input and output devices  a toolchain described as <b>pkg_config_default=pkg-config</b> is required. Also all items on the HAVE_LIST are SYSTEM DEPENDENT. The configure script states very clearly what dependencies are required for each indev  or outdev item. Apparently this tool is used then to verify the libraries which are needed for the dependencies<br><br>
  This is what happens when you attempt to configure ffmpeg for android<br><br></p>
  
  <blockquote>
    <p>jasongipsyblues@android-master:~/android-ffmpeg/Project/jni$ ./configure_ffmpeg.sh<br>...<br>...<br>..<br>....<br>License: GPL version 3 or later
    Creating config.mak and config.h...</p>
    
    <p>config.h is unchanged</p>
    
    <p>config.asm is unchanged</p>
    
    <p>libavutil/avconfig.h is unchanged</p>
    
    <p>WARNING: /home/jasongipsyblues/Desktop/apps/android-ndk-r8b/toolchains/arm-linux-androideabi-
    4.4.3/prebuilt/linux-x86/bin/arm-linux-androideabi-pkg-config not found, library detection may 
    fail.<br><br></p>
  </blockquote>
  
  <p>On a PC with Ubuntu there is no issue with pkg-config.<br><br>Please compare the following outputs when one greps for the in/out device  alsa from the config.log files for an Ubuntu x86 PC and that for the android box using the android-ndk-r8 toolchain</p>
  
  <blockquote>
    <p>jasongipsyblues@android-master:~/android-ffmpeg/Project/jni/ffmpeg$ cat config.log|grep >alsa<br>
       alsa_indev<br>
       alsa_outdev<br>
       alsa_asoundlib_h<br>
    INDEV_LIST='alsa_indev<br>
    OUTDEV_LIST='alsa_outdev<br>
    alsa_indev='yes'<br>
    alsa_indev_deps='alsa_asoundlib_h snd_pcm_htimestamp'<br>
    alsa_outdev='yes'<br>
    alsa_outdev_deps='alsa_asoundlib_h'<br>
    indevs_if_any='alsa_indev<br>
    outdevs_if_any='alsa_outdev<br>
    check_lib2 alsa/asoundlib.h snd_pcm_htimestamp -lasound<br>
    check_func_headers alsa/asoundlib.h snd_pcm_htimestamp -lasound<br>
       1  #include <br>
    /tmp/ffconf.VCjQQAHQ.c:1:28: error: alsa/asoundlib.h: No such file or directory<br><br> </p>
  </blockquote>
  
  <p>This is the compiler output showing the source of the error:<br></p>
  
  <blockquote>
    <p>check_lib2 alsa/asoundlib.h snd_pcm_htimestamp -lasound<br>
    check_func_headers alsa/asoundlib.h snd_pcm_htimestamp -lasound<br>
    check_ld cc -lasound<br>
    check_cc<br>
    BEGIN /tmp/ffconf.VCjQQAHQ.c<br>
       1  #include <br>
       2  long check_snd_pcm_htimestamp(void) { return (long) snd_pcm_htimestamp; }<br>
       3  int main(void) { return 0; }<br>
    END /tmp/ffconf.VCjQQAHQ.c<br>
    /home/jasongipsyblues/Desktop/apps/android-ndk-r8b/toolchains/arm-linux-androideabi->4.4.3/prebuilt/linux-x86/bin/arm-linux-androideabi-gcc --sysroot=/home/jasongipsyblues/Desktop/apps/android-ndk-r8b/platforms/android-14/arch-arm -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -DPIC -I../x264 -mcpu=cortex-a9 -std=c99 -fomit-frame-pointer -fPIC -marm -c -o /tmp/ffconf.I2B2AXfH.o <br>
    /tmp/ffconf.VCjQQAHQ.c<br>
    /tmp/ffconf.VCjQQAHQ.c:1:28: error: alsa/asoundlib.h: No such file or directory<br>
    /tmp/ffconf.VCjQQAHQ.c: In function 'check_snd_pcm_htimestamp':<br>
    /tmp/ffconf.VCjQQAHQ.c:2: error: 'snd_pcm_htimestamp' undeclared (first use in this function)<br>
    /tmp/ffconf.VCjQQAHQ.c:2: error: (Each undeclared identifier is reported only once<br>
    /tmp/ffconf.VCjQQAHQ.c:2: error: for each function it appears in.)<br><br>
    This is for the Ubuntu x86PC ffmpeg <br>
    jasongipsyblues@android-master:~/ffmpeg$ cat config.log|grep alsa<br>
       alsa_indev<br>
       alsa_outdev<br>
       alsa_asoundlib_h<br>
    INDEV_LIST='alsa_indev<br>
    OUTDEV_LIST='alsa_outdev<br>
    alsa_indev='yes'<br>
    alsa_indev_deps='alsa_asoundlib_h snd_pcm_htimestamp'<br>
    alsa_outdev='yes'<br>
    alsa_outdev_deps='alsa_asoundlib_h'<br>
    indevs_if_any='alsa_indev<br>
    outdevs_if_any='alsa_outdev<br>
    check_lib2 alsa/asoundlib.h snd_pcm_htimestamp -lasound<br>
    check_func_headers alsa/asoundlib.h snd_pcm_htimestamp -lasound<br>
       1  #include <br> 
    There is no error here and alsa is successfully included in the ffmpeg build <br><br></p>
  </blockquote>