GNOME Bugzilla – Bug 655148
gdbusconnection is broken when compiling with mingw
Last modified: 2011-07-26 14:07:00 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'
This is caused by commit c404dbed11bc8bf4212d15719ef3a87ebf76efff: gdbus-codegen: Add support for new org.gtk.GDBus.C.UnixFD annotation"
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.
(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!
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.
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.
(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