GNOME Bugzilla – Bug 653522
Recent GCancellable changes break build on Windows
Last modified: 2011-06-30 13:58:13 UTC
Commit http://git.gnome.org/browse/glib/commit/?id=fa873992800c64722a56782a9d288c05ce0df21f breaks the build on Windows with: Creating library file: .libs/libgio-2.0.dll.a.libs/gcancellable.o: In function `g_cancellable_cancel': d:/dev/gnome.org/gnome-windows/checkout/glib/glib/src/gio/gcancellable.c:662: undefined reference to `g_cancellable_write_cancelled ' collect2: ld returned 1 exit status Makes sense as g_cancellable_write_cancelled is called unconditionally from g_cancellable_cancel, but is defined within a #ifndef G_OS_WIN32 guard, together with g_cancellable_open_pipe.
Not tested, but should work. Let me know if not.
Created attachment 190886 [details] [review] GCancellable: Fix build on Win32 Thanks! Only, the build now failed with the error below. Attached patch moves the "#ifdef G_OS_WIN32" guarded part a couple of lines further down the code to where "priv" has been declared and assigned (is the terminology I use correct here?) and the build runs to completion again :) Note: actual path names shortened for readability: libtool: compile: gcc -mthreads -DHAVE_CONFIG_H -I. -I/d/glib/src/gio -I.. -DG_LOG_DOMAIN=\"GLib-GIO\" -I.. -I../glib -I/d/glib/src/glib -I/d/glib/src -I/d/glib/src/gmodule -DG_ENABLE_DEBUG -DG_THREADS_MANDATORY -DG_DISABLE_DEPRECATED -DGIO_COMPILATION -DGIO_MODULE_DIR=\"/d/glib/dist/lib/gio/modules\" -I/d/dev/gnome.org/gnome-windows/prefix/gtk+-bundle/gtk+-bundle_2.24.0_win32/include -DG_DISABLE_SINGLE_INCLUDES -O1 -pipe -ggdb -march=i486 -mtune=native -mms-bitfields -Wall -MT gcancellable.lo -MD -MP -MF .deps/gcancellable.Tpo -c /d/glib/src/gio/gcancellable.c -DDLL_EXPORT -DPIC -o .libs/gcancellable.o d:/glib/src/gio/gcancellable.c: In function 'g_cancellable_write_cancelled': d:/glib/src/gio/gcancellable.c:202:7: error: 'priv' undeclared (first use in this function) d:/glib/src/gio/gcancellable.c:202:7: note: each undeclared identifier is reported only once for each function it appears in make[3]: *** [gcancellable.lo] Error 1
Attachment 190886 [details] pushed as 2456db2 - GCancellable: Fix build on Win32