Mir source in xenial (0.21.0) fails to build

Bug #1592691 reported by Matthias Klose on 2016-06-15
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mir
Invalid
Low
Unassigned
0.21
Fix Committed
Low
Brandon Schaefer
mir (Ubuntu)
High
Unassigned
Xenial
High
Unassigned

Bug Description

seen in a xenial test rebuild using ppa:ubuntu-toolchain-r/ppa
http://people.ubuntuwire.org/~wgrant/rebuild-ftbfs-test/test-rebuild-20160614-xenial.html

In file included from /«BUILDDIR»/mir-0.21.0+16.04.20160330/tests/unit-tests/input/evdev/test_libinput_device.cpp:31:0:
/«BUILDDIR»/mir-0.21.0+16.04.20160330/include/test/mir/test/event_matchers.h: In instantiation of ‘bool mir::test::TouchContactMatcherP4<slot_type, action_type, x_type, y_type>::gmock_Impl<arg_type>::MatchAndExplain(arg_type, testing::MatchResultListener*) const [with arg_type = MirEvent&; slot_type = int; action_type = MirTouchAction; x_type = float; y_type = float]’:
/«BUILDDIR»/mir-0.21.0+16.04.20160330/tests/unit-tests/input/evdev/test_libinput_device.cpp:752:1: required from here
/«BUILDDIR»/mir-0.21.0+16.04.20160330/include/test/mir/test/event_matchers.h:340:17: error: call of overloaded ‘abs(float)’ is ambiguous
     if (std::abs(mir_touch_event_axis_value(tev, slot, mir_touch_axis_x) - x) > 0.5f)
                 ^
In file included from /usr/include/c++/5/cstdlib:72:0,
                 from /usr/include/c++/5/bits/stl_algo.h:59,
                 from /usr/include/c++/5/algorithm:62,
                 from /usr/include/gmock/gmock-actions.h:43,
                 from /usr/include/gmock/gmock.h:58,
                 from /«BUILDDIR»/mir-0.21.0+16.04.20160330/tests/unit-tests/precompiled.hpp:22:
/usr/include/stdlib.h:774:12: note: candidate: int abs(int)
 extern int abs (int __x) __THROW __attribute__ ((__const__)) __wur;
            ^
In file included from /usr/include/c++/5/bits/stl_algo.h:59:0,
                 from /usr/include/c++/5/algorithm:62,
                 from /usr/include/gmock/gmock-actions.h:43,
                 from /usr/include/gmock/gmock.h:58,
                 from /«BUILDDIR»/mir-0.21.0+16.04.20160330/tests/unit-tests/precompiled.hpp:22:
/usr/include/c++/5/cstdlib:166:3: note: candidate: long int std::abs(long int)
   abs(long __i) { return __builtin_labs(__i); }
   ^
/usr/include/c++/5/cstdlib:174:3: note: candidate: long long int std::abs(long long int)
   abs(long long __x) { return __builtin_llabs (__x); }
   ^
In file included from /«BUILDDIR»/mir-0.21.0+16.04.20160330/tests/unit-tests/input/evdev/test_libinput_device.cpp:31:0:
/«BUILDDIR»/mir-0.21.0+16.04.20160330/include/test/mir/test/event_matchers.h:342:17: error: call of overloaded ‘abs(float)’ is ambiguous
     if (std::abs(mir_touch_event_axis_value(tev, slot, mir_touch_axis_y) - y) > 0.5f)
                 ^
In file included from /usr/include/c++/5/cstdlib:72:0,
                 from /usr/include/c++/5/bits/stl_algo.h:59,
                 from /usr/include/c++/5/algorithm:62,
                 from /usr/include/gmock/gmock-actions.h:43,
                 from /usr/include/gmock/gmock.h:58,
                 from /«BUILDDIR»/mir-0.21.0+16.04.20160330/tests/unit-tests/precompiled.hpp:22:
/usr/include/stdlib.h:774:12: note: candidate: int abs(int)
 extern int abs (int __x) __THROW __attribute__ ((__const__)) __wur;
            ^
In file included from /usr/include/c++/5/bits/stl_algo.h:59:0,
                 from /usr/include/c++/5/algorithm:62,
                 from /usr/include/gmock/gmock-actions.h:43,
                 from /usr/include/gmock/gmock.h:58,
                 from /«BUILDDIR»/mir-0.21.0+16.04.20160330/tests/unit-tests/precompiled.hpp:22:
/usr/include/c++/5/cstdlib:166:3: note: candidate: long int std::abs(long int)
   abs(long __i) { return __builtin_labs(__i); }
   ^
/usr/include/c++/5/cstdlib:174:3: note: candidate: long long int std::abs(long long int)
   abs(long long __x) { return __builtin_llabs (__x); }
   ^
In file included from /«BUILDDIR»/mir-0.21.0+16.04.20160330/tests/unit-tests/input/evdev/test_libinput_device.cpp:31:0:
/«BUILDDIR»/mir-0.21.0+16.04.20160330/include/test/mir/test/event_matchers.h: In instantiation of ‘bool mir::test::TouchEventMatcherP2<x_type, y_type>::gmock_Impl<arg_type>::MatchAndExplain(arg_type, testing::MatchResultListener*) const [with arg_type = MirEvent&; x_type = float; y_type = float]’:
/«BUILDDIR»/mir-0.21.0+16.04.20160330/tests/unit-tests/input/evdev/test_libinput_device.cpp:752:1: required from here
/«BUILDDIR»/mir-0.21.0+16.04.20160330/include/test/mir/test/event_matchers.h:324:17: error: call of overloaded ‘abs(float)’ is ambiguous
     if (std::abs(mir_touch_event_axis_value(tev, 0, mir_touch_axis_x) - x) > 0.5f)
                 ^
In file included from /usr/include/c++/5/cstdlib:72:0,
                 from /usr/include/c++/5/bits/stl_algo.h:59,
                 from /usr/include/c++/5/algorithm:62,
                 from /usr/include/gmock/gmock-actions.h:43,
                 from /usr/include/gmock/gmock.h:58,
                 from /«BUILDDIR»/mir-0.21.0+16.04.20160330/tests/unit-tests/precompiled.hpp:22:
/usr/include/stdlib.h:774:12: note: candidate: int abs(int)
 extern int abs (int __x) __THROW __attribute__ ((__const__)) __wur;
            ^
In file included from /usr/include/c++/5/bits/stl_algo.h:59:0,
                 from /usr/include/c++/5/algorithm:62,
                 from /usr/include/gmock/gmock-actions.h:43,
                 from /usr/include/gmock/gmock.h:58,
                 from /«BUILDDIR»/mir-0.21.0+16.04.20160330/tests/unit-tests/precompiled.hpp:22:
/usr/include/c++/5/cstdlib:166:3: note: candidate: long int std::abs(long int)
   abs(long __i) { return __builtin_labs(__i); }
   ^
/usr/include/c++/5/cstdlib:174:3: note: candidate: long long int std::abs(long long int)
   abs(long long __x) { return __builtin_llabs (__x); }
   ^
In file included from /«BUILDDIR»/mir-0.21.0+16.04.20160330/tests/unit-tests/input/evdev/test_libinput_device.cpp:31:0:
/«BUILDDIR»/mir-0.21.0+16.04.20160330/include/test/mir/test/event_matchers.h:326:17: error: call of overloaded ‘abs(float)’ is ambiguous
     if (std::abs(mir_touch_event_axis_value(tev, 0, mir_touch_axis_y) - y) > 0.5f)
                 ^
In file included from /usr/include/c++/5/cstdlib:72:0,
                 from /usr/include/c++/5/bits/stl_algo.h:59,
                 from /usr/include/c++/5/algorithm:62,
                 from /usr/include/gmock/gmock-actions.h:43,
                 from /usr/include/gmock/gmock.h:58,
                 from /«BUILDDIR»/mir-0.21.0+16.04.20160330/tests/unit-tests/precompiled.hpp:22:
/usr/include/stdlib.h:774:12: note: candidate: int abs(int)
 extern int abs (int __x) __THROW __attribute__ ((__const__)) __wur;
            ^
In file included from /usr/include/c++/5/bits/stl_algo.h:59:0,
                 from /usr/include/c++/5/algorithm:62,
                 from /usr/include/gmock/gmock-actions.h:43,
                 from /usr/include/gmock/gmock.h:58,
                 from /«BUILDDIR»/mir-0.21.0+16.04.20160330/tests/unit-tests/precompiled.hpp:22:
/usr/include/c++/5/cstdlib:166:3: note: candidate: long int std::abs(long int)
   abs(long __i) { return __builtin_labs(__i); }
   ^
/usr/include/c++/5/cstdlib:174:3: note: candidate: long long int std::abs(long long int)
   abs(long long __x) { return __builtin_llabs (__x); }
   ^

Related branches

Alan Griffiths (alan-griffiths) wrote :

Looks like the missing "#include <cmath>" was added in 0.23

Changed in mir:
status: New → Confirmed
importance: Undecided → High
Changed in mir:
status: Confirmed → Won't Fix
status: Won't Fix → Invalid
Stephen M. Webb (bregma) on 2016-06-15
Changed in mir:
importance: High → Low
Changed in mir (Ubuntu):
status: Confirmed → Triaged
Changed in mir (Ubuntu Xenial):
status: New → Triaged
importance: Undecided → High
Changed in mir (Ubuntu):
milestone: xenial-updates → none
Changed in mir (Ubuntu Xenial):
milestone: none → xenial-updates
summary: - mir fails to build in xenial
+ Mir source in xenial (0.21.0) fails to build
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers