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

Bug #972519 reported by triplesqaurednine
34
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Compiz
Fix Released
Medium
Daniel van Vugt
Compiz Core
Status tracked in 0.9.7
0.9.7
Fix Released
Medium
Daniel van Vugt
Arch Linux
New
Undecided
Unassigned
compiz (Ubuntu)
Fix Released
Undecided
Unassigned
Precise
Fix Released
Undecided
Unassigned

Bug Description

[Impact]
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.

ORIGINAL DESCRIPTION:
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.

cheerz

Revision history for this message
triplesqaurednine (triplesquarednine) wrote :

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.

cheerz.

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

Revision history for this message
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 → 0.9.7.8
Changed in compiz-core:
assignee: nobody → Daniel van Vugt (vanvugt)
status: Triaged → In Progress
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Fix committed into lp:compiz-core at revision 3091

Changed in compiz-core:
status: In Progress → Fix Committed
Revision history for this message
rufflove (nat-hulse) wrote :

Thanks Daniel :)

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Fix released in Compiz Core 0.9.7.8.

description: updated
Revision history for this message
Martin Pitt (pitti) wrote : Please test proposed package

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 https://wiki.ubuntu.com/Testing/EnableProposed 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
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package compiz - 1:0.9.7.8-0ubuntu1

---------------
compiz (1:0.9.7.8-0ubuntu1) 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,
    debian/patches/fix_976467.patch:
    - removed, upstreamed

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

compiz (1:0.9.7.6-0ubuntu2) 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 → 0.9.8.0
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: 0.9.8.0 → 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  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.