[X2Go-Dev] Bug#993: gcc 6 compile error

Orion Poplawski orion at cora.nwra.com
Sat Feb 6 22:01:08 CET 2016


Package: x2godesktopsharing
Version: 3.1.1.2

x2godesktopsharing fails to compile with gcc 6 with:

sharetray.cpp: In constructor 'ShareTray::ShareTray()':
sharetray.cpp:97:46: error: call of overloaded 'abs(uint)' is ambiguous
       QDateTime::currentDateTime().toTime_t() ) <5 )
                                               ^
In file included from /usr/include/c++/6.0.0/cstdlib:75:0,
                  from /usr/include/c++/6.0.0/bits/stl_algo.h:59,
                  from /usr/include/c++/6.0.0/algorithm:62,
                  from /usr/include/QtCore/qglobal.h:68,
                  from /usr/include/QtCore/qnamespace.h:45,
                  from /usr/include/QtCore/qobjectdefs.h:45,
                  from /usr/include/QtGui/qwindowdefs.h:45,
                  from /usr/include/QtGui/qwidget.h:46,
                  from /usr/include/QtGui/qmainwindow.h:45,
                  from /usr/include/QtGui/QMainWindow:1,
                  from sharetray.h:14,
                  from sharetray.cpp:12:
/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++/6.0.0/bits/stl_algo.h:59:0,
                  from /usr/include/c++/6.0.0/algorithm:62,
                  from /usr/include/QtCore/qglobal.h:68,
                  from /usr/include/QtCore/qnamespace.h:45,
                  from /usr/include/QtCore/qobjectdefs.h:45,
                  from /usr/include/QtGui/qwindowdefs.h:45,
                  from /usr/include/QtGui/qwidget.h:46,
                  from /usr/include/QtGui/qmainwindow.h:45,
                  from /usr/include/QtGui/QMainWindow:1,
                  from sharetray.h:14,
                  from sharetray.cpp:12:
/usr/include/c++/6.0.0/cstdlib:180:3: note: candidate: long long int 
std::abs(long long int)
    abs(long long __x) { return __builtin_llabs (__x); }
    ^~~
/usr/include/c++/6.0.0/cstdlib:172:3: note: candidate: long int 
std::abs(long int)
    abs(long __i) { return __builtin_labs(__i); }
    ^~~

The attached patch casts the result to an int.

-- 
Orion Poplawski
Technical Manager                     303-415-9701 x222
NWRA, Boulder/CoRA Office             FAX: 303-415-9702
3380 Mitchell Lane                       orion at nwra.com
Boulder, CO 80301                   http://www.nwra.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: x2godesktopsharing-time.patch
Type: text/x-patch
Size: 584 bytes
Desc: not available
URL: <http://lists.x2go.org/pipermail/x2go-dev/attachments/20160206/da303904/attachment.bin>


More information about the x2go-dev mailing list