Bug 364582

Summary: phonon-backend-vlc fails to build (maybe gcc 6 related?)
Product: [Frameworks and Libraries] phonon-backend-vlc Reporter: George Diamantopoulos <georgediam>
Component: generalAssignee: Harald Sitter <sitter>
Status: RESOLVED FIXED    
Severity: normal CC: bcooksley, fabo, jb, myriam
Priority: NOR    
Version First Reported In: 0.9-git   
Target Milestone: 0.9   
Platform: Gentoo Packages   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: phonon-vlc-0.9.0 build log on gentoo

Description George Diamantopoulos 2016-06-21 09:01:51 UTC
Both 0.9.0 and current master as of this posting fail to build on my gentoo system. I'm attaching the build log here.

Reproducible: Always
Comment 1 George Diamantopoulos 2016-06-21 09:03:11 UTC
Created attachment 99639 [details]
phonon-vlc-0.9.0 build log on gentoo
Comment 2 Harald Sitter 2016-06-21 13:13:57 UTC
Git commit 6268ba35692acdb9cfdd062a807f957f499fef2c by Harald Sitter.
Committed on 21/06/2016 at 13:12.
Pushed by sitter into branch '0.9'.

give libvlc a prefix, to avoid it preprocessing on libvlc_foo lines

i.e. technically we should always have
file header > qt include > vlc include > other include > other pvlc include
but apparently there is a case where this isn't being done so
utils/libvlc.h is included before the actual vlc headers which means by
the time the vlc headers are preprocessed the 'libvlc' macro was already
defined which then caused to it being applied to libvlc_foo_kitten_magic
which naturally resulted in compilation failure.

M  +3    -3    src/backend.cpp
M  +4    -4    src/devicemanager.cpp
M  +1    -1    src/effectmanager.cpp
M  +1    -1    src/media.cpp
M  +1    -1    src/mediaplayer.cpp
M  +2    -2    src/utils/libvlc.h

http://commits.kde.org/phonon-vlc/6268ba35692acdb9cfdd062a807f957f499fef2c