Compiz can't build with clang

Bug #1060804 reported by Daniel van Vugt on 2012-10-03
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Compiz
Medium
Daniel van Vugt
Compiz Core
Medium
Unassigned
compiz (Ubuntu)
Medium
Daniel van Vugt

Bug Description

Install clang and then:
   env CC=clang CXX=clang++ cmake ..
and then it can't build because of (at least):

In file included from /home/dan/bzr/compiz/clang/gtk/window-decorator/gwd-settings-storage-gsettings.c:28:
/home/dan/bzr/compiz/clang/gtk/window-decorator/gwd-settings-storage-gsettings.h:25:37: error:
      redefinition of typedef 'GWDSettingsWritable' is invalid in C
      [-Wtypedef-redefinition]
typedef struct _GWDSettingsWritable GWDSettingsWritable;
                                    ^
/home/dan/bzr/compiz/clang/gtk/window-decorator/gwd-settings-writable-interface.h:35:37: note:
      previous definition is here
typedef struct _GWDSettingsWritable GWDSettingsWritable;
                                    ^
In file included from /home/dan/bzr/compiz/clang/gtk/window-decorator/gwd-settings-storage-gsettings.c:28:
/home/dan/bzr/compiz/clang/gtk/window-decorator/gwd-settings-storage-gsettings.h:26:37: error:
      redefinition of typedef 'GWDSettingsStorage' is invalid in C
      [-Wtypedef-redefinition]
typedef struct _GWDSettingsStorage GWDSettingsStorage;
                                    ^
/home/dan/bzr/compiz/clang/gtk/window-decorator/gwd-settings-storage-interface.h:35:36: note:
      previous definition is here
typedef struct _GWDSettingsStorage GWDSettingsStorage;
                                   ^
In file included from /home/dan/bzr/compiz/clang/gtk/window-decorator/gwd-settings-storage-gsettings.c:28:
/home/dan/bzr/compiz/clang/gtk/window-decorator/gwd-settings-storage-gsettings.h:27:31: error:
      redefinition of typedef 'GSettings' is invalid in C
      [-Wtypedef-redefinition]
typedef struct _GSettings GSettings;
                                    ^
/usr/include/glib-2.0/gio/giotypes.h:60:47: note: previous definition is here
typedef struct _GSettings GSettings;
                                              ^

Clang also rejects lp:compiz-core/0.9.7 for different reasons.

Related branches

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

Raised importance to High, because clang is proving itself to be an invaluable tool for code analysis. I'd like to use it as part of the code review process in future.

Changed in compiz:
status: Triaged → In Progress
Changed in compiz-core:
milestone: 0.9.7.12 → none
Changed in compiz:
importance: Medium → High
Daniel van Vugt (vanvugt) wrote :

Fix committed into lp:compiz at revision 3412

Changed in compiz:
status: In Progress → Fix Committed
importance: High → Medium
Changed in compiz (Ubuntu):
assignee: nobody → Daniel van Vugt (vanvugt)
importance: Undecided → Medium
status: New → Fix Committed
Changed in compiz:
status: Fix Committed → Fix Released
Stephen M. Webb (bregma) on 2013-10-13
no longer affects: compiz/0.9.8
Changed in compiz (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers