Both 1.4.x and trunk now fail to build with the current glib 2.31.x:
internals/refs.c: In function 'test_connection':
internals/refs.c:279:9: error: 'g_thread_create' is deprecated (declared at /usr/include/glib-2.0/glib/deprecated/gthread.h:100): Use 'g_thread_new' instead [-Werror=deprecated-declarations]
internals/refs.c: In function 'main':
internals/refs.c:598:3: error: 'g_thread_init' is deprecated (declared at /usr/include/glib-2.0/glib/deprecated/gthread.h:259) [-Werror=deprecated-declarations]
cc1: all warnings being treated as errors
The g_thread_* API has been deprecated in 2.31.x, and g_thread_init() is not necessary any more since 2.24 (g_type_init() cares about this).
Created attachment 55069 [details] [review]
This patch works, but it bumps the glib requirement for the tests to 2.31.4 (g_thread_new() did not exist in 2.30.x). If that's not appropriate, I could add some #if magic to emulate g_thread_new() with a macro that calls g_thread_create() if you are interested.
(In reply to comment #1)
> If that's not appropriate, I could
> add some #if magic to emulate g_thread_new() with a macro that calls
> g_thread_create() if you are interested.
For 1.4.x it'd be better to make deprecated declarations non-fatal, or even just silence the warning altogether. 1.4.x is a stable-branch, so it shouldn't have random code churn like this.
For 1.5.x I'd appreciate it if you could do the g_thread_new() emulation if it's fairly easy - if in doubt I tend to use Debian stable as my benchmark of "your distro must be at least this new", and that only has 2.24 - but bumping the dependency for a development branch wouldn't be too bad, especially when it's only for tests anyway.
(In reply to comment #1)
> This patch works, but it bumps the glib requirement for the tests to 2.31.4
I'd prefer it if this could be avoided, even for 1.5, until 2.32 exists and has ABI stability.
Created attachment 55115 [details] [review]
Right-o. This updated patch merely bumps the requirement to >= 2.24 for the g_thread_init() part, and uses the real g_thread_new for glib >= 2.31 and a backwards compatibility shim for < 2.31.
Looks good for 1.5, I'll apply it there soon.
(In reply to comment #4)
> This updated patch
Applied for 1.5.10, more or less (I also added a comment).
(In reply to comment #2)
> For 1.4.x it'd be better to make deprecated declarations non-fatal, or even
> just silence the warning altogether.
I did this for 1.4.18, and we should reapply this when we branch for 1.6 and any future stable branches.