Summary: | games-strategy/megaglest-3.6.0.3: fails to build with gcc 4.7 / glibc-2.16 | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Diego Elio Pettenò (RETIRED) <flameeyes> |
Component: | New packages | Assignee: | Julian Ospald <hasufell> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | games |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
URL: | https://tinderboxlogs.s3.amazonaws.com/tbamd64.excelsior.flameeyes.eu/games-strategy%3Amegaglest-3.6.0.3%3A20121029-124608.html | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 390247, 424737 |
Description
Diego Elio Pettenò (RETIRED)
2012-10-29 14:48:06 UTC
that one is easy, but there comes another one ========== /var/tmp/portage/games-strategy/megaglest-3.6.0.3/work/megaglest-3.6.0.3/source/glest_game/graphics/renderer.cpp:4298:55: required from here /var/tmp/portage/games-strategy/megaglest-3.6.0.3/work/megaglest-3.6.0.3/source/glest_game/../shared_lib/include/graphics/math_util.h:193:23: error: ‘min’ was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive] In file included from /usr/lib/gcc/x86_64-pc-linux-gnu/4.7.2/include/g++-v4/bits/char_traits.h:41:0, from /usr/lib/gcc/x86_64-pc-linux-gnu/4.7.2/include/g++-v4/string:42, from /var/tmp/portage/games-strategy/megaglest-3.6.0.3/work/megaglest-3.6.0.3/source/glest_game/../shared_lib/include/graphics/vec.h:17, from /var/tmp/portage/games-strategy/megaglest-3.6.0.3/work/megaglest-3.6.0.3/source/glest_game/graphics/renderer.h:15, from /var/tmp/portage/games-strategy/megaglest-3.6.0.3/work/megaglest-3.6.0.3/source/glest_game/graphics/renderer.cpp:11: /usr/lib/gcc/x86_64-pc-linux-gnu/4.7.2/include/g++-v4/bits/stl_algobase.h:187:5: note: ‘template<class _Tp> const _Tp& std::min(const _Tp&, const _Tp&)’ declared here, later in the translation unit In file included from /var/tmp/portage/games-strategy/megaglest-3.6.0.3/work/megaglest-3.6.0.3/source/glest_game/graphics/renderer.h:16:0, from /var/tmp/portage/games-strategy/megaglest-3.6.0.3/work/megaglest-3.6.0.3/source/glest_game/graphics/renderer.cpp:11: /var/tmp/portage/games-strategy/megaglest-3.6.0.3/work/megaglest-3.6.0.3/source/glest_game/../shared_lib/include/graphics/math_util.h:193:23: error: ‘min’ was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive] In file included from /usr/lib/gcc/x86_64-pc-linux-gnu/4.7.2/include/g++-v4/bits/char_traits.h:41:0, from /usr/lib/gcc/x86_64-pc-linux-gnu/4.7.2/include/g++-v4/string:42, from /var/tmp/portage/games-strategy/megaglest-3.6.0.3/work/megaglest-3.6.0.3/source/glest_game/../shared_lib/include/graphics/vec.h:17, from /var/tmp/portage/games-strategy/megaglest-3.6.0.3/work/megaglest-3.6.0.3/source/glest_game/graphics/renderer.h:15, from /var/tmp/portage/games-strategy/megaglest-3.6.0.3/work/megaglest-3.6.0.3/source/glest_game/graphics/renderer.cpp:11: /usr/lib/gcc/x86_64-pc-linux-gnu/4.7.2/include/g++-v4/bits/stl_algobase.h:187:5: note: ‘template<class _Tp> const _Tp& std::min(const _Tp&, const _Tp&)’ declared here, later in the translation unit In file included from /var/tmp/portage/games-strategy/megaglest-3.6.0.3/work/megaglest-3.6.0.3/source/glest_game/graphics/renderer.h:16:0, from /var/tmp/portage/games-strategy/megaglest-3.6.0.3/work/megaglest-3.6.0.3/source/glest_game/graphics/renderer.cpp:11: /var/tmp/portage/games-strategy/megaglest-3.6.0.3/work/megaglest-3.6.0.3/source/glest_game/../shared_lib/include/graphics/math_util.h:193:23: error: ‘max’ was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive] In file included from /usr/lib/gcc/x86_64-pc-linux-gnu/4.7.2/include/g++-v4/bits/char_traits.h:41:0, from /usr/lib/gcc/x86_64-pc-linux-gnu/4.7.2/include/g++-v4/string:42, from /var/tmp/portage/games-strategy/megaglest-3.6.0.3/work/megaglest-3.6.0.3/source/glest_game/../shared_lib/include/graphics/vec.h:17, from /var/tmp/portage/games-strategy/megaglest-3.6.0.3/work/megaglest-3.6.0.3/source/glest_game/graphics/renderer.h:15, from /var/tmp/portage/games-strategy/megaglest-3.6.0.3/work/megaglest-3.6.0.3/source/glest_game/graphics/renderer.cpp:11: /usr/lib/gcc/x86_64-pc-linux-gnu/4.7.2/include/g++-v4/bits/stl_algobase.h:254:5: note: ‘template<class _Tp, class _Compare> const _Tp& std::max(const _Tp&, const _Tp&, _Compare)’ declared here, later in the translation unit In file included from /var/tmp/portage/games-strategy/megaglest-3.6.0.3/work/megaglest-3.6.0.3/source/glest_game/graphics/renderer.h:16:0, from /var/tmp/portage/games-strategy/megaglest-3.6.0.3/work/megaglest-3.6.0.3/source/glest_game/graphics/renderer.cpp:11: /var/tmp/portage/games-strategy/megaglest-3.6.0.3/work/megaglest-3.6.0.3/source/glest_game/../shared_lib/include/graphics/math_util.h:193:23: error: ‘max’ was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive] ========= I seem to have fixed it via --- source/shared_lib/include/graphics/math_util.h +++ source/shared_lib/include/graphics/math_util.h @@ -12,6 +12,7 @@ #ifndef _SHARED_GRAPHICS_MATHUTIL_H_ #define _SHARED_GRAPHICS_MATHUTIL_H_ +#include <algorithm> #include "math_wrapper.h" #include "vec.h" #include "leak_dumper.h" @@ -184,10 +185,10 @@ Rect2<T> computeBoundingRect() const{ return Rect2i( - min(p[0].x, p[1].x), - min(p[0].y, p[2].y), - max(p[2].x, p[3].x), - max(p[1].y, p[3].y)); + std::min(p[0].x, p[1].x), + std::min(p[0].y, p[2].y), + std::max(p[2].x, p[3].x), + std::max(p[1].y, p[3].y)); } bool isInside(const Vec2<T> &pt) const{ is that alright? yeah, apparently that was almost the same as what upstream already has in svn + 29 Oct 2012; Julian Ospald <hasufell@gentoo.org> megaglest-3.6.0.3.ebuild, + +files/megaglest-3.6.0.3-gcc-4.7.patch: + fix compilation for gcc-4.7 wrt #440134 |