Intel® C++ Compiler
Community support and assistance for creating C++ code that runs on platforms based on Intel® processors.

compilation problem

Simplistik__Ketiw
511 Views

Dear All,

I stumbled upon the compilation problem.

platform: Ubuntu 16.04

icpc version 16.0.2 (gcc version 5.0.0 compatibility)

Problem: there is a package which I would like to compile with the intel compilers and it produces the error /usr/include/glib-2.0/glib/gtypes.h(423): error: identifier "__builtin_uaddll_overflow" is undefined

I found that the problem is related to gtk+-2.0 and when I tried to compile simple program

#include <gtk/gtk.h>

int main( int   argc,
          char *argv[] )
{
    GtkWidget *window;
    
    gtk_init (&argc, &argv);
    
    window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
    gtk_widget_show  (window);
    
    gtk_main ();
    
    return 0;
}

with icpc test.c -o test `pkg-config --cflags --libs gtk+-2.0`

I got the same error:

In file included from /usr/include/glib-2.0/glib/galloca.h(32),
                 from /usr/include/glib-2.0/glib.h(30),
                 from /usr/include/glib-2.0/gobject/gbinding.h(28),
                 from /usr/include/glib-2.0/glib-object.h(23),
                 from /usr/include/glib-2.0/gio/gioenums.h(28),
                 from /usr/include/glib-2.0/gio/giotypes.h(28),
                 from /usr/include/glib-2.0/gio/gio.h(26),
                 from /usr/include/gtk-2.0/gdk/gdkapplaunchcontext.h(30),
                 from /usr/include/gtk-2.0/gdk/gdk.h(32),
                 from /usr/include/gtk-2.0/gtk/gtk.h(32),
                 from test.c(1):
/usr/include/glib-2.0/glib/gtypes.h(418): error: identifier "__builtin_uadd_overflow" is undefined
    return !__builtin_uadd_overflow(a, b, dest); }
            ^

In file included from /usr/include/glib-2.0/glib/galloca.h(32),
                 from /usr/include/glib-2.0/glib.h(30),
                 from /usr/include/glib-2.0/gobject/gbinding.h(28),
                 from /usr/include/glib-2.0/glib-object.h(23),
                 from /usr/include/glib-2.0/gio/gioenums.h(28),
                 from /usr/include/glib-2.0/gio/giotypes.h(28),
                 from /usr/include/glib-2.0/gio/gio.h(26),
                 from /usr/include/gtk-2.0/gdk/gdkapplaunchcontext.h(30),
                 from /usr/include/gtk-2.0/gdk/gdk.h(32),
                 from /usr/include/gtk-2.0/gtk/gtk.h(32),
                 from test.c(1):
/usr/include/glib-2.0/glib/gtypes.h(420): error: identifier "__builtin_umul_overflow" is undefined
    return !__builtin_umul_overflow(a, b, dest); }
            ^

In file included from /usr/include/glib-2.0/glib/galloca.h(32),
                 from /usr/include/glib-2.0/glib.h(30),
                 from /usr/include/glib-2.0/gobject/gbinding.h(28),
                 from /usr/include/glib-2.0/glib-object.h(23),
                 from /usr/include/glib-2.0/gio/gioenums.h(28),
                 from /usr/include/glib-2.0/gio/giotypes.h(28),
                 from /usr/include/glib-2.0/gio/gio.h(26),
                 from /usr/include/gtk-2.0/gdk/gdkapplaunchcontext.h(30),
                 from /usr/include/gtk-2.0/gdk/gdk.h(32),
                 from /usr/include/gtk-2.0/gtk/gtk.h(32),
                 from test.c(1):
/usr/include/glib-2.0/glib/gtypes.h(423): error: identifier "__builtin_uaddll_overflow" is undefined
    return !__builtin_uaddll_overflow(a, b, (unsigned long long *) dest); }
            ^

In file included from /usr/include/glib-2.0/glib/galloca.h(32),
                 from /usr/include/glib-2.0/glib.h(30),
                 from /usr/include/glib-2.0/gobject/gbinding.h(28),
                 from /usr/include/glib-2.0/glib-object.h(23),
                 from /usr/include/glib-2.0/gio/gioenums.h(28),
                 from /usr/include/glib-2.0/gio/giotypes.h(28),
                 from /usr/include/glib-2.0/gio/gio.h(26),
                 from /usr/include/gtk-2.0/gdk/gdkapplaunchcontext.h(30),
                 from /usr/include/gtk-2.0/gdk/gdk.h(32),
                 from /usr/include/gtk-2.0/gtk/gtk.h(32),
                 from test.c(1):
/usr/include/glib-2.0/glib/gtypes.h(425): error: identifier "__builtin_umulll_overflow" is undefined
    return !__builtin_umulll_overflow(a, b, (unsigned long long *) dest); }
            ^

compilation aborted for test.c (code 2)

Not to mentioned that it is no problem to compile it with g++.

 

Best regards,

Ketiw

 

 

 

 

 

0 Kudos
1 Reply
Judith_W_Intel
Employee
511 Views

 

I can reproduce the problem with version 16 and version 17 but it looks to be fixed in our latest release (18.0).

 

0 Kudos
Reply