After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 744485 - [osx build] including gio/gio.h causes 'redefinition of typedef' warnings
[osx build] including gio/gio.h causes 'redefinition of typedef' warnings
Status: RESOLVED DUPLICATE of bug 744473
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
git master
Other Mac OS
: Normal normal
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2015-02-13 18:56 UTC by Young Han Lee
Modified: 2015-02-16 08:39 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
This patch adds -Wno-typedef-redefinition compile option (1.43 KB, application/mbox)
2015-02-13 18:56 UTC, Young Han Lee
  Details
add -Wno-typedef-redefinition configure option (1.43 KB, patch)
2015-02-13 19:01 UTC, Young Han Lee
none Details | Review

Description Young Han Lee 2015-02-13 18:56:06 UTC
Created attachment 296799 [details]
This patch adds -Wno-typedef-redefinition compile option

On osx yosemite, compiling gstreamer with master of glib causes following warning.


In file included from gstnetclientclock.c:58:
In file included from ./gstnettimepacket.h:25:
In file included from /mypath/install/include/glib-2.0/gio/gio.h:163:
/mypath/install/include/glib-2.0/gio/glistmodel.h:36:21: error: 
      redefinition of typedef 'GListModel' is a C11 feature
      [-Werror,-Wtypedef-redefinition]
G_DECLARE_INTERFACE(GListModel, g_list_model, G, LIST_MODEL, GObject)


Here is my gcc version information;

$ gcc --version
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 6.0 (clang-600.0.56) (based on LLVM 3.5svn)
Target: x86_64-apple-darwin14.1.0
Thread model: posix


This warning is caused by including gio/gio.h.

But, as the warning says, redefinition of typedef is valid in C11 and no need to stop compiling for this.

I attached a patch to add -Wno-typedef-redefinition compile option to configure.
Comment 1 Young Han Lee 2015-02-13 19:01:21 UTC
Created attachment 296800 [details] [review]
add -Wno-typedef-redefinition configure option
Comment 2 Young Han Lee 2015-02-13 19:09:15 UTC
https://bugzilla.gnome.org/show_bug.cgi?id=744473

I also reported this problem to glib bugzilla. Glib guys might be able to patch avoiding the redefinition, but it would be great to make gstreamer can be built with current version of glib.
Comment 3 Sebastian Dröge (slomo) 2015-02-16 08:39:39 UTC
This should be fixed in GLib in one way or another, or be just part of your build flags. It's a warning caused in headers from another project, it IMHO doesn't make much sense to add compiler flags for that to GStreamer and every other project that uses GLib... and then the same for every other dependency of GStreamer that might create compiler warnings from its headers.

*** This bug has been marked as a duplicate of bug 744473 ***