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 691934 - Drop g_thread_init() calls, causing build failure
Drop g_thread_init() calls, causing build failure
Status: RESOLVED DUPLICATE of bug 691609
Product: gupnp-igd
Classification: Other
Component: General
unspecified
Other Linux
: Normal normal
: ---
Assigned To: GUPnP Maintainers
GUPnP Maintainers
Depends on:
Blocks:
 
 
Reported: 2013-01-17 11:02 UTC by JB Lallement
Modified: 2019-02-22 06:01 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch to drop g_thread_init() calls (1.61 KB, patch)
2013-01-17 11:02 UTC, JB Lallement
none Details | Review

Description JB Lallement 2013-01-17 11:02:39 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
Comment 1 Zeeshan Ali 2013-01-17 14:29:52 UTC
(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
Comment 2 Jens Georg 2013-01-17 14:47:45 UTC
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 ***