[oe] glib-2.0_2.22.1 breaks build of mc

Khem Raj raj.khem at gmail.com
Wed Oct 14 16:59:21 UTC 2009


On Wed, Oct 14, 2009 at 7:51 AM, David Kozub <zub at linux.fjfi.cvut.cz> wrote:
> 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

I already applied your patch. Thanks for submitting it.

>
> David
>
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel at lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel
>




More information about the Openembedded-devel mailing list