FTBFS due to removed g_thread_init

Bug #911125 reported by Martin Pitt on 2012-01-03
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
D-Bus
Fix Released
Medium
Yelp
Fix Released
Medium
librest
Fix Released
Medium
dbus (Ubuntu)
High
Martin Pitt
Precise
High
Martin Pitt
evolution-data-server (Ubuntu)
Undecided
Mathieu Trudel-Lapierre
Precise
Undecided
Mathieu Trudel-Lapierre
evolution-exchange (Ubuntu)
Undecided
Mathieu Trudel-Lapierre
Precise
Undecided
Mathieu Trudel-Lapierre
evolution-webcal (Ubuntu)
Undecided
Mathieu Trudel-Lapierre
Precise
Undecided
Mathieu Trudel-Lapierre
geoclue (Ubuntu)
High
Ken VanDine
Precise
High
Ken VanDine
gnome-keyring (Ubuntu)
High
Martin Pitt
Precise
High
Martin Pitt
gnome-utils (Ubuntu)
High
Martin Pitt
Precise
High
Martin Pitt
gtk-sharp2 (Ubuntu)
High
Chris Halse Rogers
Precise
High
Chris Halse Rogers
gtkhtml3.14 (Ubuntu)
High
Martin Pitt
Precise
High
Martin Pitt
gtkhtml4.0 (Ubuntu)
Undecided
Unassigned
Precise
Undecided
Unassigned
librest (Ubuntu)
High
Martin Pitt
Precise
High
Martin Pitt
likewise-open (Ubuntu)
High
Martin Pitt
Precise
High
Martin Pitt
yelp (Ubuntu)
High
Martin Pitt
Precise
High
Martin Pitt

Bug Description

g_thread_init() and friends have been deprecated since glib 2.24. This causes some packages to FTBFS when they fail to build on warnings.

The fix is to replace g_thread_init() with g_type_init(). Alternatively you can build without G_DISABLE_DEPRECATED, but of course it's better to fix it properly.

http://people.ubuntuwire.org/~wgrant/rebuild-ftbfs-test/test-rebuild-20111222-precise.html

Martin Pitt (pitti) on 2012-01-03
description: updated
Changed in dbus (Ubuntu):
status: New → Triaged
importance: Undecided → High
Changed in dbus (Ubuntu Precise):
assignee: nobody → Martin Pitt (pitti)
Changed in evolution-data-server (Ubuntu Precise):
assignee: nobody → Mathieu Trudel-Lapierre (mathieu-tl)
Changed in evolution-exchange (Ubuntu Precise):
assignee: nobody → Mathieu Trudel-Lapierre (mathieu-tl)
Changed in evolution-webcal (Ubuntu Precise):
assignee: nobody → Mathieu Trudel-Lapierre (mathieu-tl)
Changed in geoclue (Ubuntu Precise):
assignee: nobody → Ken VanDine (ken-vandine)
importance: Undecided → High
status: New → Triaged
Changed in evolution-data-server (Ubuntu Precise):
status: New → Triaged
Changed in gtk-sharp2 (Ubuntu Precise):
assignee: nobody → Chris Halse Rogers (raof)
importance: Undecided → High
status: New → Triaged
Changed in gnome-utils (Ubuntu Precise):
assignee: nobody → Martin Pitt (pitti)
importance: Undecided → High
status: New → Triaged
Changed in gnome-keyring (Ubuntu Precise):
assignee: nobody → Martin Pitt (pitti)
importance: Undecided → High
status: New → Triaged
Changed in likewise-open (Ubuntu Precise):
assignee: nobody → Martin Pitt (pitti)
importance: Undecided → High
status: New → Triaged
Changed in yelp (Ubuntu Precise):
assignee: nobody → Martin Pitt (pitti)
importance: Undecided → High
status: New → Triaged
Martin Pitt (pitti) on 2012-01-03
description: updated

Both 1.4.x and trunk now fail to build with the current glib 2.31.x:

  CCLD test-relay
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
proposed patch

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.

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package dbus - 1.4.16-1ubuntu2

---------------
dbus (1.4.16-1ubuntu2) precise; urgency=low

  * Add debian/patches/02_obsolete_g_thread_api.patch: Port to glib 2.31.x
    g_thread API. Bump libglib2.0-dev build dep accordingly. (LP: #911125)
 -- Martin Pitt <email address hidden> Tue, 03 Jan 2012 11:08:46 +0100

Changed in dbus (Ubuntu Precise):
status: Triaged → Fix Released
Changed in dbus:
importance: Unknown → Medium
status: Unknown → Confirmed
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gnome-keyring - 3.2.2-1ubuntu1

---------------
gnome-keyring (3.2.2-1ubuntu1) precise; urgency=low

  * Merge with Debian unstable. Remaining Ubuntu changes:
    - Add debian/gnome-keyring.gsettings-override: Prefer
      keyserver.ubuntu.com.
    - Add debian/gnome-keyring.ubiquity: Apply capabilities at the end of the
      ubiquity process to make sure new installs have gnome-keyring-daemon with
      cap_ipc_lock+ep. Install this in debian/rules.
    - Add 04_nodisplay_autostart.patch: Clean up Startup Applications dialog
      by hiding default apps.
    - debian/watch: Watch for development versions.
  * Add 01_gmodule_include.patch: Fix FTBFS due to missing include/wrong
    linking.
  * Add 00git_glib_2.31_deprecations.patch: Fix deprecated API for building
    with glib 2.31. Backported from upstream git head. (LP: #911125)

gnome-keyring (3.2.2-1) unstable; urgency=low

  [ Michael Biebl ]
  * New upstream release.
  * Drop libgcr0 and libgcr-dev again, upstream no longer supports GTK 2
    builds.
  * Bump debhelper compatibility level to 8.
  * Add Build-Depends on libp11-kit-dev (>= 0.6).
  * Change Build-Depends on libcap-dev to libcap-ng-dev.
  * debian/watch: Track .xz tarballs.
  * debian/rules: Don't run update-mime-database utility.

  [ Jordi Mallach ]
  * Update Vcs-* URLs.

  [ Michael Biebl ]
  * debian/gnome-keyring.install: Install icons, mime types, pkcs11 config
    files and the pkcs11 modules from the multiarch paths.
  * Update for the soname bumps of libgcr and libgck:
    - Rename libgck0 → libgck-1-0.
    - Rename libgck-dev → libgck-1-dev.
    - Rename libgcr-3-0 → libgcr-3-1.
    - Update symbols files.
  * Split the API documentation into libgck-1-doc and libgcr-3-doc and add the
    necessary Breaks/Replaces.
  * Split the data files from libgcr-3-1 into a libgcr-3-common package and
    make libgcr-3-1 depend on it.
  * Make the -dev packages depend on libp11-kit-dev.
 -- Martin Pitt <email address hidden> Tue, 03 Jan 2012 12:49:49 +0100

Changed in gnome-keyring (Ubuntu Precise):
status: Triaged → Fix Released
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package yelp - 3.3.2-0ubuntu1

---------------
yelp (3.3.2-0ubuntu1) precise; urgency=low

  * debian/watch: Watch for development versions.
  * New upstream release.
  * debian/control.in: Add libgee-dev and libfolks-dev build dependencies as
    per upstream configure.ac.
  * 01_lpi.patch, 06_setup_error_on_missing_dbus.patch: Unfuzz.
  * Add 08_g_thread_init_deprecation.patch: Don't call g_thread_init().
    (LP: #911125)
  * debian/libyelp0.symbols: Add new symbol from this upstream release.
 -- Martin Pitt <email address hidden> Tue, 03 Jan 2012 13:23:15 +0100

Changed in yelp (Ubuntu Precise):
status: Triaged → Fix Released
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package likewise-open - 6.1.0.406-0ubuntu5

---------------
likewise-open (6.1.0.406-0ubuntu5) precise; urgency=low

  * Add debian/patches/g_thread_deprecation.patch: Use current glib 2.31.x
    gthread API. (LP: #911125)
 -- Martin Pitt <email address hidden> Tue, 03 Jan 2012 13:30:39 +0100

Changed in likewise-open (Ubuntu Precise):
status: Triaged → Fix Released
Changed in yelp:
importance: Unknown → Medium
status: Unknown → Confirmed
Martin Pitt (pitti) on 2012-01-03
Changed in librest (Ubuntu Precise):
assignee: nobody → Martin Pitt (pitti)
importance: Undecided → High
status: New → In Progress
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package librest - 0.7.12-1ubuntu2

---------------
librest (0.7.12-1ubuntu2) precise; urgency=low

  * Add g_thread_init_deprecation.patch: Fix FTBFS with current glib due to
    deprecation of g_init_threads(). (LP: #911125)
 -- Martin Pitt <email address hidden> Tue, 03 Jan 2012 14:53:01 +0100

Changed in librest (Ubuntu Precise):
status: In Progress → Fix Released
Martin Pitt (pitti) wrote :

gtkhtml4.0 (4.2.2-1ubuntu1) precise; urgency=low

  * Remove g_thread_init since this is no longer needed in glib 2.31
    (fixes FTBFS); This has been done upstream in the gtkhtml 4.3.2 release
    - add debian/patches/remove-g_thread_init.patch
    - update debian/patches/series

 -- Micah Gersten <email address hidden> Wed, 28 Dec 2011 04:19:26 -0600

Changed in gtkhtml4.0 (Ubuntu Precise):
status: New → Fix Released
Changed in gtkhtml3.14 (Ubuntu Precise):
assignee: nobody → Martin Pitt (pitti)
importance: Undecided → High
status: New → In Progress
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gtkhtml3.14 - 1:3.32.2-0ubuntu3

---------------
gtkhtml3.14 (1:3.32.2-0ubuntu3) precise; urgency=low

  * Add deprecated_g_thread_init.patch: Fix deprecated g_thread_init() call.
    (LP: #911125)
 -- Martin Pitt <email address hidden> Tue, 03 Jan 2012 15:27:38 +0100

Changed in gtkhtml3.14 (Ubuntu Precise):
status: In Progress → Fix Released
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gnome-utils - 3.2.1-0ubuntu2

---------------
gnome-utils (3.2.1-0ubuntu2) precise; urgency=low

  * Add 09_deprecated_g_thread_init.patch: Fix obsolete g_thread_init().
    (LP: #911125)
 -- Martin Pitt <email address hidden> Tue, 03 Jan 2012 15:37:45 +0100

Changed in gnome-utils (Ubuntu Precise):
status: Triaged → Fix Released
Changed in librest:
importance: Unknown → Medium
status: Unknown → Confirmed
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package geoclue - 0.12.0-1ubuntu11

---------------
geoclue (0.12.0-1ubuntu11) precise; urgency=low

  * debian/patches/lp_911125.patch
    - Removed deprecated call g_thread_init, g_type_init handles
      it (LP: #911125)
 -- Ken VanDine <email address hidden> Tue, 03 Jan 2012 10:50:20 -0500

Changed in geoclue (Ubuntu Precise):
status: Triaged → Fix Released
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package evolution-data-server - 3.2.2-0ubuntu2

---------------
evolution-data-server (3.2.2-0ubuntu2) precise; urgency=low

  * debian/patches/remove_g_thread_init.patch: remove calls to g_thread_init(),
    based on cherry-picked git commits c487d00 and d65649c. (LP: #911125)
  * debian/patches/gmodule_linking.patch: make sure we also link against
    gmodule.
  * debian/patches/lp878460_imap_new_folder_0e421df.patch: make sure IMAP
    accounts are displayed when trying to create a new folder. (LP: #878460)
  * debian/patches/mailbox_inbox_siblings_when_requested_b69cc8b.patch: only
    return Inbox sibling folders if they are explicitly requested.
  * debian/patches/retrieval_done_crash_c1b0058.patch: fix a possible crash
    in ecal http backend's retrieval_done.
  * debian/patches/translate_port_numbers_4d6c98f.patch: properly translate
    port number descriptions.
 -- Mathieu Trudel-Lapierre <email address hidden> Tue, 03 Jan 2012 13:27:20 -0500

Changed in evolution-data-server (Ubuntu Precise):
status: Triaged → Fix Released
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package evolution-exchange - 3.2.1-0ubuntu3

---------------
evolution-exchange (3.2.1-0ubuntu3) precise; urgency=low

  * debian/patches/remove_g_thread_init.patch: remove calls to g_thread_init()
    (LP: #911125)
 -- Mathieu Trudel-Lapierre <email address hidden> Tue, 03 Jan 2012 14:38:15 -0500

Changed in evolution-exchange (Ubuntu Precise):
status: New → Fix Released
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package evolution-webcal - 2.32.0-2ubuntu1

---------------
evolution-webcal (2.32.0-2ubuntu1) precise; urgency=low

  * debian/patches/03_g_thread_init.patch: remove calls to g_thread_init().
    (LP: #911125)
 -- Mathieu Trudel-Lapierre <email address hidden> Tue, 03 Jan 2012 15:05:07 -0500

Changed in evolution-webcal (Ubuntu Precise):
status: New → Fix Released

(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
proposed patch

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.

Changed in yelp:
status: Confirmed → Fix Released

(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.

Changed in dbus:
status: Confirmed → Fix Released
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gtk-sharp2 - 2.12.10-2ubuntu3

---------------
gtk-sharp2 (2.12.10-2ubuntu3) precise; urgency=low

  * debian/patches/04_fix_glib_2.31_threading.dpatch:
    + GLib 2.31 always has threading support, always initialises it, and has
      dropped some deprecated functions. Update glibsharpglue and
      Thread.cs to match. Fixes FTBFS (LP: #911125, LP: #935518)
  * debian/control:
    + Add versioned dependency on glib > 2.31 to libglib2.0-cil, as we depend
      on the threading behaviour of those GLibs.
  * debian/control:
  * debian/rules:
    + Add dh_autoreconf to update build system for patch
  * debian/patches/99_ltmain_as_needed:
    + Drop; dh_autoreconf does this better
 -- Christopher James Halse Rogers <email address hidden> Fri, 02 Mar 2012 18:30:17 +1100

Changed in gtk-sharp2 (Ubuntu Precise):
status: Triaged → Fix Released
Changed in librest:
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.