<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Arial,Helvetica,sans-serif;" dir="ltr">
<p></p>
<div>Dear All:</div>
<div><br>
</div>
<div>I encountered a weird compiling problem on gst-omx.</div>
<div><br>
</div>
<div>my build env:</div>
<div><br>
</div>
<div>    gst-omx Version: Tag 1.11.90</div>
<div>    OS Description: Ubuntu 16.04.2 LTS 64bit</div>
<div>    Cerbero version: Tag 1.11.90</div>
<div><br>
</div>
<div>Before building gst-omx, I have successfully built gstreamer sdk 1.0 for tag 1.11.90 with target
<span>cross-android.cbc</span></div>
<div><br>
</div>
<div>My gst-omx Build Command: </div>
<div><br>
</div>
<div>    $./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</div>
<div>    $make</div>
<div><br>
</div>
<div>Then I got the following error msg:</div>
<div><br>
</div>
<div>
<div><span style="color: rgb(255, 0, 0);">gstomxbufferpool.c: In function ¡®gst_omx_memory_allocator_get_type¡¯:</span></div>
<div><span style="color: rgb(255, 0, 0);">/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</span></div>
<div><span style="color: rgb(255, 0, 0);"> #define G_STATIC_ASSERT(expr) typedef char G_PASTE (_GStaticAssertCompileTimeAssertion_, __COUNTER__)[(expr) ? 1 : -1] G_GNUC_UNUSED</span></div>
<div><span style="color: rgb(255, 0, 0);">                                                     ^</span></div>
<div><span style="color: rgb(255, 0, 0);">/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¡¯</span></div>
<div><span style="color: rgb(255, 0, 0);"> #define G_PASTE_ARGS(identifier1,identifier2) identifier1 ## identifier2</span></div>
<div><span style="color: rgb(255, 0, 0);">                                               ^</span></div>
<div><span style="color: rgb(255, 0, 0);">/home/leon/tools/cerbero/build/dist/android_arm/include/glib-2.0/glib/gmacros.h:232:44: note: in expansion of macro ¡®G_PASTE¡¯</span></div>
<div><span style="color: rgb(255, 0, 0);"> #define G_STATIC_ASSERT(expr) typedef char G_PASTE (_GStaticAssertCompileTimeAssertion_, __COUNTER__)[(expr) ? 1 : -1] G_GNUC_UNUSED</span></div>
<div><span style="color: rgb(255, 0, 0);">                                            ^</span></div>
<div><span style="color: rgb(255, 0, 0);">/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¡¯</span></div>
<div><span style="color: rgb(255, 0, 0);">     G_STATIC_ASSERT (sizeof *(location) == sizeof (gpointer));       \</span></div>
<div><span style="color: rgb(255, 0, 0);">     ^</span></div>
<div><span style="color: rgb(255, 0, 0);">/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¡¯</span></div>
<div><span style="color: rgb(255, 0, 0);">   if (g_once_init_enter (&g_define_type_id__volatile))  \</span></div>
<div><span style="color: rgb(255, 0, 0);">       ^</span></div>
<div><span style="color: rgb(255, 0, 0);">/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¡¯</span></div>
<div><span style="color: rgb(255, 0, 0);"> #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()</span></div>
<div><span style="color: rgb(255, 0, 0);">                                                            ^</span></div>
<div><span style="color: rgb(255, 0, 0);">/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¡¯</span></div>
<div><span style="color: rgb(255, 0, 0);"> #define G_DEFINE_TYPE(TN, t_n, T_P)       G_DEFINE_TYPE_EXTENDED (TN, t_n, T_P, 0, {})</span></div>
<div><span style="color: rgb(255, 0, 0);">                                           ^</span></div>
<div><span style="color: rgb(255, 0, 0);">gstomxbufferpool.c:97:1: note: in expansion of macro ¡®G_DEFINE_TYPE¡¯</span></div>
<div><span style="color: rgb(255, 0, 0);"> G_DEFINE_TYPE (GstOMXMemoryAllocator, gst_omx_memory_allocator,</span></div>
<div><span style="color: rgb(255, 0, 0);"> ^</span></div>
<div><span style="color: rgb(255, 0, 0);">In file included from /home/leon/tools/cerbero/build/dist/android_arm/include/glib-2.0/glib/gasyncqueue.h:32:0,</span></div>
<div><span style="color: rgb(255, 0, 0);">                 from /home/leon/tools/cerbero/build/dist/android_arm/include/glib-2.0/glib.h:32,</span></div>
<div><span style="color: rgb(255, 0, 0);">                 from /home/leon/tools/cerbero/build/dist/android_arm/include/gstreamer-1.0/gst/gst.h:27,</span></div>
<div><span style="color: rgb(255, 0, 0);">                 from gstomxbufferpool.h:28,</span></div>
<div><span style="color: rgb(255, 0, 0);">                 from gstomxbufferpool.c:27:</span></div>
<div><br>
</div>
</div>
<div><br>
</div>
<div>This problem may be located on </div>
<div>`G_STATIC_ASSERT (sizeof *(location) == sizeof (gpointer));`</div>
<div><br>
</div>
<div>I have checked the glib library in cerbero build folder, 'location' reflects to `&g_define_type_id_volatile`.</div>
<div><br>
</div>
<div>Original definition is `static volatile gsize g_define_type_id_volatile = 0;` and type definitions are:</div>
<div><br>
</div>
<div>    gtypes.h(77):  typedef void* gpointer;</div>
<div>    glibconfig.h(60): typedef unsigned int gsize;</div>
<div><br>
</div>
<div>But I have no idea what cause this problem, and how to avoid this issue.</div>
<div>Does anyone can help me? Thanks a lot!</div>
<div><br>
</div>
<div>Best Regards</div>
<div>Leon</div>
<br>
<p></p>
</div>
</body>
</html>