Bug 2751 - g_mutex_new/g_mutex_free removed from GLib 2.32
Summary: g_mutex_new/g_mutex_free removed from GLib 2.32
Status: RESOLVED FIXED
Alias: None
Product: Claws Mail (GTK 2)
Classification: Unclassified
Component: Other (show other bugs)
Version: 3.8.1
Hardware: PC Linux
: P3 critical
Assignee: users
URL:
Depends on:
Blocks:
 
Reported: 2012-10-10 18:59 UTC by lbickley
Modified: 2012-10-14 06:30 UTC (History)
1 user (show)

See Also:


Attachments
g_mutex_init, g_mutex_new (2.06 KB, patch)
2012-10-10 23:19 UTC, Salvatore De Paolis
no flags Details | Diff
cm_mutex_init (2.14 KB, patch)
2012-10-11 10:20 UTC, Salvatore De Paolis
no flags Details | Diff

Description lbickley 2012-10-10 18:59:13 UTC
OS: OpenSuSE Linux 12.2
CLAWS: 3.8.1

I just upgraded from 3.7.10 (which has been working great for months) to 3.8.1 and on startup I now get:
------------------
claws-mail
WARNING: no socket to connect to
claws-mail: symbol lookup error: claws-mail: undefined symbol: g_mutex_new
------------------
From development docs, I see that g_mutex_new is depreciated - but that typically means it's going away "eventually" - has it already been removed from its library?

I need claws up ASAP, because months ago I converted all my mail, filters, etc. from KMAIL to CLAWS. HELP!!!

Regards, Lyle
Comment 1 lbickley 2012-10-10 19:13:28 UTC
Additional OS Info:
-------------------
uname -a
Linux asrock 3.1.10-1.16-desktop #1 SMP PREEMPT Wed Jun 27 05:21:40 UTC 2012 (d016078) x86_64 x86_64 x86_64 GNU/Linux
-------------------
Comment 2 Salvatore De Paolis 2012-10-10 19:20:44 UTC
Can you provide your glib version?
Also glib is upgraded to the latest version?
Comment 3 lbickley 2012-10-10 20:40:08 UTC
Yes, I had upgraded glib to the latest version. After submitting the bug report, I downgraded to glib to 2.15-22.6.4 in order to get claws working. So it looks like the latest version of glib did indeed eliminate g_mutex_new.

I know this is not the solution I want - some other programs are "yelling" at me that I'm using a old version of glib and I "may" experience problems.
Comment 4 Salvatore De Paolis 2012-10-10 23:19:39 UTC
Created attachment 1168 [details]
g_mutex_init, g_mutex_new

Untested patch, it might fix your issue
Comment 5 lbickley 2012-10-11 00:08:55 UTC
Applied patch (no errors), did:
make clean
make
make install
All went O.K.
Claws seems to work O.K w/old library
Will try next with "new" glib
Comment 6 Colin Leroy 2012-10-11 07:30:04 UTC
Salvatore: I don't understand how your patch works. It seems to be the thing to do, but the #if checks are reversed?
Comment 7 Colin Leroy 2012-10-11 07:31:41 UTC
Also, if you allocate the mutex using g_new0, you need to g_free() it after g_mutex_clear().
Comment 8 Colin Leroy 2012-10-11 07:32:59 UTC
Probably the best would be to provide wrapper functions in utils.[ch].
Comment 9 Salvatore De Paolis 2012-10-11 10:20:55 UTC
Created attachment 1169 [details]
cm_mutex_init

I didn't test it and yesterday it was a copy paste issue, i didn't notice that.
The documentation says it's been introduced in 2.32.0 but I've seen it's not like that, seems to be available in 2.31.0 too.
I've corrected it and moved everything into "utils"
I didn't test it though, i'dd do a bit later
Comment 10 lbickley 2012-10-11 16:55:58 UTC
I'll hold off on further testing from "my end" until Salvatore completes his testing. In the meantime, I'll keep using the "old" libraries until then...
Comment 11 users 2012-10-12 10:30:35 UTC
Changes related to this bug have been committed.
Please check latest CVS and update the bug accordingly.
You can also get the patch from:
http://www.claws-mail.org/tracker/

2012-10-12 [colin]	3.8.1cvs93

	* src/compose.c
	* src/prefs_account.c
	* src/common/utils.c
	* src/common/utils.h
		Fix bug #2751 'g_mutex_new/g_mutex_free removed from GLib 2.32'
		Thanks to Salvatore de Paolis
Comment 12 lbickley 2012-10-13 23:23:33 UTC
Downloaded the latest CVS (version 3.8.1cvs99) into openSUSE 12.2

Environment: Linux core2 3.4.11-2.16-desktop #1 SMP PREEMPT Wed Sep 26 17:05:00 UTC 2012 (259fc87) x86_64 x86_64 x86_64 GNU/Linux, glibc-devel 2.15-22.6.4, glib2-devel 2.32.4-4.8.1

compiled/installed cvs99 claws and compiled/installed gdata and gtkhtml2 plugins.

No errors on compilation or execution

Thanks to Salvatore and Colin...

Note You need to log in before you can comment on or make changes to this bug.