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 621240 - Please remove -Werror flag from Makefiles
Please remove -Werror flag from Makefiles
Status: RESOLVED WONTFIX
Product: gnome-shell
Classification: Core
Component: building
unspecified
Other Linux
: Normal blocker
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2010-06-10 20:03 UTC by Philip Wernersbach
Modified: 2010-06-10 20:53 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Philip Wernersbach 2010-06-10 20:03:25 UTC
On my system, building of all released versions of gnome-shell and the latest git revision fail for no reason other than the presence of the -Werror flag in the Makefiles. I know this because of the following text in the make output:

[...]
  CC     libgnome_shell_la-shell-wm.lo
  CC     libgnome_shell_la-shell-xfixes-cursor.lo
  CC     libgnome_shell_la-shell-recorder.lo
cc1: warnings being treated as errors
shell-window-tracker.c: In function 'get_app_for_window':
shell-window-tracker.c:396: error: implicit declaration of function 'meta_window_is_remote'
make[3]: *** [libgnome_shell_la-shell-window-tracker.lo] Error 1
make[3]: *** Waiting for unfinished jobs....
make[3]: Leaving directory `/home/user/gnome-shell/src'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/home/user/gnome-shell/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/user/gnome-shell'
make: *** [all] Error 2

The workaround I've come up with is to use the following command to remove all of the -Werror flags from the Makefiles. After changing to the gnome-shell directory and running ./configure:

find . -name "Makefile" -exec grep -l \\-Werror '{}' \; | for file in $( cat - ); do cat $file | sed 's/-Werror//g' > $file.tmp; mv -f $file.tmp $file; done

After running that command, the build completes successfully. Even though this fixes the build, I would like to see the -Werror flag formally removed from the Makefile generator.

Relevant System Info:
Gentoo Linux ~amd64
gcc --version: gcc (Gentoo 4.4.3 p1.0) 4.4.3
Comment 1 Owen Taylor 2010-06-10 20:14:21 UTC
The above warning isn't some trivial, irrelevant thing. "Implicit declaration" means that the compiler doesn't know how to call the function, and made a guess up.

This can cause segfaults, memory corruption, etc.

Your problem seems to be that you are compiling against a different version of the header files that Mutter installs than the libraries that Mutter installs.

Using the build scripts from http://live.gnome.org/GnomeShell is recommended to avoid such problems.
Comment 2 Frederic Peters 2010-06-10 20:53:45 UTC
Philip, probably you are compiling against the mutter 2.31.2 tarball, which doesn't have the _is_remote() function, this isn't caught by configure, as gnome-shell checks for 2.31.2... (looks like mutter is not using post release incrementing).

As Owen said, you should use jhbuild as described on that page, as it will also get mutter from git.