Opened 12 years ago

Closed 11 years ago

#4982 closed defect (fixed)

Compilation of MythTV fails with recent ffmpeg installed

Reported by: Andreas <miscdreas@…> Owned by: Isaac Richards
Priority: minor Milestone: 0.21.1
Component: mythtv Version: 0.21-fixes
Severity: low Keywords:
Cc: Ticket locked: no

Description

I tried to compile revision 16597 with a newer ffmpeg (I had revision 12442) already installed on my system and if failed with this error message:

In file included from mpeg/pespacket.cpp:9:
/usr/include/glib-2.0/../libavcodec/avcodec.h:247:5: error: missing binary operator before token "("
/usr/include/glib-2.0/../libavcodec/avcodec.h:305:5: error: missing binary operator before token "("
/usr/include/glib-2.0/../libavcodec/avcodec.h:420:5: error: missing binary operator before token "("
/usr/include/glib-2.0/../libavcodec/avcodec.h:994:5: error: missing binary operator before token "("
/usr/include/glib-2.0/../libavcodec/avcodec.h:1307:5: error: missing binary operator before token "("
/usr/include/glib-2.0/../libavcodec/avcodec.h:2294:5: error: missing binary operator before token "("
/usr/include/glib-2.0/../libavcodec/avcodec.h:2461:5: error: missing binary operator before token "("
/usr/include/glib-2.0/../libavcodec/avcodec.h:2478:5: error: missing binary operator before token "("
/usr/include/glib-2.0/../libavcodec/avcodec.h:2837:5: error: missing binary operator before token "("
/usr/include/glib-2.0/../libavcodec/avcodec.h:2937:5: error: missing binary operator before token "("
In file included from mpeg/pespacket.cpp:10:
/usr/include/glib-2.0/../libavformat/avformat.h:155:5: error: missing binary operator before token "("
/usr/include/glib-2.0/../libavformat/avformat.h:524:5: error: missing binary operator before token "("
mpeg/pespacket.cpp: In member function ‘uint PESPacket::CalcCRC() const’:
mpeg/pespacket.cpp:160: error: ‘av_crc04C11DB7’ was not declared in this scope

When I move the "offending" header files out of the way, mythtv compiles without an error.

It seems like two things come together here:

ffmpeg recently changed the location of their header files from {systempath}/include/ffmpeg to {systempath}/include/libav(codec|device|format|util)

The systemwide installed headerfile avcodec.h takes precedence over mythtv's own avcodec.h in mythtv/libs/libavcodec.

Change History (3)

comment:1 Changed 11 years ago by anonymous

I was just able to confirm this behavior in the 0.21 release. The reason it's going to the system path is because the relative path in libs/libmythtv/mpeg/pespacket.cpp is wrong. It is ../libavcodec/avcodec.h where it should be ../../libavcodec/avcodec.h.

comment:2 in reply to:  1 Changed 11 years ago by Andreas <miscdreas@…>

Replying to anonymous:

I was just able to confirm this behavior in the 0.21 release. The reason it's going to the system path is because the relative path in libs/libmythtv/mpeg/pespacket.cpp is wrong. It is ../libavcodec/avcodec.h where it should be ../../libavcodec/avcodec.h.

The problem was fixed in 0.21.fixes a few weeks after my report. I am now running mythtv revision 17789 with ffmpeg 0.4.9 revision 15375 and mythtv compiles fine.

comment:3 Changed 11 years ago by Janne Grunau

Milestone: unknown0.21.1
Resolution: fixed
Status: newclosed
Version: head0.21-fixes

this was fixed by [16863] in trunk and [16864] in branches/release-0-21-fixes

Note: See TracTickets for help on using tickets.