Unable to make libnice on ARMv7
@irfan
Submitted by Mohammed Irfan Assigned to Mohammed Irfan @irfan
Description
With a [[ https://github.com/GNOME/glib/commit/3d7534eae5e5421573e1f7cf76f6339cffeb903d | recent ]] glib built and installed on raspberry pi2 under /usr, I get the following errors upon doing "make" in libnice (sha: 0a2cb0a9)
In file included from /usr/include/glib-2.0/gobject/gobject.h:24:0,
from /usr/include/glib-2.0/gobject/gbinding.h:29,
from /usr/include/glib-2.0/glib-object.h:23,
from agent.h:147,
from component.h:47,
from component.c:58:
component.c: In function 'nice_component_constructed':
/usr/include/glib-2.0/gobject/gtype.h:2212:6: error: cast increases required alignment of target type [-Werror=cast-align]
((ct*) g_type_check_instance_cast ((GTypeInstance*) ip, gt))
^
/usr/include/glib-2.0/gobject/gtype.h:482:66: note: in expansion of macro '_G_TYPE_CIC'
#define G_TYPE_CHECK_INSTANCE_CAST(instance, g_type, c_type) (_G_TYPE_CIC ((instance), (g_type), c_type))
^
component.h:143:4: note: in expansion of macro 'G_TYPE_CHECK_INSTANCE_CAST'
(G_TYPE_CHECK_INSTANCE_CAST ((obj), NICE_TYPE_COMPONENT, NiceComponent))
^
component.c:1048:15: note: in expansion of macro 'NICE_COMPONENT'
component = NICE_COMPONENT (obj);
^
component.c: In function 'nice_component_get_property':
/usr/include/glib-2.0/gobject/gtype.h:2212:6: error: cast increases required alignment of target type [-Werror=cast-align]
((ct*) g_type_check_instance_cast ((GTypeInstance*) ip, gt))
^
/usr/include/glib-2.0/gobject/gtype.h:482:66: note: in expansion of macro '_G_TYPE_CIC'
#define G_TYPE_CHECK_INSTANCE_CAST(instance, g_type, c_type) (_G_TYPE_CIC ((instance), (g_type), c_type))
^
component.h:143:4: note: in expansion of macro 'G_TYPE_CHECK_INSTANCE_CAST'
(G_TYPE_CHECK_INSTANCE_CAST ((obj), NICE_TYPE_COMPONENT, NiceComponent)) [22/1524]
^
component.c:1062:15: note: in expansion of macro 'NICE_COMPONENT'
component = NICE_COMPONENT (obj);
^
component.c: In function 'nice_component_set_property':
/usr/include/glib-2.0/gobject/gtype.h:2212:6: error: cast increases required alignment of target type [-Werror=cast-align]
((ct*) g_type_check_instance_cast ((GTypeInstance*) ip, gt))
^
/usr/include/glib-2.0/gobject/gtype.h:482:66: note: in expansion of macro '_G_TYPE_CIC'
#define G_TYPE_CHECK_INSTANCE_CAST(instance, g_type, c_type) (_G_TYPE_CIC ((instance), (g_type), c_type))
^
component.h:143:4: note: in expansion of macro 'G_TYPE_CHECK_INSTANCE_CAST'
(G_TYPE_CHECK_INSTANCE_CAST ((obj), NICE_TYPE_COMPONENT, NiceComponent))
^
component.c:1089:15: note: in expansion of macro 'NICE_COMPONENT'
component = NICE_COMPONENT (obj);
^
component.c: In function 'nice_component_finalize':
/usr/include/glib-2.0/gobject/gtype.h:2212:6: error: cast increases required alignment of target type [-Werror=cast-align]
((ct*) g_type_check_instance_cast ((GTypeInstance*) ip, gt))
^
/usr/include/glib-2.0/gobject/gtype.h:482:66: note: in expansion of macro '_G_TYPE_CIC'
#define G_TYPE_CHECK_INSTANCE_CAST(instance, g_type, c_type) (_G_TYPE_CIC ((instance), (g_type), c_type))
^
component.h:143:4: note: in expansion of macro 'G_TYPE_CHECK_INSTANCE_CAST'
(G_TYPE_CHECK_INSTANCE_CAST ((obj), NICE_TYPE_COMPONENT, NiceComponent))
^
component.c:1117:9: note: in expansion of macro 'NICE_COMPONENT'
cmp = NICE_COMPONENT (obj);
^
cc1: all warnings being treated as errors
Makefile:532: recipe for target 'component.lo' failed
make[2]: *** [component.lo] Error 1
Is glib the problem here? But how could it be since it compiled and installed on ARMv7 without any issues? Also, I'm doing all of this in a docker container.