Build problems 2.5.0

Forums:

Hi there

I'm trying to build MOC from source without success
There seems to be a problem with API changes in ffmpeg 2.7.2 ('AVCODEC_MAX_AUDIO_FRAME_SIZE' undeclared)
Any clue how to fixing this ?
Thanks in advance

Here's the part of build log

Making all in ffmpeg
make[3]: Entering directory '/data/pkgmk/work/moc/src/moc-2.5.0/decoder_plugins/ffmpeg'
/bin/sh ../../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I../.. -I../.. -I../.. -pthread -O2 -march=x86-64 -pipe -Wall -W -I/usr/include/alsa -MT libffmpeg_decoder_la-ffmpeg.lo -MD -MP -MF .deps/libffmpeg_decoder_la-ffmpeg.Tpo -c -o libffmpeg_decoder_la-ffmpeg.lo `test -f 'ffmpeg.c' || echo './'`ffmpeg.c
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../.. -I../.. -I../.. -pthread -O2 -march=x86-64 -pipe -Wall -W -I/usr/include/alsa -MT libffmpeg_decoder_la-ffmpeg.lo -MD -MP -MF .deps/libffmpeg_decoder_la-ffmpeg.Tpo -c ffmpeg.c -fPIC -DPIC -o .libs/libffmpeg_decoder_la-ffmpeg.o
ffmpeg.c: In function 'is_timing_broken':
ffmpeg.c:475:16: error: 'AVFormatContext' has no member named 'file_size'
file_size = ic->file_size;
^
ffmpeg.c: In function 'ffmpeg_info':
ffmpeg.c:546:2: warning: implicit declaration of function 'av_open_input_file' [-Wimplicit-function-declaration]
err = av_open_input_file (&ic, file_name, NULL, 0, NULL);
^
ffmpeg.c:562:2: warning: implicit declaration of function 'av_find_stream_info' [-Wimplicit-function-declaration]
err = av_find_stream_info (ic);
^
ffmpeg.c:644:8: error: 'AVFormatContext' has no member named 'track'
if (ic->track != 0)
^
ffmpeg.c:645:19: error: 'AVFormatContext' has no member named 'track'
info->track = ic->track;
^
ffmpeg.c:646:8: error: 'AVFormatContext' has no member named 'title'
if (ic->title[0] != 0)
^
ffmpeg.c:647:28: error: 'AVFormatContext' has no member named 'title'
info->title = xstrdup (ic->title);
^
ffmpeg.c:648:8: error: 'AVFormatContext' has no member named 'author'
if (ic->author[0] != 0)
^
ffmpeg.c:649:29: error: 'AVFormatContext' has no member named 'author'
info->artist = xstrdup (ic->author);
^
ffmpeg.c:650:8: error: 'AVFormatContext' has no member named 'album'
if (ic->album[0] != 0)
^
ffmpeg.c:651:28: error: 'AVFormatContext' has no member named 'album'
info->album = xstrdup (ic->album);
^
ffmpeg.c:659:2: warning: implicit declaration of function 'av_close_input_file' [-Wimplicit-function-declaration]
av_close_input_file (ic);
^
ffmpeg.c: In function 'ffmpeg_open':
ffmpeg.c:999:2: warning: implicit declaration of function 'avcodec_open' [-Wimplicit-function-declaration]
if (avcodec_open (data->enc, data->codec) < 0)
^
ffmpeg.c:1045:38: error: 'AVFormatContext' has no member named 'file_size'
data->avg_bitrate = (int) (data->ic->file_size /
^
ffmpeg.c: In function 'decode_packet':
ffmpeg.c:1218:14: error: 'AVCODEC_MAX_AUDIO_FRAME_SIZE' undeclared (first use in this function)
char avbuf[(AVCODEC_MAX_AUDIO_FRAME_SIZE * 3) / 2] __attribute__((aligned(16)));
^
ffmpeg.c:1218:14: note: each undeclared identifier is reported only once for each function it appears in
ffmpeg.c:1234:3: warning: implicit declaration of function 'avcodec_decode_audio' [-Wimplicit-function-declaration]
len = avcodec_decode_audio (data->enc, (int16_t *)data->avbuf,
^
ffmpeg.c:1218:7: warning: unused variable 'avbuf' [-Wunused-variable]
char avbuf[(AVCODEC_MAX_AUDIO_FRAME_SIZE * 3) / 2] __attribute__((aligned(16)));
^
Makefile:410: recipe for target 'libffmpeg_decoder_la-ffmpeg.lo' failed
make[3]: *** [libffmpeg_decoder_la-ffmpeg.lo] Error 1
make[3]: Leaving directory '/data/pkgmk/work/moc/src/moc-2.5.0/decoder_plugins/ffmpeg'
Makefile:363: recipe for target 'all-recursive' failed
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory '/data/pkgmk/work/moc/src/moc-2.5.0/decoder_plugins'
Makefile:717: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/data/pkgmk/work/moc/src/moc-2.5.0'
Makefile:472: recipe for target 'all' failed
make: *** [all] Error 2

Someone else had a very similar problem just recently, but it turned out to be an issue with his installed libraries. (Unfortunately, I didn't keep the e-mails.)

I have just now built MOC with FFmpeg 2.7.2 and have no errors, so I'm guessing that you have a similar library confusion as the previous reporter did.

Both configure and make need to be using the same paths to the FFmpeg headers and libraries. Double check that is the case and if you cannot resolve the problem, either e-mail mocmaint the config.log file (gzipped) or place it some place from which I can download it.

Thanks for your quick reply

Well it was an library problem. After recompiling ffmpeg everything went smoothly
Sorry I bothered you with this. I should have checked earlier
thanks again