Bug 5935

Summary: gtk+3 do_compile failed for qemumips64
Product: [Build System, Metadata & Runtime] OE-Core Reporter: Chen Qi <Qi.Chen>
Component: coreAssignee: valentin <valentin.popa>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Medium CC: meta.mr.watcher, meta.watcher
Version: 1.5   
Target Milestone: 1.6   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)
Attachments:
Description Flags
the patch none

Description Chen Qi 2014-03-10 08:56:04 UTC
Below is some error messages:

gtkcssselector.c:1229:3: note: in expansion of macro 'G_STATIC_ASSERT'
   G_STATIC_ASSERT (sizeof (gconstpointer) == sizeof (result));
   ^
gtkcssselector.c: In function 'decode_position':
/home/nxadm/nx/ala-blade46.1/builds-2014-03-09-205333/bcm-xlp_world_bd/bitbake_build/tmp/sysroots/bcm-xlp/usr/include/glib-2.0/glib/gmacros.h:181:53: error: size of array '_GStaticAssertCompileTimeAssertion_1' is negative
 #define G_STATIC_ASSERT(expr) typedef char G_PASTE (_GStaticAssertCompileTimeAssertion_, __COUNTER__)[(expr) ? 1 : -1] G_GNUC_UNUSED
                                                     ^
/home/nxadm/nx/ala-blade46.1/builds-2014-03-09-205333/bcm-xlp_world_bd/bitbake_build/tmp/sysroots/bcm-xlp/usr/include/glib-2.0/glib/gmacros.h:178:47: note: in definition of macro 'G_PASTE_ARGS'
 #define G_PASTE_ARGS(identifier1,identifier2) identifier1 ## identifier2
                                               ^
/home/nxadm/nx/ala-blade46.1/builds-2014-03-09-205333/bcm-xlp_world_bd/bitbake_build/tmp/sysroots/bcm-xlp/usr/include/glib-2.0/glib/gmacros.h:181:44: note: in expansion of macro 'G_PASTE'
 #define G_STATIC_ASSERT(expr) typedef char G_PASTE (_GStaticAssertCompileTimeAssertion_, __COUNTER__)[(expr) ? 1 : -1] G_GNUC_UNUSED
                                            ^
gtkcssselector.c:1254:3: note: in expansion of macro 'G_STATIC_ASSERT'
   G_STATIC_ASSERT (sizeof (gconstpointer) == sizeof (result));
   ^

========================================================================
After looking into this problem, I found the compiler thought that sizeof(void *) and sizeof(const void *) are of different sizes.

I'm really confused.

//Chen Qi
Comment 1 valentin 2014-03-11 13:13:17 UTC
The problem seems to be in glib, I'll have a look.
Comment 2 valentin 2014-03-11 14:02:46 UTC
Indeed it's a glib bug not a gtk+ one.
If gsize is unsigned long then probably gssize should be signed long and not signed int (see glibconfig.h). You can hard code gssize until a patch is provided.
Comment 3 valentin 2014-03-13 11:33:22 UTC
Created attachment 1813 [details]
the patch