Page 1 of 1

[SOLVED] ffmpeg compile issues with mpd 0.19

Posted: October 16th, 2014, 10:16 am
by KlinktBeter
When trying to compile 0.19 on vortexbox 2.2 (fedora 16), there's a compile error against ffmpeg:

Code: Select all

In file included from /usr/include/libavutil/common.h:349:0,
                 from /usr/include/libavutil/avutil.h:328,
                 from /usr/include/libavutil/error.h:28,
                 from src/lib/ffmpeg/Error.cxx:26:
/usr/include/libavutil/mem.h: In function 'int av_size_mult(size_t, size_t, size_t*)':
/usr/include/libavutil/mem.h:174:30: error: 'AVERROR' was not declared in this scope
make[1]: *** [src/lib/ffmpeg/libffmpeg_a-Error.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: Leaving directory `/root/rpmbuild/BUILD/mpd-1.19'
make: *** [all] Error 2
error: Bad exit status from /var/tmp/rpm-tmp.u7r8dH (%build)


RPM build errors:
    Bad exit status from /var/tmp/rpm-tmp.u7r8dH (%build)

Last month I managed to build 0.18.13 as rpm, with ffmpeg.
With 0.19 I only manage to compile it using

configure --disable-ffmpeg

The issue looks similar to "error: 'macro' was not declared in this scope"

https://code.google.com/p/ffmpegsource/ ... l?id=11#c9

but adding the CXXFLAGS=-D__STDC_CONSTANT_MACROS to the compiler didn't solve the issue:

Code: Select all

g++ -DHAVE_CONFIG_H -I.  -DNDEBUG -I./src -pthread -isystem /usr/include/glib-2.0 -isystem /usr/lib/glib-2.0/include -I/usr/include -DSYSTEM_CONFIG_FILE_LOCATION='"/etc/mpd.conf"'   -I/usr/include    -D_GNU_SOURCE -std=gnu++0x -pthread -D__STDC_CONSTANT_MACROS -fvisibility=hidden -fno-threadsafe-statics -fmerge-all-constants -ffast-math -ftree-vectorize -ffunction-sections -fdata-sections -Wall -Wextra -Wmissing-declarations -Wshadow -Wpointer-arith -Wcast-qual -Wwrite-strings -Wsign-compare -c -o src/encoder/plugins/libencoder_plugins_a-VorbisEncoderPlugin.o `test -f 'src/encoder/plugins/VorbisEncoderPlugin.cxx' || echo './'`src/encoder/plugins/VorbisEncoderPlugin.cxx
In file included from /usr/include/libavutil/common.h:349:0,
                 from /usr/include/libavutil/avutil.h:328,
                 from /usr/include/libavutil/error.h:28,
                 from src/lib/ffmpeg/Error.cxx:26:
/usr/include/libavutil/mem.h: In function 'int av_size_mult(size_t, size_t, size_t*)':
/usr/include/libavutil/mem.h:174:30: error: 'AVERROR' was not declared in this scope
Looking at the mpd changelog, there was an ffmpeg change in 0.18.14

http://www.musicpd.org/news/2014/09/mpd ... -released/

but 0.18.14 still compiles on my system

As my C++ experience dates back from 20 years, any help would be greatly appreciated.

Re: ffmpeg compile issues with mpd 0.19

Posted: October 16th, 2014, 5:04 pm
by max
This compiler error is inside ffmpeg headers, and is thus a ffmpeg bug.

Re: ffmpeg compile issues with mpd 0.19

Posted: October 17th, 2014, 11:01 am
by KlinktBeter
which version of ffmpeg was used in combination with mpd 0.19 development?

Re: ffmpeg compile issues with mpd 0.19

Posted: October 30th, 2014, 12:02 pm
by KlinktBeter