I hate to even ask - compile w/ ffmpeg

Eric Davis
  • Eric Davis

    Eric Davis - 2009-02-17

    I just can't figure out why it doesn't see ffmpeg

    checking ffmpeg/avformat.h usability... no
    checking ffmpeg/avformat.h presence... no
    checking for ffmpeg/avformat.h... no
    checking /usr/local/include/ffmpeg/avformat.h usability... no
    checking /usr/local/include/ffmpeg/avformat.h presence... no
    checking for /usr/local/include/ffmpeg/avformat.h... no
    checking libavformat/avformat.h usability... yes
    checking libavformat/avformat.h presence... yes
    checking for libavformat/avformat.h... yes
    checking for av_register_all in -lavformat... no
    checking for av_register_all in -lavformat... no
    checking for av_log_set_callback in -lavutil... yes
    checking libffmpegthumbnailer/videothumbnailerc.h usability... yes
    checking libffmpegthumbnailer/videothumbnailerc.h presence... yes
    checking for libffmpegthumbnailer/videothumbnailerc.h... yes
    checking for create_thumbnailer in -lffmpegthumbnailer... yes
    configure: WARNING: ffmpegthumbnailer disabled: ffmpeg libraries required

    I have the latest ffmpeg and ffmpegthumbnailer, and the latest mediatomb svn.  I seems that it *IS* finding avformat.h ... but can't find anything else?  Any ideas on what to check?

    Ffmpeg works fine externally ...

    • Jin

      Jin - 2009-02-17

      This may be something that I have to fix in configure, I believe that the location of libav* headers has changed.

      You could look for clues in config.log.

      Kind regards,

    • Eric Davis

      Eric Davis - 2009-02-17

      Here is a snippet that looks relevant :

      configure:30807: checking libavformat/avformat.h usability
      configure:30824: gcc -c -g -O2 -I/usr/include/mozjs  conftest.c >&5
      configure:30830: $? = 0
      configure:30844: result: yes
      configure:30848: checking libavformat/avformat.h presence
      configure:30863: gcc -E  conftest.c
      configure:30869: $? = 0
      configure:30883: result: yes
      configure:30916: checking for libavformat/avformat.h
      configure:30923: result: yes
      configure:31223: checking for av_register_all in -lavformat
      configure:31258: gcc -o conftest -g -O2 -I/usr/include/mozjs    -lrt  -lmagic conftest.c -lavformat  -lcurl  >&5
      /usr/lib/gcc/i486-linux-gnu/4.3.2/../../../../lib/libavformat.a(allformats.o): In function `av_register_all':
      /sources/ffmpeg/libavformat/allformats.c:47: undefined reference to `avcodec_register_all'
      /usr/lib/gcc/i486-linux-gnu/4.3.2/../../../../lib/libavformat.a(utils.o): In function `av_set_pts_info':
      /sources/ffmpeg/libavformat/utils.c:3237: undefined reference to `av_gcd'
      /sources/ffmpeg/libavformat/utils.c:3243: undefined reference to `av_log'
      /usr/lib/gcc/i486-linux-gnu/4.3.2/../../../../lib/libavformat.a(utils.o): In function `url_split':
      /sources/ffmpeg/libavformat/utils.c:3174: undefined reference to `av_strlcpy'
      /sources/ffmpeg/libavformat/utils.c:3189: undefined reference to `av_strlcpy'
      /sources/ffmpeg/libavformat/utils.c:3204: undefined reference to `av_strlcpy'
      /sources/ffmpeg/libavformat/utils.c:3209: undefined reference to `av_strlcpy'

      also, my configure is ./configure --prefix=/usr ... but it appears to find libav* stuff in /sources/ffmpeg, which is where I build ffmpeg from.   Its also looking in /usr/local/include rather then /usr/include where it seems like it should

    • Eric Davis

      Eric Davis - 2009-02-17

      Actually.. it seems directly related to the av_register_all() check.  If I disable that, i can get ffmpeg enabled (and therefore ffmpegthumbnailer)

      I didn't 'make' yet to see if I *really* get the use of this.   but a grep of avformat.h shows that av_register_all is indeed in the file

    • Jin

      Jin - 2009-02-19

      Interesting... would be easier to figure this one out if I could reproduce it - but here everything compiles without problems.

  • Eric Sauvageau

    Eric Sauvageau - 2011-06-10

    I just ran into this issue while trying to crosscompile mediatomb under Scratchbox2.  The was was to edit the configure file, and modify the section of the av_register_all() test so it would link with additional ffmpeg libraries:

    if test "${ac_cv_lib_avformat_av_register_all+set}" = set; then :
      $as_echo_n "(cached) " >&6
    LIBS="-lavformat -lavcodec -lavutil  $LIBS"

Log in to post a comment.