After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 769104 - Build failure when using _GLIB_CHECKED_ADD_U32 with the Intel compiler
Build failure when using _GLIB_CHECKED_ADD_U32 with the Intel compiler
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: general
2.49.x
Other Linux
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2016-07-23 04:25 UTC by Thiago Macieira
Modified: 2016-08-06 10:52 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Workaround patch (921 bytes, patch)
2016-07-23 04:26 UTC, Thiago Macieira
none Details | Review

Description Thiago Macieira 2016-07-23 04:25:21 UTC
The Intel compiler pretends to be GCC on Linux, but it doesn't have __builtin_uadd_overflow. Instead, one has to use _addcarry_u32 (see https://software.intel.com/en-us/node/523867).

Error:
/usr/include/glib-2.0/glib/gtypes.h(418): error: identifier "__builtin_uadd_overflow" is undefined
    return !__builtin_uadd_overflow(a, b, dest); }
            ^
Comment 1 Thiago Macieira 2016-07-23 04:26:50 UTC
Created attachment 332020 [details] [review]
Workaround patch

This just fixes the build error without implementing the ICC equivalent code.
Comment 2 Colin Walters 2016-07-23 13:30:11 UTC
I pushed a slightly tweaked version of this with an added comment, to save someone an annotate later.  I also changed the subject to be a bit more descriptive.

Thanks for the patch!

https://git.gnome.org/browse/glib/commit/?id=a5f209bc656177a25586c461631fc5ea5459449f
Comment 3 Thiago Macieira 2016-07-23 18:54:14 UTC
Thanks Colin.
Comment 4 rakhimov 2016-08-06 10:52:11 UTC
Thread in Intel forum for some workarounds by nemegu.
https://software.intel.com/en-us/node/672348