Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I tried building mutter module using JHBuild and it fails:

make[4]: Entering directory `/home/wena/src/mutter/src'
  CC     screen.lo
core/screen.c: In function 'reload_monitor_infos':
core/screen.c:445:16: error: variable 'display' set but not used [-Werror=unused-but-set-variable]
core/screen.c: At top level:
core/screen.c:394:1: error: 'find_monitor_with_rect' defined but not used [-Werror=unused-function]
core/screen.c:418:1: error: 'find_main_output_for_crtc' defined but not used [-Werror=unused-function]
cc1: all warnings being treated as errors

make[4]: *** [screen.lo] Error 1
make[4]: Leaving directory `/home/wena/src/mutter/src'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/home/wena/src/mutter/src'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/home/wena/src/mutter/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/wena/src/mutter'
make: *** [all] Error 2
*** Error during phase build of mutter: ########## Error running make   *** [1/1]
share|improve this question

You should use the --enable-compile-warnings=yes switch when configuring your build. That will prevent the -Werror compiler flag from being set during compilation.

share|improve this answer
That switch doesn't work (maybe it worked back then). What works now is --disable-Werror. – Tshepang Feb 10 '12 at 9:52

Well, if --disable-Werror doesn't work, you can add the -i option (for make) to ignore all errors, because it looks like the developer of the program I am building physically hard-coded the -Werror option somewhere in his code.

share|improve this answer
up vote 0 down vote accepted

Using the example in the question, put the following inside the "~.jhbuildrc" file (reference):

module_autogenargs = {"mutter": "--disable-Werror"}
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.