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 655148 - gdbusconnection is broken when compiling with mingw
gdbusconnection is broken when compiling with mingw
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: gdbus
2.29.x
Other Windows
: Normal normal
: ---
Assigned To: David Zeuthen (not reading bugmail)
gtkdev
Depends on:
Blocks:
 
 
Reported: 2011-07-22 21:00 UTC by Maarten Bosmans
Modified: 2011-07-26 14:07 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Maarten Bosmans 2011-07-22 21:00:04 UTC
It seems there are some missing #ifdefs:

gdbusconnection.c: In function 'g_dbus_connection_call_done':
gdbusconnection.c:5031:93: error: 'CallState' has no member named 'fd_list'
gdbusconnection.c: In function 'g_dbus_connection_call_internal':
gdbusconnection.c:5074:3: warning: implicit declaration of function 'G_IS_UNIX_FD_LIST' [-Wimplicit-function-declaration]
gdbusconnection.c: In function 'g_dbus_connection_call_finish_internal':
gdbusconnection.c:5150:25: error: 'CallState' has no member named 'fd_list'
gdbusconnection.c:5150:64: error: 'CallState' has no member named 'fd_list'
Comment 1 Dieter Verfaillie 2011-07-25 08:54:13 UTC
This is caused by commit c404dbed11bc8bf4212d15719ef3a87ebf76efff:
gdbus-codegen: Add support for new org.gtk.GDBus.C.UnixFD annotation"
Comment 2 David Zeuthen (not reading bugmail) 2011-07-25 13:57:14 UTC
Hmrp, would have been helpful if you supplied a patch to fix this. Anyway, I've committed a patch that probably does but I can't test it. Please reopen if it doesn't work.
Comment 3 Dieter Verfaillie 2011-07-25 20:54:19 UTC
(In reply to comment #2)
> Hmrp, would have been helpful if you supplied a patch to fix this.

I did not intend to rush or offend anybody by documenting the commit
causing the reported problem. Also, I simply did not have time today
to do more than identifying and reverting in my working copy.
Sorry about that.

> Anyway, I've
> committed a patch that probably does but I can't test it.

Tested and it works. Thank you!
Comment 4 Maarten Bosmans 2011-07-26 09:27:39 UTC
Well, David, it would also be very helpful if you thought out the #ifdefs for non-UNIX OSes a bit more before committing your initial changes that triggered these failures. Probably just trying to compile with #undef G_OS_UNIX at the top of the file would be enough to catch this, no need to setup a mingw toolchain.
Anyway, the committed patches in git master indeed resolve the problem, thanks.
Comment 5 Maarten Bosmans 2011-07-26 09:54:03 UTC
Reopening this bug to report a similar bug in generated gdbus code. In gio/tests:

  CC     gdbus-example-objectmanager-generated.lo
gdbus-example-objectmanager-generated.c: In function '_example_animal_skeleton_handle_method_call':
gdbus-example-objectmanager-generated.c:1020: error: 'G_TYPE_UNIX_FD_LIST' undeclared (first use in this function)
gdbus-example-objectmanager-generated.c:1020: error: (Each undeclared identifier is reported only once
gdbus-example-objectmanager-generated.c:1020: error: for each function it appears in.)
gdbus-example-objectmanager-generated.c: In function '_example_cat_skeleton_handle_method_call':
gdbus-example-objectmanager-generated.c:1840: error: 'G_TYPE_UNIX_FD_LIST' undeclared (first use in this function)
make[3]: *** [gdbus-example-objectmanager-generated.lo] Error 1

Sorry, I can't provide patches for the python generator.
Comment 6 David Zeuthen (not reading bugmail) 2011-07-26 14:07:00 UTC
(In reply to comment #5)
> Reopening this bug to report a similar bug in generated gdbus code. In
> gio/tests:
> 
>   CC     gdbus-example-objectmanager-generated.lo
> gdbus-example-objectmanager-generated.c: In function
> '_example_animal_skeleton_handle_method_call':
> gdbus-example-objectmanager-generated.c:1020: error: 'G_TYPE_UNIX_FD_LIST'
> undeclared (first use in this function)
> gdbus-example-objectmanager-generated.c:1020: error: (Each undeclared
> identifier is reported only once
> gdbus-example-objectmanager-generated.c:1020: error: for each function it
> appears in.)
> gdbus-example-objectmanager-generated.c: In function
> '_example_cat_skeleton_handle_method_call':
> gdbus-example-objectmanager-generated.c:1840: error: 'G_TYPE_UNIX_FD_LIST'
> undeclared (first use in this function)
> make[3]: *** [gdbus-example-objectmanager-generated.lo] Error 1
> 
> Sorry, I can't provide patches for the python generator.

I didn't get to the tests yesterday because of another bug (that is now fixed). I've fixed the gdbus-codegen problem in git and all of GLib now builds using mingw32 without problems

 http://git.gnome.org/browse/glib/commit/?id=b7f3638e5c3917d6007040747eb3ef1ccc338a0b