[oe] glib-2.0_2.22.1 breaks build of mc
David Kozub
zub at linux.fjfi.cvut.cz
Wed Oct 14 14:51:36 UTC 2009
Hello,
I bumped into an issue with glib-2.0_2.22.1. (dev branch,
MACHINE=omapzoom2, DISTRO=angstrom-2008.1)
The library itself builds ok, but then when building midnight commander,
do_compile choes, with the error being:
In file included from
/mnt/data/zoom2/OE/tmp/staging/armv7a-angstrom-linux-gnueabi/usr/include/glib-2.0/glib/gasyncqueue.h:34,
from
/mnt/data/zoom2/OE/tmp/staging/armv7a-angstrom-linux-gnueabi/usr/include/glib-2.0/glib.h:34,
from glibcompat.c:29:
/mnt/data/zoom2/OE/tmp/staging/armv7a-angstrom-linux-gnueabi/usr/include/glib-2.0/glib/gthread.h:
In function 'g_once_init_enter':
/mnt/data/zoom2/OE/tmp/staging/armv7a-angstrom-linux-gnueabi/usr/include/glib-2.0/glib/gthread.h:344:
error: size of array 'type name' is negative
The error message still leaves me in the dark as for what actually
happened. Anyway, the function in question looks like this:
G_INLINE_FUNC gboolean
g_once_init_enter (volatile gsize *value_location)
{
if G_LIKELY ((gpointer) g_atomic_pointer_get (value_location) != NULL)
return FALSE;
else
return g_once_init_enter_impl (value_location);
}
(line 344 is the g_atomic_pointer_get() call)
Changing the argument of g_atomic_pointer_get into:
(volatile gpointer *)value_location
seems to resolve the issue, but seeing the code for the first time - I
wonder if it's ok.
Anyway I did some digging arount the glib headers, and I think the
typecast is ok (as sizeof(gsize)==sizeof(gpointer), and that's hopefully
garanteed).
The trivial patch is here:
http://linux.fjfi.cvut.cz/~zub/g_once_init_enter.patch
David
More information about the Openembedded-devel
mailing list