gst-omx plugin build error: size of array ‘_GStaticAssertCompileTimeAssertion_1’ is negative
Hao Kai
leonkaihao at outlook.com
Thu Apr 13 05:54:46 UTC 2017
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20170413/80ec48b2/attachment.html>
More information about the gstreamer-devel
mailing list