Project

General

Profile

Actions

Emulator Issues #10906

closed

Compilation failure, "call of overloaded `abs(flaot&)` is ambiguous

Added by PureTryOut over 6 years ago. Updated over 6 years ago.

Status:
Fixed
Priority:
Normal
Assignee:
-
% Done:

0%

Operating system:
Linux
Issue type:
Bug
Milestone:
Regression:
No
Relates to usability:
No
Relates to performance:
No
Easy:
No
Relates to maintainability:
No
Regression start:
Fixed in:

Description

Currently, Dolphin has been failing to build for me for a few days already (pulling the latest develop every time). I'm probably missing some information, so please tell me if I do.

[ 89%] Building CXX object Source/Core/DolphinQt2/CMakeFiles/dolphin-emu-qt2.dir/Config/Mapping/MappingIndicator.cpp.o
/home/*****/Git/dolphin-emulator/Source/Core/DolphinQt2/Config/Mapping/MappingIndicator.cpp: In member function ‘void MappingIndicator::DrawStick()’:
/home/*****/Git/dolphin-emulator/Source/Core/DolphinQt2/Config/Mapping/MappingIndicator.cpp:174:15: error: call of overloaded ‘abs(float&)’ is ambiguous
   if (abs(curx) < deadzone && abs(cury) < deadzone)
               ^
In file included from /usr/lib/gcc/x86_64-pc-linux-gnu/6.4.0/include/g++-v6/cstdlib:75:0,
                 from /usr/lib/gcc/x86_64-pc-linux-gnu/6.4.0/include/g++-v6/bits/stl_algo.h:59,
                 from /usr/lib/gcc/x86_64-pc-linux-gnu/6.4.0/include/g++-v6/algorithm:62,
                 from /usr/include/qt5/QtCore/qglobal.h:94,
                 from /usr/include/qt5/QtGui/qwindowdefs.h:43,
                 from /usr/include/qt5/QtWidgets/qwidget.h:43,
                 from /usr/include/qt5/QtWidgets/QWidget:1,
                 from /home/*****/Git/dolphin-emulator/Source/Core/DolphinQt2/Config/Mapping/MappingIndicator.h:5,
                 from /home/*****/Git/dolphin-emulator/Source/Core/DolphinQt2/Config/Mapping/MappingIndicator.cpp:5:
/usr/include/stdlib.h:751:12: note: candidate: int abs(int)
 extern int abs (int __x) __THROW __attribute__ ((__const__)) __wur;
            ^~~
In file included from /usr/lib/gcc/x86_64-pc-linux-gnu/6.4.0/include/g++-v6/bits/stl_algo.h:59:0,
                 from /usr/lib/gcc/x86_64-pc-linux-gnu/6.4.0/include/g++-v6/algorithm:62,
                 from /usr/include/qt5/QtCore/qglobal.h:94,
                 from /usr/include/qt5/QtGui/qwindowdefs.h:43,
                 from /usr/include/qt5/QtWidgets/qwidget.h:43,
                 from /usr/include/qt5/QtWidgets/QWidget:1,
                 from /home/*****/Git/dolphin-emulator/Source/Core/DolphinQt2/Config/Mapping/MappingIndicator.h:5,
                 from /home/*****/Git/dolphin-emulator/Source/Core/DolphinQt2/Config/Mapping/MappingIndicator.cpp:5:
/usr/lib/gcc/x86_64-pc-linux-gnu/6.4.0/include/g++-v6/cstdlib:180:3: note: candidate: long long int std::abs(long long int)
   abs(long long __x) { return __builtin_llabs (__x); }
   ^~~
/usr/lib/gcc/x86_64-pc-linux-gnu/6.4.0/include/g++-v6/cstdlib:172:3: note: candidate: long int std::abs(long int)
   abs(long __i) { return __builtin_labs(__i); }
   ^~~
/home/*****/Git/dolphin-emulator/Source/Core/DolphinQt2/Config/Mapping/MappingIndicator.cpp:174:39: error: call of overloaded ‘abs(float&)’ is ambiguous
   if (abs(curx) < deadzone && abs(cury) < deadzone)
                                       ^
In file included from /usr/lib/gcc/x86_64-pc-linux-gnu/6.4.0/include/g++-v6/cstdlib:75:0,
                 from /usr/lib/gcc/x86_64-pc-linux-gnu/6.4.0/include/g++-v6/bits/stl_algo.h:59,
                 from /usr/lib/gcc/x86_64-pc-linux-gnu/6.4.0/include/g++-v6/algorithm:62,
                 from /usr/include/qt5/QtCore/qglobal.h:94,
                 from /usr/include/qt5/QtGui/qwindowdefs.h:43,
                 from /usr/include/qt5/QtWidgets/qwidget.h:43,
                 from /usr/include/qt5/QtWidgets/QWidget:1,
                 from /home/*****/Git/dolphin-emulator/Source/Core/DolphinQt2/Config/Mapping/MappingIndicator.h:5,
                 from /home/*****/Git/dolphin-emulator/Source/Core/DolphinQt2/Config/Mapping/MappingIndicator.cpp:5:
/usr/include/stdlib.h:751:12: note: candidate: int abs(int)
 extern int abs (int __x) __THROW __attribute__ ((__const__)) __wur;
            ^~~
In file included from /usr/lib/gcc/x86_64-pc-linux-gnu/6.4.0/include/g++-v6/bits/stl_algo.h:59:0,
                 from /usr/lib/gcc/x86_64-pc-linux-gnu/6.4.0/include/g++-v6/algorithm:62,
                 from /usr/include/qt5/QtCore/qglobal.h:94,
                 from /usr/include/qt5/QtGui/qwindowdefs.h:43,
                 from /usr/include/qt5/QtWidgets/qwidget.h:43,
                 from /usr/include/qt5/QtWidgets/QWidget:1,
                 from /home/*****/Git/dolphin-emulator/Source/Core/DolphinQt2/Config/Mapping/MappingIndicator.h:5,
                 from /home/*****/Git/dolphin-emulator/Source/Core/DolphinQt2/Config/Mapping/MappingIndicator.cpp:5:
/usr/lib/gcc/x86_64-pc-linux-gnu/6.4.0/include/g++-v6/cstdlib:180:3: note: candidate: long long int std::abs(long long int)
   abs(long long __x) { return __builtin_llabs (__x); }
   ^~~
/usr/lib/gcc/x86_64-pc-linux-gnu/6.4.0/include/g++-v6/cstdlib:172:3: note: candidate: long int std::abs(long int)
   abs(long __i) { return __builtin_labs(__i); }
   ^~~
/home/*****/Git/dolphin-emulator/Source/Core/DolphinQt2/Config/Mapping/MappingIndicator.cpp: In member function ‘void MappingIndicator::DrawMixedTriggers()’:
/home/*****/Git/dolphin-emulator/Source/Core/DolphinQt2/Config/Mapping/MappingIndicator.cpp:236:16: warning: suggest parentheses around ‘&&’ within ‘||’ [-Wparentheses]
   if (r_button && (r_button != r_analog) || (r_button == r_analog) && (r_analog > threshold))
       ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
/home/*****/Git/dolphin-emulator/Source/Core/DolphinQt2/Config/Mapping/MappingIndicator.cpp:241:16: warning: suggest parentheses around ‘&&’ within ‘||’ [-Wparentheses]
   if (l_button && (l_button != l_analog) || (l_button == l_analog) && (l_analog > threshold))
       ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
make[2]: *** [Source/Core/DolphinQt2/CMakeFiles/dolphin-emu-qt2.dir/build.make:1359: Source/Core/DolphinQt2/CMakeFiles/dolphin-emu-qt2.dir/Config/Mapping/MappingIndicator.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:1716: Source/Core/DolphinQt2/CMakeFiles/dolphin-emu-qt2.dir/all] Error 2
make: *** [Makefile:152: all] Error 2
Actions #1

Updated by leoetlino over 6 years ago

Is this still an issue in the latest version (5.0-6362-c08f6f0c53)?

Actions #2

Updated by PureTryOut over 6 years ago

Nope, your commits fixed it! Thanks!

Actions #3

Updated by Helios over 6 years ago

  • Status changed from New to Fixed
  • Operating system Linux added
  • Operating system deleted (N/A)
Actions

Also available in: Atom PDF