Bug#836927: assaultcube: FTBFS with GCC 6: error: 'float round(float)' conflicts with a previous declaration

Andreas Beckmann anbe at debian.org
Wed Sep 7 10:03:29 UTC 2016


Source: assaultcube
Version: 1.1.0.4+dfsg2-1.1
Severity: serious
Justification: fails to build from source (but built successfully in the past)

Hi,

assaultcube FTBFS since the switch to GCC 6 (which defaults to -std=c++14) was made:

[...]
g++ -O3 -fomit-frame-pointer -g -Wall -fsigned-char -rdynamic -I. -Ibot -I../enet/include -I/usr/include `sdl-config --cflags` -idirafter ../include -o cube.h.gch.tmp cube.h
In file included from cube.h:8:0:
tools.h: In function 'float round(float)':
tools.h:58:34: error: 'float round(float)' conflicts with a previous declaration
 static inline float round(float x) { return floor(x + 0.5f); }
                                  ^
In file included from /usr/include/c++/6/math.h:36:0,
                 from platform.h:9,
                 from cube.h:7:
/usr/include/c++/6/cmath:1708:3: note: previous declaration 'constexpr float std::round(float)'
   round(float __x)
   ^~~~~
In file included from cube.h:53:0:
protos.h: In member function 'bool servercommandline::checkarg(const char*)':
protos.h:914:17: warning: this 'else' clause does not guard... [-Wmisleading-indentation]
                 else if(ai > 0) maxdemos = ai; break;
                 ^~~~
protos.h:914:48: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the 'else'
                 else if(ai > 0) maxdemos = ai; break;
                                                ^~~~~
Makefile:138: recipe for target 'cube.h.gch' failed
make[1]: *** [cube.h.gch] Error 1


Andreas



More information about the Pkg-games-devel mailing list