Bug #70932 MySQL Workbench Patches ( build fixes, removal of deprecated glib functions )
Submitted: 17 Nov 2013 3:00 Modified: 16 Jan 2014 4:44
Reporter: Henning Habighorst Email Updates:
Status: Closed Impact on me:
Category:MySQL Workbench Severity:S3 (Non-critical)
Version:6.0.8 OS:Linux (Gentoo)
Assigned to: CPU Architecture:Any

[17 Nov 2013 3:00] Henning Habighorst
I've noticed (while creating an ebuild file for gentoo) that there are quite a lot of deprecation warnings for glib in mysql workbench.

I've fixed them and hit so far no problem, but the changes are rather invasive.

Additionally I've noticed a few build system related problems:

- Linking with as-needed ld flag
- CMake minimum version is too low
- Python 2.7 should be checked (as Python 3 is not supported and leads to build failures)
- Disable unused parameter warnings explicitly
- Some pragma's reference "Wtype-limit", it should be "Wtype-limits"
- the removal of the glib deprecated functions make a minimum version of 2.32 necessary

I've fixed a small corner case with argument parsing (using mysql-workbench vs mysql-workbench-bin / get_env_path is not checked), too.

The following deprecated stuff was replaced:

- g_thread_init => not necessary anymore
- g_cond / g_mutex functions (g_cond_new/g_cond_free/g_mutex_new/g_mutex_free)
  => changed to g_cond_clean/g_cond_init/g_mutex_init/g_mutex_clean
  => changed class properties (as pointers would need mem allocation now)

- GStaticMutex => GMutex
- g_strcasecmp => g_ascii_strcasecmp
- g_thread_create => g_thread_new / g_thread_try_new
- g_async_queue_timed_pop => g_async_queue_timeout_pop
- g_atomic_int_exchange_and_add => g_atomic_int_add

This reduces the build output quite a lot...

How to repeat:
Build MySQL Workbench source and notice the warnings.
[17 Nov 2013 3:04] Henning Habighorst
Patches mentioned in bug report

Attachment: patches_mysql_workbench.tar.gz (application/x-gzip, text), 170.00 KiB.

[18 Nov 2013 17:14] Alfredo Kojima
Hi Henning

Thank you very much for looking into the problems caused by the new version of glib.

We have already fixed these warnings in our development tree, with additional provisions to keep Workbench compiling in older versions of glib (we can't stop supporting distros shipping the previous version of glib yet). The fixes will be included in a future version of WB. We'll also take a look at the other fixed you mention in your report/patch and try to include these as soon as possible.

Once again, thanks for your bug report and patch.
[16 Jan 2014 4:44] Philip Olson
Fixed as of the upcoming Workbench 6.0.9 release, and here is the changelog entry:

On Linux, building MySQL Workbench from source would generate many glib
related warnings with newer versions of glib.

Thank you for the bug report.