[SOLVED] ffmpeg compile issues with mpd 0.19

Discuss client development (or even MPD development if you feel so inclined), ask questions about the client libs, MPD feature requests from client developers, etc...
Post Reply
KlinktBeter
Posts: 18
Joined: August 30th, 2014, 7:46 pm

[SOLVED] ffmpeg compile issues with mpd 0.19

Post by KlinktBeter » October 16th, 2014, 10:16 am

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.

max
Forum team
Posts: 940
Joined: January 15th, 2013, 3:43 pm

Re: ffmpeg compile issues with mpd 0.19

Post by max » October 16th, 2014, 5:04 pm

This compiler error is inside ffmpeg headers, and is thus a ffmpeg bug.

KlinktBeter
Posts: 18
Joined: August 30th, 2014, 7:46 pm

Re: ffmpeg compile issues with mpd 0.19

Post by KlinktBeter » October 17th, 2014, 11:01 am

which version of ffmpeg was used in combination with mpd 0.19 development?

KlinktBeter
Posts: 18
Joined: August 30th, 2014, 7:46 pm

Re: ffmpeg compile issues with mpd 0.19

Post by KlinktBeter » October 30th, 2014, 12:02 pm


Post Reply