3

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]
tshepang
  • 65,642

3 Answers3

2

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

module_autogenargs = {"mutter": "--disable-Werror"}
tshepang
  • 65,642
1

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.

1

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.

Mat
  • 52,586