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 653522 - Recent GCancellable changes break build on Windows
Recent GCancellable changes break build on Windows
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: gio
2.29.x
Other Windows
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2011-06-27 20:10 UTC by Dieter Verfaillie
Modified: 2011-06-30 13:58 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
GCancellable: Fix build on Win32 (1.08 KB, patch)
2011-06-28 18:45 UTC, Dieter Verfaillie
committed Details | Review

Description Dieter Verfaillie 2011-06-27 20:10:28 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.
Comment 1 Colin Walters 2011-06-28 16:53:39 UTC
Not tested, but should work.  Let me know if not.
Comment 2 Dieter Verfaillie 2011-06-28 18:45:10 UTC
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
Comment 3 Colin Walters 2011-06-30 13:58:10 UTC
Attachment 190886 [details] pushed as 2456db2 - GCancellable: Fix build on Win32