Quantcast

gst-omx plugin build error: size of array ‘_GStaticAssertCompileTimeAssertion_1’ is negative

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

gst-omx plugin build error: size of array ‘_GStaticAssertCompileTimeAssertion_1’ is negative

leonkaihao

Dear All:

I encountered a weird compiling problem on gst-omx.

my build env:

    gst-omx Version: Tag 1.11.90
    OS Description: Ubuntu 16.04.2 LTS 64bit
    Cerbero version: Tag 1.11.90

Before building gst-omx, I have successfully built gstreamer sdk 1.0 for tag 1.11.90 with target cross-android.cbc

My gst-omx Build Command: 

    $./autogen.sh --host=arm-linux-androideabi --disable-gtk-doc --with-omx-target=generic --enable-static --prefix=/home/leon/tools/cerbero/omx --enable-static-plugins --disable-fatal-warnings
    $make

Then I got the following error msg:

gstomxbufferpool.c: In function ‘gst_omx_memory_allocator_get_type’:
/home/leon/tools/cerbero/build/dist/android_arm/include/glib-2.0/glib/gmacros.h:232: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/leon/tools/cerbero/build/dist/android_arm/include/glib-2.0/glib/gmacros.h:229:47: note: in definition of macro ‘G_PASTE_ARGS’
 #define G_PASTE_ARGS(identifier1,identifier2) identifier1 ## identifier2
                                               ^
/home/leon/tools/cerbero/build/dist/android_arm/include/glib-2.0/glib/gmacros.h:232: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
                                            ^
/home/leon/tools/cerbero/build/dist/android_arm/include/glib-2.0/glib/gthread.h:249:5: note: in expansion of macro ‘G_STATIC_ASSERT’
     G_STATIC_ASSERT (sizeof *(location) == sizeof (gpointer));       \
     ^
/home/leon/tools/cerbero/build/dist/android_arm/include/glib-2.0/gobject/gtype.h:1961:7: note: in expansion of macro ‘g_once_init_enter’
   if (g_once_init_enter (&g_define_type_id__volatile))  \
       ^
/home/leon/tools/cerbero/build/dist/android_arm/include/glib-2.0/gobject/gtype.h:1732:60: note: in expansion of macro ‘_G_DEFINE_TYPE_EXTENDED_BEGIN’
 #define G_DEFINE_TYPE_EXTENDED(TN, t_n, T_P, _f_, _C_)     _G_DEFINE_TYPE_EXTENDED_BEGIN (TN, t_n, T_P, _f_) {_C_;} _G_DEFINE_TYPE_EXTENDED_END()
                                                            ^
/home/leon/tools/cerbero/build/dist/android_arm/include/glib-2.0/gobject/gtype.h:1590:43: note: in expansion of macro ‘G_DEFINE_TYPE_EXTENDED’
 #define G_DEFINE_TYPE(TN, t_n, T_P)       G_DEFINE_TYPE_EXTENDED (TN, t_n, T_P, 0, {})
                                           ^
gstomxbufferpool.c:97:1: note: in expansion of macro ‘G_DEFINE_TYPE’
 G_DEFINE_TYPE (GstOMXMemoryAllocator, gst_omx_memory_allocator,
 ^
In file included from /home/leon/tools/cerbero/build/dist/android_arm/include/glib-2.0/glib/gasyncqueue.h:32:0,
                 from /home/leon/tools/cerbero/build/dist/android_arm/include/glib-2.0/glib.h:32,
                 from /home/leon/tools/cerbero/build/dist/android_arm/include/gstreamer-1.0/gst/gst.h:27,
                 from gstomxbufferpool.h:28,
                 from gstomxbufferpool.c:27:


This problem may be located on 
`G_STATIC_ASSERT (sizeof *(location) == sizeof (gpointer));`

I have checked the glib library in cerbero build folder, 'location' reflects to `&g_define_type_id_volatile`.

Original definition is `static volatile gsize g_define_type_id_volatile = 0;` and type definitions are:

    gtypes.h(77):  typedef void* gpointer;
    glibconfig.h(60): typedef unsigned int gsize;

But I have no idea what cause this problem, and how to avoid this issue.
Does anyone can help me? Thanks a lot!

Best Regards
Leon


_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: gst-omx plugin build error: size of array ‘_GStaticAssertCompileTimeAssertion_1’ is negative

Sebastian Dröge-3
On Thu, 2017-04-13 at 05:54 +0000, Hao Kai wrote:

> Dear All:
>
> I encountered a weird compiling problem on gst-omx.
>
> my build env:
>
>     gst-omx Version: Tag 1.11.90
>     OS Description: Ubuntu 16.04.2 LTS 64bit
>     Cerbero version: Tag 1.11.90
>
> Before building gst-omx, I have successfully built gstreamer sdk 1.0
> for tag 1.11.90 with target cross-android.cbc
>
> My gst-omx Build Command: 
>
>     $./autogen.sh --host=arm-linux-androideabi --disable-gtk-doc --
> with-omx-target=generic --enable-static --
> prefix=/home/leon/tools/cerbero/omx --enable-static-plugins --
> disable-fatal-warnings
>     $make
>
> Then I got the following error msg:
>
> gstomxbufferpool.c: In function ‘gst_omx_memory_allocator_get_type’:
> /home/leon/tools/cerbero/build/dist/android_arm/include/glib-
> 2.0/glib/gmacros.h:232: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
Usually that means that you're using GLib headers that are not for your
target platform, e.g. 64 bit GLib headers and 32 bit target platform.

--
Sebastian Dröge, Centricular Ltd · http://www.centricular.com
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

signature.asc (981 bytes) Download Attachment
Loading...