Menu

#89 IDJC/GIT: libavutil/timestamp.h missing; compile error

v1.0 (example)
closed-fixed
nobody
None
5
2023-09-18
2016-06-03
Moonbase
No

On a git-cloned IDJC I keep getting compile errors on both Ubuntu 14.04 and Linux Mint 17.3:

libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -pthread -I/usr/include/opus -O2 -Wall -std=gnu99 -O2 -MT idjc_la-live_webm_encoder.lo -MD -MP -MF .deps/idjc_la-live_webm_encoder.Tpo -c live_webm_encoder.c  -fPIC -DPIC -o .libs/idjc_la-live_webm_encoder.o
live_webm_encoder.c:33:33: fatal error: libavutil/timestamp.h: No such file or directory
 #include <libavutil/timestamp.h>
                                 ^
compilation terminated.
make[2]: *** [idjc_la-live_webm_encoder.lo] Fehler 1
make[2]: Verzeichnis »/home/matthias/Downloads/idjc/c« wird verlassen
make[1]: *** [all-recursive] Fehler 1
make[1]: Verzeichnis »/home/matthias/Downloads/idjc« wird verlassen
make: *** [all] Fehler 2

Any ideas? Any more data you need?

P.S.: I think the only difference on both systems since I last compiled IDJC is that I had to install OBS (Open Broadcaster Software) on both, so I might have something different regarding ffmpeg—they recommend installing ffmpeg like this:

sudo add-apt-repository ppa:kirillshkrogalev/ffmpeg-next
sudo apt-get update && sudo apt-get install ffmpeg

I don’t know if that might cause any problems—though I hope not.

Discussion

  • Moonbase

    Moonbase - 2016-06-19

    I guess I now really messed it up: Still running on Ubuntu Studio 14.04.4 LTS, I tried to replace the development files against the FFmpeg -dev files (see Synaptic screenshots) and got the following:

    libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/x86_64-linux-gnu -I/usr/include/x86_64-linux-gnu -I/usr/include/x86_64-linux-gnu -pthread -I/usr/include/opus -I/usr/include/x86_64-linux-gnu -O2 -Wall -std=gnu99 -O2 -MT idjc_la-live_webm_encoder.lo -MD -MP -MF .deps/idjc_la-live_webm_encoder.Tpo -c live_webm_encoder.c  -fPIC -DPIC -o .libs/idjc_la-live_webm_encoder.o
    live_webm_encoder.c: In function 'add_stream':
    live_webm_encoder.c:91:21: error: 'AV_CODEC_FLAG_GLOBAL_HEADER' undeclared (first use in this function)
             c->flags |= AV_CODEC_FLAG_GLOBAL_HEADER;
                         ^
    live_webm_encoder.c:91:21: note: each undeclared identifier is reported only once for each function it appears in
    live_webm_encoder.c: In function 'open_stream':
    live_webm_encoder.c:140:34: error: 'AV_CODEC_CAP_VARIABLE_FRAME_SIZE' undeclared (first use in this function)
         if (c->codec->capabilities & AV_CODEC_CAP_VARIABLE_FRAME_SIZE)
                                      ^
    make[2]: *** [idjc_la-live_webm_encoder.lo] Fehler 1
    make[2]: Verzeichnis »/home/matthias/Downloads/idjc/c« wird verlassen
    make[1]: *** [all-recursive] Fehler 1
    make[1]: Verzeichnis »/home/matthias/Downloads/idjc« wird verlassen
    make: *** [all] Fehler 2
    

    Any ideas on how to get it compiling again? Much appreciated.

     
  • Stephen Fairchild

    ./configure --disable-libav
    This will almost certainly work. You will lose the ability to stream and play certain audio formats.

     
  • Stephen Fairchild

    I just pushed an update that will prevent compile failure due to the above-mentioned undeclared symbols. This does not guarantee that WebM streaming will work.

     
  • Stephen Fairchild

    I wouldn't say you messed it up becuase you managed to get further in the complie process. I suspect that the ffmpeg you are running is still too old due to the fact there is only so much you can upgrade while still being able to run so much older software. FFmpeg versions 2.8.6 and 2.8.7 will be good.

     
  • Christian Hennecke

    I'm experiencing the same problem, both with the release version 0.8.16 and latest git stuff on an unclobbered Linux Mint 17.3 which is based on Ubuntu 14.04. Previous versions worked fine. I think the problem is that Ubuntu is using a) avconv instead of ffmpeg and b) an older version.

    You mentioned an update that will prevent compile failure. Does this need to be enabled somehow?

     

    Last edit: Christian Hennecke 2016-06-28
  • Moonbase

    Moonbase - 2016-09-25

    Being a user, not much of a developer, I finally succeeded GIT-cloning and compiling ffmpeg on Linux Mint 17.3, generating shared libraries. I followed the instructions at http://trac.ffmpeg.org/wiki/CompilationGuide/Ubuntu#ffmpeg (more or less, changing the prefix and having it compile to shared libraries).

    More or less, having the listed dependencies installed, this boiled down to:

    cd ~/Downloads
    git clone git://source.ffmpeg.org/ffmpeg
    
    
    
    cd ~/Downloads/ffmpeg
    PKG_CONFIG_PATH="/usr/lib/pkgconfig" ./configure \
      --prefix="/usr" \
      --extra-cflags="-I/usr/include" \
      --extra-ldflags="-L/usr/lib" \
      --enable-shared \
      --enable-gpl \
      --enable-libass \
      --enable-libfdk-aac \
      --enable-libfreetype \
      --enable-libmp3lame \
      --enable-libopus \
      --enable-libtheora \
      --enable-libvorbis \
      --enable-libvpx \
      --enable-libx264 \
      --enable-libx265 \
      --enable-nonfree
    make
    sudo make install
    sudo make distclean
    hash -r
    sudo ldconfig
    

    I then get a ffmpeg version like this:

    ffmpeg version N-81756-g5a70e56 Copyright (c) 2000-2016 the FFmpeg developers
      built with gcc 4.8 (Ubuntu 4.8.4-2ubuntu1~14.04.3)
      configuration: --prefix=/usr --extra-cflags=-I/usr/include --extra-ldflags=-L/usr/lib --enable-shared --enable-gpl --enable-libass --enable-libfdk-aac --enable-libfreetype --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-nonfree
      libavutil      55. 30.100 / 55. 30.100
      libavcodec     57. 58.100 / 57. 58.100
      libavformat    57. 50.100 / 57. 50.100
      libavdevice    57.  0.102 / 57.  0.102
      libavfilter     6. 63.100 /  6. 63.100
      libswscale      4.  1.100 /  4.  1.100
      libswresample   2.  1.100 /  2.  1.100
      libpostproc    54.  0.100 / 54.  0.100
    Hyper fast Audio and Video encoder
    usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...
    

    Recompiling libshout-idjc and idjc works without error, but upon starting IDJC I still get "IDJC Failed to open /usr/lib/idjc/idjc.so Cannot continue".

    Ok, so ldd -r /usr/lib/idjc/idjc.so shows:

        linux-vdso.so.1 =>  (0x00007ffdfcd79000)
        libglib-2.0.so.0 => /lib/x86_64-linux-gnu/libglib-2.0.so.0 (0x00007f5bbf82f000)
        libavcodec.so.54 => /usr/lib/x86_64-linux-gnu/libavcodec.so.54 (0x00007f5bbead7000)
        libavformat.so.54 => /usr/lib/x86_64-linux-gnu/libavformat.so.54 (0x00007f5bbe7b4000)
        libavutil.so.52 => /usr/lib/x86_64-linux-gnu/libavutil.so.52 (0x00007f5bbe58f000)
        libFLAC.so.8 => /usr/lib/x86_64-linux-gnu/libFLAC.so.8 (0x00007f5bbe35e000)
        libjack.so.0 => /usr/lib/x86_64-linux-gnu/libjack.so.0 (0x00007f5bbe104000)
        libmpg123.so.0 => /usr/lib/x86_64-linux-gnu/libmpg123.so.0 (0x00007f5bbdead000)
        libmp3lame.so.0 => /usr/lib/x86_64-linux-gnu/libmp3lame.so.0 (0x00007f5bbdc38000)
        libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f5bbd931000)
        libsamplerate.so.0 => /usr/lib/x86_64-linux-gnu/libsamplerate.so.0 (0x00007f5bbd5c5000)
        libshout-idjc.so.3 => /usr/lib/libshout-idjc.so.3 (0x00007f5bbd3ad000)
        libsndfile.so.1 => /usr/lib/x86_64-linux-gnu/libsndfile.so.1 (0x00007f5bbd144000)
        libspeex.so.1 => /usr/lib/x86_64-linux-gnu/libspeex.so.1 (0x00007f5bbcf2b000)
        libvorbisenc.so.2 => /usr/lib/x86_64-linux-gnu/libvorbisenc.so.2 (0x00007f5bbcc7f000)
        libvorbis.so.0 => /usr/lib/x86_64-linux-gnu/libvorbis.so.0 (0x00007f5bbca4e000)
        libtwolame.so.0 => /usr/lib/libtwolame.so.0 (0x00007f5bbc82b000)
        libopus.so.0 => /usr/lib/x86_64-linux-gnu/libopus.so.0 (0x00007f5bbc5e3000)
        libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f5bbc3c4000)
        libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f5bbbfff000)
        libpcre.so.3 => /lib/x86_64-linux-gnu/libpcre.so.3 (0x00007f5bbbdc1000)
        libxvidcore.so.4 => /usr/lib/x86_64-linux-gnu/libxvidcore.so.4 (0x00007f5bbba82000)
        libx264.so.142 => /usr/lib/x86_64-linux-gnu/libx264.so.142 (0x00007f5bbb6eb000)
        libvpx.so.1 => /usr/lib/x86_64-linux-gnu/libvpx.so.1 (0x00007f5bbb30b000)
        libvo-amrwbenc.so.0 => /usr/lib/x86_64-linux-gnu/libvo-amrwbenc.so.0 (0x00007f5bbb0f0000)
        libvo-aacenc.so.0 => /usr/lib/x86_64-linux-gnu/libvo-aacenc.so.0 (0x00007f5bbaed3000)
        libtheoraenc.so.1 => /usr/lib/x86_64-linux-gnu/libtheoraenc.so.1 (0x00007f5bbac93000)
        libtheoradec.so.1 => /usr/lib/x86_64-linux-gnu/libtheoradec.so.1 (0x00007f5bbaa79000)
        libschroedinger-1.0.so.0 => /usr/lib/x86_64-linux-gnu/libschroedinger-1.0.so.0 (0x00007f5bba7b5000)
        libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f5bba59c000)
        libopenjpeg.so.2 => /usr/lib/x86_64-linux-gnu/libopenjpeg.so.2 (0x00007f5bba379000)
        libopencore-amrwb.so.0 => /usr/lib/x86_64-linux-gnu/libopencore-amrwb.so.0 (0x00007f5bba165000)
        libopencore-amrnb.so.0 => /usr/lib/x86_64-linux-gnu/libopencore-amrnb.so.0 (0x00007f5bb9f3b000)
        libgsm.so.1 => /usr/lib/x86_64-linux-gnu/libgsm.so.1 (0x00007f5bb9d2c000)
        libfdk-aac.so.0 => /usr/lib/x86_64-linux-gnu/libfdk-aac.so.0 (0x00007f5bb9a7f000)
        libva.so.1 => /usr/lib/x86_64-linux-gnu/libva.so.1 (0x00007f5bb9869000)
        librtmp.so.0 => /usr/lib/x86_64-linux-gnu/librtmp.so.0 (0x00007f5bb964e000)
        libgnutls.so.26 => /usr/lib/x86_64-linux-gnu/libgnutls.so.26 (0x00007f5bb9390000)
        libbz2.so.1.0 => /lib/x86_64-linux-gnu/libbz2.so.1.0 (0x00007f5bb917f000)
        libogg.so.0 => /usr/lib/x86_64-linux-gnu/libogg.so.0 (0x00007f5bb8f76000)
        librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f5bb8d6e000)
        libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f5bb8b69000)
        libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f5bb8865000)
        libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f5bb864f000)
        libssl.so.1.0.0 => /lib/x86_64-linux-gnu/libssl.so.1.0.0 (0x00007f5bb83ef000)
        libcrypto.so.1.0.0 => /lib/x86_64-linux-gnu/libcrypto.so.1.0.0 (0x00007f5bb8013000)
        libtheora.so.0 => /usr/lib/x86_64-linux-gnu/libtheora.so.0 (0x00007f5bb7dc4000)
        /lib64/ld-linux-x86-64.so.2 (0x0000558d07c62000)
        liborc-0.4.so.0 => /usr/lib/x86_64-linux-gnu/liborc-0.4.so.0 (0x00007f5bb7b41000)
        libgcrypt.so.11 => /lib/x86_64-linux-gnu/libgcrypt.so.11 (0x00007f5bb78c1000)
        libtasn1.so.6 => /usr/lib/x86_64-linux-gnu/libtasn1.so.6 (0x00007f5bb76ac000)
        libp11-kit.so.0 => /usr/lib/x86_64-linux-gnu/libp11-kit.so.0 (0x00007f5bb746a000)
        libgpg-error.so.0 => /lib/x86_64-linux-gnu/libgpg-error.so.0 (0x00007f5bb7264000)
        libffi.so.6 => /usr/lib/x86_64-linux-gnu/libffi.so.6 (0x00007f5bb705c000)
    undefined symbol: av_opt_set_sample_fmt (/usr/lib/idjc/idjc.so)
    undefined symbol: swr_init  (/usr/lib/idjc/idjc.so)
    undefined symbol: swr_get_delay (/usr/lib/idjc/idjc.so)
    undefined symbol: avcodec_get_name  (/usr/lib/idjc/idjc.so)
    undefined symbol: av_frame_get_buffer   (/usr/lib/idjc/idjc.so)
    undefined symbol: av_frame_alloc    (/usr/lib/idjc/idjc.so)
    undefined symbol: swr_alloc (/usr/lib/idjc/idjc.so)
    undefined symbol: av_frame_free (/usr/lib/idjc/idjc.so)
    undefined symbol: swr_convert   (/usr/lib/idjc/idjc.so)
    undefined symbol: swr_free  (/usr/lib/idjc/idjc.so)
    undefined symbol: av_frame_make_writable    (/usr/lib/idjc/idjc.so)
    

    So it seems to be wanting the older (previously existing) libraries … and promptly runs into undefined symbols.

    There must be a step I do not know about: How do I make it use the freshly compiled libraries?

    For instance, checking for libavutil, I see:

    $ ls -l /usr/lib/libavutil*
    -rw-r--r-- 1 root root 2603790 Sep 25 19:45 /usr/lib/libavutil.a
    lrwxrwxrwx 1 root root      29 Sep  9 00:52 /usr/lib/libavutil-cinelerra.so.49 -> libavutil-cinelerra.so.49.6.0
    -rw-r--r-- 1 root root   47048 Sep  9 00:52 /usr/lib/libavutil-cinelerra.so.49.6.0
    lrwxrwxrwx 1 root root      22 Sep 25 19:45 /usr/lib/libavutil.so -> libavutil.so.55.30.100
    lrwxrwxrwx 1 root root      22 Sep 25 19:45 /usr/lib/libavutil.so.55 -> libavutil.so.55.30.100
    -rwxr-xr-x 1 root root  424872 Sep 25 19:45 /usr/lib/libavutil.so.55.30.100
    

    libavutil.so points to the correct (new) one, but idjc.so still seems to prefer libavutil.so.52 => /usr/lib/x86_64-linux-gnu/libavutil.so.52.

    What am I doing wrong? Help greatly appreciated!

     

    Last edit: Moonbase 2016-09-25
  • Moonbase

    Moonbase - 2016-09-26

    So, after some more experimentation, I found that—at least on Ubuntu-derivatives like Mint 17.3—the package system should know about a (supposedly) "higher" version of the freshly-compiled ffmpeg in order to create the correct links.

    This is what I did:
    1. De-installed the existing ffmpeg, libavformat-dev and libavutil-dev (and their dependencies) using the package manager (Synaptic).
    2. Instead of doing the sudo make install for ffmpeg above, created a minimalistic .deb package called ffmpeg with version "10:YYYYMMDDHHMM-git" and installed that so the package manager could resolve everything needed:

    sudo apt-get install checkinstall
    sudo checkinstall --pkgname=ffmpeg --pkgversion="10:$(date +%Y%m%d%H%M)-git" --backup=no --deldoc=yes --fstrans=no --default
    

    (If it fails while resolving dependencies, it will still generate a .deb package in your ffmpeg folder which you can manually install after manually resolving the dependency issues.)

    After having my freshly-built ffmpeg (and all its shared libraries) up and running, I went through the usual IDJC build-and-compile steps again.

    Upon starting IDJC, it immediately worked! Voilà! (phew!)

    So I think this one can be closed. Thanks for all your input!

    N.B.: Stephen, I think this whole "How to build a newer ffmpeg on Ubuntu 14.04 LTS and its derivatives (like Linux Mint 17) and make IDJC work" thingy should somewhere be documented, because—at least for me—it involved learning a lot of new things.

    I’d be willing to write my process down somewhere (Maybe in "Discussion"?) but then again I have quite a non-standard system in the meantime (i.e., mc3man/trusty-media PPA installed and the like). Still I think it might be a starting point for others to get all the new and shiny things up and running …

     
  • Stephen Fairchild

    • status: open --> closed-fixed
     
  • Stephen Fairchild

    Fixed until ffmpeg decide they need a new API. At least things are stable this last few years.

     

Log in to post a comment.