Bug 363054

Summary: Building amarok-2.8.90 with GCC-6.1.0 fails with "error: 'Playlists::Playlist::ModelStack' has not been declared"
Product: [Applications] amarok Reporter: nsane457
Component: generalAssignee: Amarok Developers <amarok-bugs-dist>
Status: RESOLVED FIXED    
Severity: normal CC: evorster, johu, nsane457, rdieter
Priority: NOR    
Version: 2.8.90 (2.9 beta)   
Target Milestone: 2.9   
Platform: Gentoo Packages   
OS: Linux   
URL: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=822704
Latest Commit: Version Fixed In: 2.9
Sentry Crash Report:

Description nsane457 2016-05-14 04:53:09 UTC
Building amarok-2.8.90 with GCC-6.1.0 fails with:

>/var/tmp/portage/media-sound/amarok-2.8.90-r1/work/amarok-2.8.90/src/core-impl/playlists/types/file/xspf/XSPFPlaylist.cpp: In member function 'void Playlists::XSPFPlaylist::load()':
>/var/tmp/portage/media-sound/amarok-2.8.90-r1/work/amarok-2.8.90/src/core-impl/playlists/types/file/xspf/XSPFPlaylist.cpp:104:33: error: 'Playlists::Playlist::ModelStack' has not been declared
>                     ::Playlist::ModelStack::instance()->bottom()->rowCount(),



Reproducible: Always

Steps to Reproduce:
1. emerge -1 =amarok-2.8.90-r1

Actual Results:  
/var/tmp/portage/media-sound/amarok-2.8.90-r1/work/amarok-2.8.90/src/core-impl/playlists/types/file/xspf/XSPFPlaylist.cpp:104:33: error: 'Playlists::Playlist::ModelStack' has not been declared

Expected Results:  
Successful merge

KDE Frameworks 5.21.0
Qt 5.6.0
Comment 1 nsane457 2016-05-14 05:10:47 UTC
> KDE Frameworks 5.21.0
> Qt 5.6.0

Sorry. It's actually built against KDE 4.14.19 and QT 4.8.7.
Comment 2 nsane457 2016-05-14 05:11:17 UTC
> KDE Frameworks 5.21.0
> Qt 5.6.0

Sorry. It's actually built against KDE 4.14.19 and QT 4.8.7.
Comment 3 nsane457 2016-05-14 05:35:06 UTC
If kdelibs-4.14.19 is built with GCC-5 (in my case gcc-5.3.0) it seems amarok has no problem building with GCC-5 either. But any other combination of GCC-5 and GCC-6 causes build failure.

Please note that for all builds of kdelibs-4.14.19, the following patches were applied from http://pkgs.fedoraproject.org/cgit/rpms/kdelibs.git/tree/?id=b459bc2531ad507b99e566dc78495d97478e3fca

kdelibs-4.14.17-gcc6_literals.patch
kdelibs-4.14.17-gcc6_narrowing_hack.patch
kdelibs-4.14.17-glibc_trunc.patch
Comment 4 Myriam Schweingruber 2016-05-14 19:49:54 UTC
(In reply to nsane457 from comment #3)
> If kdelibs-4.14.19 is built with GCC-5 (in my case gcc-5.3.0) it seems
> amarok has no problem building with GCC-5 either. But any other combination
> of GCC-5 and GCC-6 causes build failure.

Which is hardly surprising, you should use the same compiler for Amarok and its dependencies. Not sure this is really an amarok bug, more like a dependencies mismatch.
Comment 5 nsane457 2016-05-31 16:37:46 UTC
(In reply to Myriam Schweingruber from comment #4)

> Which is hardly surprising, you should use the same compiler for Amarok and
> its dependencies. Not sure this is really an amarok bug, more like a
> dependencies mismatch.

Agreed but that was just for testing's sake.  The following problem exists when amarok is compiled with GCC-6 (and kdelibs was also compiled with GCC-6).

> error: 'Playlists::Playlist::ModelStack' has not been declared
Comment 7 Evert Vorster 2016-06-01 14:22:27 UTC
Thanks for that patch. 

It's a one-liner fix.... It even had "fixme" in the line that is being fixed!

The patch fixed amarok-git package compile on Arch again...
Comment 8 Rex Dieter 2016-06-01 18:41:27 UTC
marking confirmed
Comment 9 Rex Dieter 2016-06-01 18:59:40 UTC
Git commit 9308403e1c8484052f277bf6de32ee07c93a4beb by Rex Dieter.
Committed on 01/06/2016 at 18:58.
Pushed by rdieter into branch 'master'.

gcc6 buildfix

courtesy of opensuse, thx

M  +2    -1    src/core-impl/playlists/types/file/xspf/XSPFPlaylist.cpp

http://commits.kde.org/amarok/9308403e1c8484052f277bf6de32ee07c93a4beb