After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 669613 - deprecated use of g_value_array_get_nth error (when using jhbuild)
deprecated use of g_value_array_get_nth error (when using jhbuild)
Status: RESOLVED FIXED
Product: NetworkManager
Classification: Platform
Component: general
git master
Other Linux
: Normal normal
: ---
Assigned To: Dan Williams
Dan Williams
: 669901 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2012-02-07 22:19 UTC by parthasarathi susarla
Modified: 2012-05-17 13:49 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description parthasarathi susarla 2012-02-07 22:19:50 UTC
nm-param-spec-specialized.c: In function 'nm_gvalue_ip6_address_compare':
nm-param-spec-specialized.c:396:2: error: 'g_value_array_get_nth' is deprecated (declared at /opt/gnome/include/glib-2.0/gobject/gvaluearray.h:54): Use 'g_array_index' instead [-Werror=deprecated-declarations]
nm-param-spec-specialized.c:399:2: error: 'g_value_array_get_nth' is deprecated (declared at /opt/gnome/include/glib-2.0/gobject/gvaluearray.h:54): Use 'g_array_index' instead [-Werror=deprecated-declarations]
nm-param-spec-specialized.c:402:2: error: 'g_value_array_get_nth' is deprecated (declared at /opt/gnome/include/glib-2.0/gobject/gvaluearray.h:54): Use 'g_array_index' instead [-Werror=deprecated-declarations]
nm-param-spec-specialized.c:406:2: error: 'g_value_array_get_nth' is deprecated (declared at /opt/gnome/include/glib-2.0/gobject/gvaluearray.h:54): Use 'g_array_index' instead [-Werror=deprecated-declarations]
nm-param-spec-specialized.c:409:2: error: 'g_value_array_get_nth' is deprecated (declared at /opt/gnome/include/glib-2.0/gobject/gvaluearray.h:54): Use 'g_array_index' instead [-Werror=deprecated-declarations]
nm-param-spec-specialized.c:412:2: error: 'g_value_array_get_nth' is deprecated (declared at /opt/gnome/include/glib-2.0/gobject/gvaluearray.h:54): Use 'g_array_index' instead [-Werror=deprecated-declarations]
nm-param-spec-specialized.c: In function 'nm_gvalue_ip6_route_compare':
nm-param-spec-specialized.c:455:2: error: 'g_value_array_get_nth' is deprecated (declared at /opt/gnome/include/glib-2.0/gobject/gvaluearray.h:54): Use 'g_array_index' instead [-Werror=deprecated-declarations]
nm-param-spec-specialized.c:457:2: error: 'g_value_array_get_nth' is deprecated (declared at /opt/gnome/include/glib-2.0/gobject/gvaluearray.h:54): Use 'g_array_index' instead [-Werror=deprecated-declarations]
nm-param-spec-specialized.c:459:2: error: 'g_value_array_get_nth' is deprecated (declared at /opt/gnome/include/glib-2.0/gobject/gvaluearray.h:54): Use 'g_array_index' instead [-Werror=deprecated-declarations]
nm-param-spec-specialized.c:461:2: error: 'g_value_array_get_nth' is deprecated (declared at /opt/gnome/include/glib-2.0/gobject/gvaluearray.h:54): Use 'g_array_index' instead [-Werror=deprecated-declarations]
nm-param-spec-specialized.c:465:2: error: 'g_value_array_get_nth' is deprecated (declared at /opt/gnome/include/glib-2.0/gobject/gvaluearray.h:54): Use 'g_array_index' instead [-Werror=deprecated-declarations]
nm-param-spec-specialized.c:467:2: error: 'g_value_array_get_nth' is deprecated (declared at /opt/gnome/include/glib-2.0/gobject/gvaluearray.h:54): Use 'g_array_index' instead [-Werror=deprecated-declarations]
nm-param-spec-specialized.c:469:2: error: 'g_value_array_get_nth' is deprecated (declared at /opt/gnome/include/glib-2.0/gobject/gvaluearray.h:54): Use 'g_array_index' instead [-Werror=deprecated-declarations]
nm-param-spec-specialized.c:471:2: error: 'g_value_array_get_nth' is deprecated (declared at /opt/gnome/include/glib-2.0/gobject/gvaluearray.h:54): Use 'g_array_index' instead [-Werror=deprecated-declarations]
cc1: all warnings being treated as errors
Comment 1 parthasarathi susarla 2012-02-07 22:22:50 UTC
I encountered these build warnings when building NetworkManager using JHBuild. I didn't continue building further, so this might not be the only location that build errors might occur.
Comment 2 Frederic Peters 2012-02-11 18:25:59 UTC
*** Bug 669901 has been marked as a duplicate of this bug. ***
Comment 3 Tshepang Lekhonkhobe 2012-02-11 18:38:24 UTC
Here's a workaround:

$ echo 'module_autogenargs["NetworkManager"] = "--enable-more-warnings=no"' >>
~/.jhbuildrc
Comment 4 Jiri Klimes 2012-02-28 12:12:45 UTC
GValueArray has been  deprecated since glib 2.32. But, we require => glib 2.22.
So, we can't use new stuff to replace it now. Moreover, GValueArray is used by dbus-glib which we depend on.

This can be used to suppress the deprecated warnings:

diff --git a/m4/compiler_warnings.m4 b/m4/compiler_warnings.m4
index eeacfae..dc4a348 100644
--- a/m4/compiler_warnings.m4
+++ b/m4/compiler_warnings.m4
@@ -11,7 +11,7 @@ if test "$GCC" = "yes" -a "$set_more_warnings" != "no"; then
                      -Wdeclaration-after-statement \
                      -Wfloat-equal -Wno-unused-parameter -Wno-sign-compare \
                      -fno-strict-aliasing -Wno-unused-but-set-variable \
-                     -Wundef; do
+                     -Wno-deprecated-declarations -Wundef; do
                SAVE_CFLAGS="$CFLAGS"
                CFLAGS="$CFLAGS $option"
                AC_MSG_CHECKING([whether gcc understands $option])
Comment 5 Dan Winship 2012-05-17 13:49:54 UTC
fixed in NetworkManager and network-manager-applet when compiling against GLib 2.34 or later by using -DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_26. (To compile against GLib 2.32, you'll need to use --disable-more-warnings.)