Bug 45850

Summary: Telepathy Qt4 cannot compile against glib 2.31.0 and above
Product: Telepathy Reporter: Rohan Garg <rohan>
Component: tp-qtAssignee: Telepathy bugs list <telepathy-bugs>
Status: RESOLVED FIXED QA Contact: Telepathy bugs list <telepathy-bugs>
Severity: normal    
Priority: medium    
Version: git master   
Hardware: x86-64 (AMD64)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:

Description Rohan Garg 2012-02-09 10:49:37 UTC
Currently when trying to compile Telepathy Qt4 against glib 2.31.0 on Ubuntu Precise, the compilation fails as follows : 

build|master⚡ ⇒ m
[  0%] Built target stable-ifaces-includator
[  0%] [  0%] [  0%] Built target future-ifaces-includator
Built target example-extensions-connection-includator
Built target example-extensions-includator
Scanning dependencies of target example-cm-callable
[  0%] [  1%] [  4%] [  5%] Building C object tests/lib/glib/contactlist/CMakeFiles/example-cm-contactlist.dir/conn.c.o
Built target future-constants
Built target stable-constants
Built target tp-glib-tests-future-extensions
[  6%] Built target example-cm-csh
[  7%] Built target example-cm-echo
[  8%] Built target example-cm-echo2
[  8%] [  9%] [ 10%] Built target stable-typesgen
Built target example-extensions-constants
Built target future-typesgen
[ 10%] Scanning dependencies of target telepathy-qt-test-backdoors
Scanning dependencies of target account-spec-xincludator
Scanning dependencies of target channel-spec-xincludator
Building C object tests/lib/glib/contactlist2/CMakeFiles/example-cm-contactlist2.dir/conn.c.o
Scanning dependencies of target account-manager-spec-xincludator
Scanning dependencies of target channel-dispatcher-spec-xincludator
[ 11%] Scanning dependencies of target channel-request-spec-xincludator
Building C object tests/lib/glib/callable/CMakeFiles/example-cm-callable.dir/media-channel.c.o
[ 11%] [ 11%] [ 11%] [ 11%] Generating _gen/spec-account.xml
Generating _gen/spec-account-manager.xml
Generating _gen/spec-channel-request.xml
[ 11%] Generating _gen/spec-channel.xml
Generating _gen/spec-channel-dispatcher.xml
[ 11%] [ 11%] Building CXX object TelepathyQt/CMakeFiles/telepathy-qt-test-backdoors.dir/key-file.cpp.o
[ 11%] Built target account-manager-spec-xincludator
Built target channel-request-spec-xincludator
[ 11%] Scanning dependencies of target dbus-spec-xincludator
[ 11%] Building C object tests/lib/glib/callable/CMakeFiles/example-cm-callable.dir/media-stream.c.o
Built target account-spec-xincludator
[ 11%] [ 11%] Built target channel-dispatcher-spec-xincludator
Generating _gen/spec-dbus.xml
Scanning dependencies of target channel-dispatch-operation-spec-xincludator
Scanning dependencies of target connection-manager-spec-xincludator
[ 11%] Generating _gen/spec-connection-manager.xml
[ 11%] [ 11%] Generating _gen/spec-channel-dispatch-operation.xml
Built target dbus-spec-xincludator
[ 11%] /home/shadeslayer/kde/telepathy/telepathy-qt4/tests/lib/glib/contactlist/conn.c: In function ‘alias_updated_cb’:
/home/shadeslayer/kde/telepathy/telepathy-qt4/tests/lib/glib/contactlist/conn.c:185:3: error: ‘g_value_array_new’ is deprecated (declared at /usr/include/glib-2.0/gobject/gvaluearray.h:58): Use 'g_array_new' instead [-Werror=deprecated-declarations]
/home/shadeslayer/kde/telepathy/telepathy-qt4/tests/lib/glib/contactlist/conn.c:186:3: error: ‘g_value_array_append’ is deprecated (declared at /usr/include/glib-2.0/gobject/gvaluearray.h:71): Use 'g_array_append_vals' instead [-Werror=deprecated-declarations]
/home/shadeslayer/kde/telepathy/telepathy-qt4/tests/lib/glib/contactlist/conn.c:187:3: error: ‘g_value_array_append’ is deprecated (declared at /usr/include/glib-2.0/gobject/gvaluearray.h:71): Use 'g_array_append_vals' instead [-Werror=deprecated-declarations]
/home/shadeslayer/kde/telepathy/telepathy-qt4/tests/lib/glib/contactlist/conn.c:200:3: error: ‘g_value_array_free’ is deprecated (declared at /usr/include/glib-2.0/gobject/gvaluearray.h:61): Use 'g_array_unref' instead [-Werror=deprecated-declarations]
cc1: all warnings being treated as errors

make[2]: *** [tests/lib/glib/contactlist/CMakeFiles/example-cm-contactlist.dir/conn.c.o] Error 1
make[1]: *** [tests/lib/glib/contactlist/CMakeFiles/example-cm-contactlist.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 12%] /home/shadeslayer/kde/telepathy/telepathy-qt4/tests/lib/glib/contactlist2/conn.c: In function ‘alias_updated_cb’:
/home/shadeslayer/kde/telepathy/telepathy-qt4/tests/lib/glib/contactlist2/conn.c:166:3: error: ‘g_value_array_new’ is deprecated (declared at /usr/include/glib-2.0/gobject/gvaluearray.h:58): Use 'g_array_new' instead [-Werror=deprecated-declarations]
/home/shadeslayer/kde/telepathy/telepathy-qt4/tests/lib/glib/contactlist2/conn.c:167:3: error: ‘g_value_array_append’ is deprecated (declared at /usr/include/glib-2.0/gobject/gvaluearray.h:71): Use 'g_array_append_vals' instead [-Werror=deprecated-declarations]
/home/shadeslayer/kde/telepathy/telepathy-qt4/tests/lib/glib/contactlist2/conn.c:168:3: error: ‘g_value_array_append’ is deprecated (declared at /usr/include/glib-2.0/gobject/gvaluearray.h:71): Use 'g_array_append_vals' instead [-Werror=deprecated-declarations]
/home/shadeslayer/kde/telepathy/telepathy-qt4/tests/lib/glib/contactlist2/conn.c:181:3: error: ‘g_value_array_free’ is deprecated (declared at /usr/include/glib-2.0/gobject/gvaluearray.h:61): Use 'g_array_unref' instead [-Werror=deprecated-declarations]
/home/shadeslayer/kde/telepathy/telepathy-qt4/tests/lib/glib/callable/media-channel.c: In function ‘media_list_streams’:
/home/shadeslayer/kde/telepathy/telepathy-qt4/tests/lib/glib/callable/media-channel.c:789:3: error: ‘g_value_array_free’ is deprecated (declared at /usr/include/glib-2.0/gobject/gvaluearray.h:61): Use 'g_array_unref' instead [-Werror=deprecated-declarations]
Building CXX object TelepathyQt/CMakeFiles/telepathy-qt-test-backdoors.dir/manager-file.cpp.o
cc1: all warnings being treated as errors

[ 12%] make[2]: *** [tests/lib/glib/contactlist2/CMakeFiles/example-cm-contactlist2.dir/conn.c.o] Error 1
make[1]: *** [tests/lib/glib/contactlist2/CMakeFiles/example-cm-contactlist2.dir/all] Error 2
Built target channel-dispatch-operation-spec-xincludator
cc1: all warnings being treated as errors

Building CXX object TelepathyQt/CMakeFiles/telepathy-qt-test-backdoors.dir/test-backdoors.cpp.o
make[2]: *** [tests/lib/glib/callable/CMakeFiles/example-cm-callable.dir/media-channel.c.o] Error 1
make[2]: *** Waiting for unfinished jobs....
[ 12%] Building CXX object TelepathyQt/CMakeFiles/telepathy-qt-test-backdoors.dir/utils.cpp.o
[ 12%] Built target connection-manager-spec-xincludator
/home/shadeslayer/kde/telepathy/telepathy-qt4/tests/lib/glib/callable/media-stream.c: In function ‘get_property’:
/home/shadeslayer/kde/telepathy/telepathy-qt4/tests/lib/glib/callable/media-stream.c:169:11: error: ‘g_value_array_new’ is deprecated (declared at /usr/include/glib-2.0/gobject/gvaluearray.h:58): Use 'g_array_new' instead [-Werror=deprecated-declarations]
/home/shadeslayer/kde/telepathy/telepathy-qt4/tests/lib/glib/callable/media-stream.c:174:15: error: ‘g_value_array_append’ is deprecated (declared at /usr/include/glib-2.0/gobject/gvaluearray.h:71): Use 'g_array_append_vals' instead [-Werror=deprecated-declarations]
cc1: all warnings being treated as errors

make[2]: *** [tests/lib/glib/callable/CMakeFiles/example-cm-callable.dir/media-stream.c.o] Error 1
make[1]: *** [tests/lib/glib/callable/CMakeFiles/example-cm-callable.dir/all] Error 2
[ 12%] Built target channel-spec-xincludator
Linking CXX static library libtelepathy-qt-test-backdoors.a
[ 12%] Built target telepathy-qt-test-backdoors
make: *** [all] Error 2


It seems all tests need a ifdef'ing around older API calls to glib.
Comment 1 Simon McVittie 2012-02-10 01:48:11 UTC
The tests should disable GLib deprecation warnings, for the moment: using GValueArray in dbus-glib code is unavoidable, and the current version of telepathy-glib uses dbus-glib.

Telepathy 1.0 will hopefully get rid of all the GValueArrays.

Here's what appears in telepathy-glib's configure.ac:

# Disable GLib deprecation warnings for now; GValueArray is deprecated but we
# need it for dbus-glib.
AC_DEFINE(GLIB_DISABLE_DEPRECATION_WARNINGS, 1, [Build with GLib deprecated])
Comment 2 Andre Moreira Magalhaes 2012-02-13 06:14:19 UTC
(In reply to comment #1)
> The tests should disable GLib deprecation warnings, for the moment: using GValueArray in dbus-glib code is unavoidable, and the current version of
> telepathy-glib uses dbus-glib.
> 
> Telepathy 1.0 will hopefully get rid of all the GValueArrays.
> 
> Here's what appears in telepathy-glib's configure.ac:
> 
> # Disable GLib deprecation warnings for now; GValueArray is deprecated but we
> # need it for dbus-glib.
> AC_DEFINE(GLIB_DISABLE_DEPRECATION_WARNINGS, 1, [Build with GLib deprecated])

Thanks for the tip, I did the same in tp-qt, merged upstream. It will be in tp-qt 0.9.1

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.