qemu-linaro FTBFS on arm because of deprecated gthread calls

Bug #928555 reported by Steve Langasek
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Linaro QEMU
Fix Released
Undecided
Unassigned
qemu-linaro (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

qemu-linaro is failing to build on armel and armhf because it uses deprecated glib interfaces:

  CC coroutine-gthread.o
/build/buildd/qemu-linaro-1.0.50-2012.01/coroutine-gthread.c: In function 'coroutine_init':
/build/buildd/qemu-linaro-1.0.50-2012.01/coroutine-gthread.c:47:5: error: 'g_cond_new' is deprecated (declared at /usr/include/glib-2.0/glib/deprecated/gthread.h:275) [-Werror=deprecated-declarations]
/build/buildd/qemu-linaro-1.0.50-2012.01/coroutine-gthread.c: In function 'coroutine_thread':
/build/buildd/qemu-linaro-1.0.50-2012.01/coroutine-gthread.c:68:5: error: 'g_static_private_set' is deprecated (declared at /usr/include/glib-2.0/glib/deprecated/gthread.h:248): Use 'g_private_set' instead [-Werror=deprecated-declarations]
/build/buildd/qemu-linaro-1.0.50-2012.01/coroutine-gthread.c: In function 'qemu_coroutine_new':
/build/buildd/qemu-linaro-1.0.50-2012.01/coroutine-gthread.c:80:5: error: 'g_thread_create_full' is deprecated (declared at /usr/include/glib-2.0/glib/deprecated/gthread.h:106): Use 'g_thread_new' instead [-Werror=deprecated-declarations]
/build/buildd/qemu-linaro-1.0.50-2012.01/coroutine-gthread.c: In function 'qemu_coroutine_self':
/build/buildd/qemu-linaro-1.0.50-2012.01/coroutine-gthread.c:120:5: error: 'g_static_private_get' is deprecated (declared at /usr/include/glib-2.0/glib/deprecated/gthread.h:245): Use 'g_private_get' instead [-Werror=deprecated-declarations]
/build/buildd/qemu-linaro-1.0.50-2012.01/coroutine-gthread.c:125:9: error: 'g_static_private_set' is deprecated (declared at /usr/include/glib-2.0/glib/deprecated/gthread.h:248): Use 'g_private_set' instead [-Werror=deprecated-declarations]
/build/buildd/qemu-linaro-1.0.50-2012.01/coroutine-gthread.c: In function 'qemu_in_coroutine':
/build/buildd/qemu-linaro-1.0.50-2012.01/coroutine-gthread.c:133:5: error: 'g_static_private_get' is deprecated (declared at /usr/include/glib-2.0/glib/deprecated/gthread.h:245): Use 'g_private_get' instead [-Werror=deprecated-declarations]
cc1: all warnings being treated as errors

This only affects armel and armhf archs, because when cpu != arm, configure uses the ucontext implementation instead of the gthread one. And qemu running on arm is not so useful (yet?). But the code should probably be fixed all the same to not use deprecated interfaces.

Revision history for this message
Marcin Juszkiewicz (hrw) wrote :

Disabling "cpu != arm" check results in successful build. Did not checked resulting binaries.

tags: added: arm-porting-queue armel
Revision history for this message
Marcin Juszkiewicz (hrw) wrote :
tags: added: patch
Changed in qemu-linaro:
status: New → Confirmed
Changed in qemu-linaro (Ubuntu):
status: New → Confirmed
Revision history for this message
Peter Maydell (pmaydell) wrote :

Your patch is wrong because the reason we disable use of ucontext on ARM is because eglibc provides only stub versions which always fail...

The right fix here is to update the gthread code so it uses whatever the non-deprecated APIs are (plus fallback to the deprecated versions so we don't break on older versions of glib).

Revision history for this message
Peter Maydell (pmaydell) wrote :

I've submitted this patch upstream:
http://patchwork.ozlabs.org/patch/144426/
(only tested compilation on a precise chroot on an i386 box with the configure test nobbled to always fall back to gthreads, but it should fix the ARM build problem too). The patch seems kinda ugly, although really it's an ugliness forced on us by GLib API churn; we'll see what upstream think.

Peter Maydell (pmaydell)
Changed in qemu-linaro:
status: Confirmed → Fix Committed
milestone: none → 2012.03
Peter Maydell (pmaydell)
Changed in qemu-linaro:
status: Fix Committed → Fix Released
Steve Langasek (vorlon)
Changed in qemu-linaro (Ubuntu):
status: Confirmed → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package qemu-linaro - 1.0.50-2012.03-0ubuntu1

---------------
qemu-linaro (1.0.50-2012.03-0ubuntu1) precise; urgency=low

  * Update watch file since launchpad now uses https for the download links.
  * New upstream release.
    - Fixes use of deprecated gthread calls when building on arm.
      LP: #928555.
  * Drop 0001_linux-user-reserve-4GB-of-vmem-for-32-on-64.patch, included
    upstream with some follow-on fixes.
 -- Steve Langasek <email address hidden> Thu, 15 Mar 2012 16:18:18 -0700

Changed in qemu-linaro (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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