Compiz-core fails to compile with gcc-4.7 - 'cc1plus: all warnings being treated as errors'

Bug #972519 reported by triplesqaurednine on 2012-04-03
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Daniel van Vugt
Compiz Core
Status tracked in 0.9.7
Daniel van Vugt
Arch Linux
compiz (Ubuntu)

Bug Description

compiz-core source code fails to build with gcc-4.7. This presently does not affect ubuntu systems, which all use gcc <= 4.6.

[Development Fix]
Revision 3091 of lp:compiz-core (same for both 0.9.7 and 0.9.8 series). Removed unnecessary typecast causing comparison between signed and unsigned integers.

[Stable Fix]
As above.

[Test Case]
Compile the compiz-core source code. Make sure it doesn't fail.

[Regression Potential]
Low. It was an obvious type mismatch and has worked perfectly for all developers since being fixed.

this morning after upgrading to GCC-4.7 (Archlinux), i then decided to update compiz, but compiz-core failed to build. It would seem GCC-4.7 is stricter and is treating some warnings as errors (that gcc 4.6.3 didn't);

(tail) output from build failure;

Linking CXX static library libcompiz_pluginclasshandler.a
[ 28%] Built target compiz_pluginclasshandler
Scanning dependencies of target compiz_timer
[ 28%] Building CXX object src/timer/CMakeFiles/compiz_timer.dir/src/timeouthandler.cpp.o
/home/ninez/cOOmpiz/compiz-core/src/timer/src/timeouthandler.cpp: In member function ‘void TimeoutHandler::addTimer(CompTimer*)’:
/home/ninez/cOOmpiz/compiz-core/src/timer/src/timeouthandler.cpp:60:48: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
cc1plus: all warnings being treated as errors
make[2]: *** [src/timer/CMakeFiles/compiz_timer.dir/src/timeouthandler.cpp.o] Error 1
make[1]: *** [src/timer/CMakeFiles/compiz_timer.dir/all] Error 2
make: *** [all] Error 2
[ninez@ninez compiz-core]$

However, fixing the problem (locally) was trivial. I added '-Wno-error=sign-compare' to my build-script's CXXFLAGS and compiz now compiles. I haven't finished compiling the rest of compiz with gcc-4.7 but will file separate reports, if i bump into any issues with it.


Related branches

Hey, I know this isn't 'top priority' for you guys, but it does affect people using GCC-4.7, which several distros are already using. The Archlinux (AUR) packagers, fixed this in their packaging, but found the fix through this bug report.

it'd be great if this could be commited upstream, being as compiz won't build without it.


PS: loving 0.9.7+ ... there may be the odd issue, but compiz is definitely improving in a few areas ;)

rufflove (nat-hulse) wrote :

I appreciate that you guys are on 4.6.3 for Precise atm, but these build problems (the wall plugin also fails to build with 4.7) will have to be dealt with eventually!

Changed in compiz-core:
status: New → Triaged
importance: Undecided → Medium
milestone: none →
Changed in compiz-core:
assignee: nobody → Daniel van Vugt (vanvugt)
status: Triaged → In Progress
Daniel van Vugt (vanvugt) wrote :

Fix committed into lp:compiz-core at revision 3091

Changed in compiz-core:
status: In Progress → Fix Committed
rufflove (nat-hulse) wrote :

Thanks Daniel :)

Daniel van Vugt (vanvugt) wrote :

Fix released in Compiz Core

description: updated

Hello triplesqaurednine, or anyone else affected,

Accepted compiz into precise-proposed. The package will build now and be available in a few hours. Please test and give feedback here. See for documentation how to enable and use -proposed. Thank you in advance!

Changed in compiz (Ubuntu Precise):
status: New → Fix Committed
tags: added: verification-needed
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package compiz - 1:

compiz (1: precise-proposed; urgency=low

  [ Didier Roche ]
  * New upstream bug fix release:
    - [fglrx] Title bar does not update on non-maximized windows (LP: #770283)
    - Some apps (like Remmina) can't full-screen under Compiz (or Unity)
      (LP: #946388)
    - Compiz-core fails to compile with gcc-4.7 - 'cc1plus: all warnings
      being treated as errors' (LP: #972519)
    - Menu shadow clipping flickers while switching menubar items/indicators
      (LP: #978900)
    - Compiz should not move windows to workspace 0,0 when restarted
      (LP: #980026)
    - regression / unable to interact with window-titlebar (window decoration)
      after minimizing/unminimizing gnome-terminal (LP: #981703)
  * debian/patches/workaround_770283.patch,
    - removed, upstreamed

  [ Oliver Grawert ]
  * update the GLES2 patch for the new upstream release.

compiz (1: precise-proposed; urgency=low

  [ Łukasz 'sil2100' Zemczak ]
  * debian/patches/workaround_770283.patch:
    - Workaround a problem with fglrx not refreshing window decoration textures
      on pixmap modification (LP: #770283)

  [ Oliver Grawert ]
  * update GLES patch for new quilt patch, fix issue with GLES patch that
    forcefully unapplied other quilt patches and resulted in
    gtk-window-decorator to not be started.
 -- Didier Roche <email address hidden> Thu, 26 Apr 2012 09:19:51 +0200

Changed in compiz (Ubuntu):
status: New → Fix Released
Changed in compiz (Ubuntu Precise):
status: Fix Committed → Fix Released
Changed in compiz:
milestone: none →
status: New → Fix Committed
importance: Undecided → Medium
assignee: nobody → Daniel van Vugt (vanvugt)
no longer affects: compiz-core/0.9.8
Changed in compiz-core:
milestone: → none
status: Fix Committed → Fix Released
Changed in compiz:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers