Bug 8353 - Shadow issue in dbus-glib prevents NetworkManager build
Summary: Shadow issue in dbus-glib prevents NetworkManager build
Status: RESOLVED FIXED
Alias: None
Product: dbus
Classification: Unclassified
Component: GLib (show other bugs)
Version: unspecified
Hardware: x86 (IA32) Linux (All)
: high blocker
Assignee: Robert McQueen
QA Contact: John (J5) Palmieri
URL:
Whiteboard:
Keywords:
: 8131 8751 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-09-19 08:01 UTC by Luca Ferretti
Modified: 2007-06-22 06:32 UTC (History)
3 users (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Luca Ferretti 2006-09-19 08:01:53 UTC
I was trying to build NetworkManager in my jhbuild sandbox (gnome-2-16,
dbus-glib from git repository). This is the build failure message:

 gcc -DHAVE_CONFIG_H -I. -I. -I../.. -I../.. -I../../include -I../../libnm-util
-I../../utils -I../../src -I../../src/named-manager
-I/opt/gnome2/include/dbus-1.0 -I/opt/gnome2/lib/dbus-1.0/include
-I/opt/gnome2/include/glib-2.0 -I/opt/gnome2/lib/glib-2.0/include
-DDBUS_VERSION_MAJOR=0 -DDBUS_VERSION_MINOR=94 -DDBUS_VERSION_MICRO=0 -pthread
-I/opt/gnome2/include/glib-2.0 -I/opt/gnome2/lib/glib-2.0/include
-DDBUS_API_SUBJECT_TO_CHANGE -I/opt/gnome2/include/hal
-I/opt/gnome2/include/dbus-1.0 -I/opt/gnome2/lib/dbus-1.0/include -g -Wall
-DDBUS_API_SUBJECT_TO_CHANGE -DG_DISABLE_DEPRECATED
-DBINDIR=\"/opt/gnome2/bin\" -DDATADIR=\"/opt/gnome2/share\"
-DSYSCONFDIR=\"/opt/gnome2/etc\" -Wall -Werror -std=gnu89 -g -O2 -lz -Wshadow
-Wmissing-declarations -Wmissing-prototypes -Wdeclaration-after-statement
-Wfloat-equal -Wno-unused-parameter -Wno-sign-compare -MT
libvpn_manager_la-nm-vpn-connection.lo -MD -MP -MF
.deps/libvpn_manager_la-nm-vpn-connection.Tpo -c nm-vpn-connection.c  -fPIC
-DPIC -o .libs/libvpn_manager_la-nm-vpn-connection.o
cc1: warnings being treated as errors
In file included from /opt/gnome2/include/dbus-1.0/dbus/dbus-glib.h:137,
                 from
/opt/gnome2/include/dbus-1.0/dbus/dbus-glib-lowlevel.h:27,
                 from ../../src/NetworkManagerDbusUtils.h:27,
                 from nm-dbus-vpn.h:25,
                 from nm-vpn-connection.c:25:
/opt/gnome2/include/dbus-1.0/dbus/dbus-gtype-specialized.h:50: warning:
declaration of 'index' shadows a global declaration
/usr/include/string.h:304: warning: shadowed declaration is here
/opt/gnome2/include/dbus-1.0/dbus/dbus-gtype-specialized.h:95: warning:
declaration of 'index' shadows a global declaration
/usr/include/string.h:304: warning: shadowed declaration is here
/opt/gnome2/include/dbus-1.0/dbus/dbus-gtype-specialized.h:98: warning:
declaration of 'index' shadows a global declaration
/usr/include/string.h:304: warning: shadowed declaration is here
In file included from ../../src/NetworkManagerMain.h:28,
                 from ../../src/NetworkManagerDbusUtils.h:31,
                 from nm-dbus-vpn.h:25,
                 from nm-vpn-connection.c:25:
/opt/gnome2/include/hal/libhal.h:309: warning: declaration of 'index' shadows a
global declaration
/usr/include/string.h:304: warning: shadowed declaration is here
make[3]: *** [libvpn_manager_la-nm-vpn-connection.lo] Error 1
make[3]: Leaving directory
`/home/luca/cvs/gnome2/NetworkManager/src/vpn-manager'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/luca/cvs/gnome2/NetworkManager/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/luca/cvs/gnome2/NetworkManager'
make: *** [all] Error 2

A bug against NetworkManager was opened on GNOME Bugzilla
(http://bugzilla.gnome.org/show_bug.cgi?id=356512). It was closed by Dan
Williams as NOTGNOME, errors should be related to a shadow issue in dbus-glib
Comment 1 Rob Taylor 2006-10-25 10:35:35 UTC
Fixedin 0.72
Comment 2 Rob Taylor 2006-10-25 10:37:09 UTC
*** Bug 8751 has been marked as a duplicate of this bug. ***
Comment 3 Rob Taylor 2006-10-25 13:25:20 UTC
*** Bug 8131 has been marked as a duplicate of this bug. ***
Comment 5 Ross Burton 2007-06-22 06:28:40 UTC
I've never seen or can replicate gcc warning about shadowing when the name is a parameter to a function (where it isn't actually shadowing).  Is this still repoducable?
Comment 6 Ross Burton 2007-06-22 06:32:53 UTC
ross@blackadder ~/Programming/cvs/dbus-glib/dbus
$ grep index *.h | wc -l
0

Appear to be fixed in git, and we're about to release 0.74.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.