dee

The build problem due to header dependency [-pedantic]

Bug #988443 reported by Seong-ho Cho on 2012-04-25
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Unity
Fix Released
Undecided
Unassigned
dee
Low
Unassigned
dee (Ubuntu)
Undecided
Unassigned
unity (Ubuntu)
Undecided
Unassigned

Bug Description

when we compile this source code after get this tarball package
someone who uses >=gcc-4.5.x, can see like under messages.

dee-1.0.10/work/dee-1.0.10/src/dee-filter.h:33:27: error: redefinition of typedef ‘DeeFilter’
dee-1.0.10/work/dee-1.0.10/src/dee-filter-model.h:57:27: note: previous declaration of ‘DeeFilter’ was here

when we eliminate type definition from dee-filter.h
we can also see like above message.

so I suggest that

# src/dee-filter.h:33
// typedef struct _DeeFilter DeeFilter;

# src/dee-model-reader.h:33
// typedef struct _DeeFilter DeeFilter;

for eliminating circular header dependency and successsful build.

Related branches

Jean-Philippe Orsini (jfi) wrote :

clang is also raising an error while trying to compile dee or compile a source file including dee.h:
clang `pkg-config --cflags dee-1.0` ./test.c
In file included from ./test.c:1:
In file included from /usr/include/dee-1.0/dee.h:41:
/usr/include/dee-1.0/dee-filter-model.h:57:27: error: redefinition of typedef 'DeeFilter' is invalid in C [-Wtypedef-redefinition]
typedef struct _DeeFilter DeeFilter;
                          ^
/usr/include/dee-1.0/dee-model-reader.h:33:27: note: previous definition is here
typedef struct _DeeFilter DeeFilter;
                          ^
In file included from ./test.c:1:
In file included from /usr/include/dee-1.0/dee.h:42:
/usr/include/dee-1.0/dee-filter.h:33:27: error: redefinition of typedef 'DeeFilter' is invalid in C [-Wtypedef-redefinition]
typedef struct _DeeFilter DeeFilter;
                          ^
/usr/include/dee-1.0/dee-filter-model.h:57:27: note: previous definition is here
typedef struct _DeeFilter DeeFilter;
                          ^
2 errors generated.
jporsini@desktop:/tmp$ clang `pkg-config --cflags dee-1.0` ./test.c
In file included from ./test.c:1:
In file included from /usr/include/dee-1.0/dee.h:41:
/usr/include/dee-1.0/dee-filter-model.h:57:27: error: redefinition of typedef 'DeeFilter' is invalid in C [-Wtypedef-redefinition]
typedef struct _DeeFilter DeeFilter;
                          ^
/usr/include/dee-1.0/dee-model-reader.h:33:27: note: previous definition is here
typedef struct _DeeFilter DeeFilter;
                          ^
In file included from ./test.c:1:
In file included from /usr/include/dee-1.0/dee.h:42:
/usr/include/dee-1.0/dee-filter.h:33:27: error: redefinition of typedef 'DeeFilter' is invalid in C [-Wtypedef-redefinition]
typedef struct _DeeFilter DeeFilter;
                          ^
/usr/include/dee-1.0/dee-filter-model.h:57:27: note: previous definition is here
typedef struct _DeeFilter DeeFilter;
                          ^

Michal Hruby (mhr3) on 2012-07-16
Changed in dee:
importance: Undecided → Low
status: New → Triaged
milestone: none → 1.0.12
summary: - The build problem due to header dependency
+ The build problem due to header dependency [-pedantic]
Michal Hruby (mhr3) on 2012-07-27
Changed in dee:
status: Triaged → Fix Committed
Changed in unity:
milestone: none → 6.2
status: New → Fix Committed
Didier Roche (didrocks) on 2012-08-10
Changed in dee:
status: Fix Committed → Fix Released
Changed in unity:
status: Fix Committed → Fix Released
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package dee - 1.0.12-0ubuntu1

---------------
dee (1.0.12-0ubuntu1) quantal-proposed; urgency=low

  * New upstream release.
    - The build problem due to header dependency [-pedantic] (LP: #988443)
 -- Lukasz 'sil2100' Zemczak <email address hidden> Fri, 10 Aug 2012 12:55:03 +0200

Changed in dee (Ubuntu):
status: New → Fix Released
Changed in unity (Ubuntu):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers