KWIN in its current form, fails to build due to the error regarding overload on abs(qReal). This patch fixes the build issue on openSUSE and is actually very simple.
Details
Details
- Reviewers
apol graesslin - Group Reviewers
KWin - Commits
- R108:e7b27ab9555a: Fix build with clang and GCC6
Tested by building kwin on openSUSE TW which has GCC6 v6.3.1. The build now completes succesfully.
Kwin_x11 runs normally on the system, but I cannot test the gestures unfortunately
Diff Detail
Diff Detail
- Repository
- R108 KWin
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
Comment Actions
I have exactly the same problem with clang:
/home/apol/devel/frameworks/kwin/gestures.cpp:159:35: error: call to 'abs' is ambiguous if (std::abs(delta.width()) > std::abs(delta.height())) { ^~~~~~~~ /usr/include/stdlib.h:751:12: note: candidate function extern int abs (int __x) __THROW __attribute__ ((__const__)) __wur; ^ /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/6.3.1/../../../../include/c++/6.3.1/cstdlib:172:3: note: candidate function abs(long __i) { return __builtin_labs(__i); } ^ /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/6.3.1/../../../../include/c++/6.3.1/cstdlib:180:3: note: candidate function abs(long long __x) { return __builtin_llabs (__x); }