Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I tried building mutter module using JHBuild and it fails:

<snip>
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
add comment

3 Answers

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
add comment
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
add comment

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
add comment

Your Answer

 
discard

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.