GNOME Bugzilla – Bug 691934
Drop g_thread_init() calls, causing build failure
Last modified: 2019-02-22 06:01:32 UTC
Created attachment 233662 [details] [review] patch to drop g_thread_init() calls g_thread_init() has been deprecated since glib 2.24, and removed from glib 2.31. You should only call g_type_init() now. This causes build failures Making all in examples make[3]: Entering directory `/home/ubuntu/gnome/checkout/gupnp-igd/tests/examples' CC test.o test.c: In function ‘main’: test.c:66:3: warning: ‘g_type_init’ is deprecated (declared at /home/ubuntu/gnome/packages/include/glib-2.0/gobject/gtype.h:669) [-Wdeprecated-declarations] test.c:67:3: warning: ‘g_thread_init’ is deprecated (declared at /home/ubuntu/gnome/packages/include/glib-2.0/glib/deprecated/gthread.h:260) [-Wdeprecated-declarations] CCLD test test.o: In function `main': /home/ubuntu/gnome/checkout/gupnp-igd/tests/examples/test.c:67: undefined reference to `g_thread_init' collect2: error: ld returned 1 exit status It is safe to drop it since configure checks for glib >= 2.26
(In reply to comment #0) > > It is safe to drop it since configure checks for glib >= 2.26 g_thread_init() was deprecated in 2.32 so its not safe. The glib dep either has to be bumped or this: http://libvirt.org/git/?p=libvirt-glib.git;a=blob;f=libvirt-glib/libvirt-glib-main.c;h=3389de94322cee957a91b50d9651a3bcfa48ae2c;hb=HEAD#l144
If you call g_type_init on glib >= 2.26 then g_thread_init is indeed redundant, but not deprecated. also, this is a duplicate of 691609 *** This bug has been marked as a duplicate of bug 691609 ***