conflict with glib 2.21 in GSocket

Bug #423845 reported by Benjamin Drung
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
wxWidgets
Fix Released
Unknown
wxwidgets2.8 (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

glib starting in version 2.21 introduces support for network addresses and sockets in its I/O library (e.g. it has its own GSocket type) and that creates a symbol conflict with GSocket from src/unix/gsocket.cpp.

Please backport the upstream fix from http://trac.wxwidgets.org/changeset/61009

Changed in wxwidgets:
status: Unknown → Fix Released
Revision history for this message
Siegfried Gevatter (rainct) wrote :

Attaching the patch (found on Gentoo's BTS) because Trac is currently down.

Revision history for this message
Siegfried Gevatter (rainct) wrote :
Revision history for this message
Devid Antonio Filoni (d.filoni) wrote :

Patch already applied in wxwidgets2.8 2.8.10.1-0ubuntu1.

From the changelog:

  * Add debian/patches/svn61009_fix_ftbfs.dpatch patch taken from upstream
     SVN rev 61009, fix FTBFS caused by new versions of glib.

Changed in wxwidgets2.8 (Ubuntu):
status: New → Fix Released
Revision history for this message
Benjamin Drung (bdrung) wrote :

But why does building audacity 1.3.9-1 or 1.3.9-2 fail then? You can grab the packages from Debian and try to build them on karmic. You will get this error (in jaunty it builds without problems):

g++ -c -g -O2 -g -Wall -O2 -I../lib-src/portmixer/include -I../lib-src/portaudio-v19/include -g -O2 -g -Wall -O2 -Wall -I/usr/lib/wx/include/gtk2-unicode-release-2.8 -I/usr/include/wx-2.8 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXGTK__ -pthread -I../lib-src/FileDialog -g -O2 -Wall -I/tmp/buildd/audacity-1.3.9/lib-src/lib-widget-extra -I../lib-src/sbsms/include -I/usr/include/soundtouch -I../lib-src/libnyquist -I../lib-src/libvamp -g -O2 -Wall -I/tmp/buildd/audacity-1.3.9/lib-src/portsmf -I/usr/include/taglib -fno-strict-aliasing -I./include -I. -DLIBDIR=\"/usr/lib\" -D__STDC_CONSTANT_MACROS -Wall -D_REENTRANT -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/directfb -I/usr/include/libpng12 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include AudacityApp.cpp -o AudacityApp.o
In file included from AudioIO.h:25,
                 from AudacityApp.cpp:61:
/tmp/buildd/audacity-1.3.9/lib-src/portsmf/allegro.h:531: warning: ignoring #pragma warning
/tmp/buildd/audacity-1.3.9/lib-src/portsmf/allegro.h:532: warning: ignoring #pragma warning
/tmp/buildd/audacity-1.3.9/lib-src/portsmf/allegro.h:534: warning: ignoring #pragma warning
/tmp/buildd/audacity-1.3.9/lib-src/portsmf/allegro.h:585: warning: ignoring #pragma warning
/tmp/buildd/audacity-1.3.9/lib-src/portsmf/allegro.h:587: warning: ignoring #pragma warning
/tmp/buildd/audacity-1.3.9/lib-src/portsmf/allegro.h:593: warning: ignoring #pragma warning
/tmp/buildd/audacity-1.3.9/lib-src/portsmf/allegro.h:594: warning: ignoring #pragma warning
/tmp/buildd/audacity-1.3.9/lib-src/portsmf/allegro.h:596: warning: ignoring #pragma warning
In file included from /usr/include/glib-2.0/gio/gio.h:28,
                 from /usr/include/gtk-2.0/gdk/gdkapplaunchcontext.h:30,
                 from /usr/include/gtk-2.0/gdk/gdk.h:32,
                 from /usr/include/gtk-2.0/gtk/gtk.h:32,
                 from AudacityApp.cpp:333:
/usr/include/glib-2.0/gio/giotypes.h:120: error: conflicting declaration 'typedef struct _GSocket GSocket'
/usr/include/wx-2.8/wx/unix/gsockunx.h:41: error: 'class GSocket' has a previous declaration as 'class GSocket'
make[2]: *** [AudacityApp.o] Error 1
make[2]: Leaving directory `/tmp/buildd/audacity-1.3.9/src'
make[1]: *** [audacity] Error 2
make[1]: Leaving directory `/tmp/buildd/audacity-1.3.9'
make: *** [debian/stamp-makefile-build] Error 2

Revision history for this message
Torben Klein (a-u-r-e-l-i-a-n) wrote :

Benjamin,

workaround for you (no real fix though!):
* sudo vi /usr/include/glib-2.0/gio/giotypes.h
* find and comment out line 120 (which reads typedef struct _GSocket GSocket;) by prepending //
* build audacity (works fine for me...)
* edit giotypes.h again and uncomment line 120 (important ;-))

best regards,
Torben

Revision history for this message
Benjamin Drung (bdrung) wrote :

Thank for your idea. Instead of hacking wxgtk, we have patched audacity (version 1.3.9-3). The patch was accepted from upstream, too.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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