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
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 20:59 CEST by lbickley
Modified: 2012-10-14 08:30 CEST (History)
1 user (show)

See Also:


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

Note You need to log in before you can comment on or make changes to this bug.
Description lbickley 2012-10-10 20:59:13 CEST
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 21:13:28 CEST
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 21:20:44 CEST
Can you provide your glib version?
Also glib is upgraded to the latest version?
Comment 3 lbickley 2012-10-10 22:40:08 CEST
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-11 01:19:39 CEST
Created attachment 1168 [details]
g_mutex_init, g_mutex_new

Untested patch, it might fix your issue
Comment 5 lbickley 2012-10-11 02:08:55 CEST
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 09:30:04 CEST
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 09:31:41 CEST
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 09:32:59 CEST
Probably the best would be to provide wrapper functions in utils.[ch].
Comment 9 Salvatore De Paolis 2012-10-11 12:20:55 CEST
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 18:55:58 CEST
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 12:30:35 CEST
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-14 01:23:33 CEST
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...