Bug 399052

Summary: Compilation fails on __attribute__((fallthrough))
Product: [Applications] amarok Reporter: Eyal Rozenberg <eyalroz1>
Component: generalAssignee: Amarok Bugs <amarok-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: heiko.becker
Priority: NOR    
Version First Reported In: 2.9.0   
Target Milestone: kf5   
Platform: Debian stable   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Eyal Rozenberg 2018-09-25 13:18:50 UTC
I'm trying to build Amarok 2.9.0 on a Debian Stretch machine (well, Devuan ASCII, but it's essentially the same), after having manually built and installed Googletest (inc. Google Mock) and neopomuk-core, which I couldn't obtained using distribution packages.

CMake passes fine, with all optional packages located, but compilation fails:

/usr/local/src/amarok-2.9.0/src/playlist/proxymodels/SortAlgorithms.cpp: In member function ‘bool Playlist::multilevelLessThan::operator()(const QAbstractItemModel*, int, int) const’:
/usr/local/src/amarok-2.9.0/src/playlist/proxymodels/SortAlgorithms.cpp:98:21: error: expected primary-expression before ‘__attribute__’
                     __attribute__ ((fallthrough));
                     ^~~~~~~~~~~~~
src/CMakeFiles/amaroklib.dir/build.make:2712: recipe for target 'src/CMakeFiles/amaroklib.dir/playlist/proxymodels/SortAlgorithms.cpp.o' failed


If I comment-out the attribute, compilation (of that file at least) succeeds. I'm using the following compiler: g++ (Debian 6.3.0-18+deb9u1) 6.3.0 20170516