Bug 26004

Summary: Missing include in types.h
Product: Telepathy Reporter: Dariusz Mikulski <dariusz.mikulski>
Component: tp-qtAssignee: Telepathy bugs list <telepathy-bugs>
Status: RESOLVED FIXED QA Contact: Telepathy bugs list <telepathy-bugs>
Severity: normal    
Priority: medium CC: dariusz.mikulski
Version: git master   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments: Patch

Description Dariusz Mikulski 2010-01-12 04:54:20 UTC
telepathy-qt4-0.2.0 (latest version using automake 1.8.5 from maemo) with Qt 4.6 from maemo extras-devel repo can't build on Maemo 5.
Problem is in TelepathyQt4/types.h where define HAVE_QDBUSVARIANT_OPERATOR_EQUAL is checked. It's already defined in config.h but this file isn't included in types.h

Patch is in attachment.

Compilation error:

/opt/qt4-maemo5/bin/moc -DBUILDING_TELEPATHY_QT4 -I.. -I.. -DQT_SHARED -I/opt/qt4-maemo5/include -I/opt/qt4-maemo5/include/QtCore   -DQT_SHARED -I/opt/qt4-maemo5/include -I/opt/qt4-maemo5/include/QtDBus -I/opt/qt4-maemo5/include/QtCore -I/opt/qt4-maemo5/include/QtXml   -DQT_SHARED -I/opt/qt4-maemo5/include -I/opt/qt4-maemo5/include/QtNetwork -I/opt/qt4-maemo5/include/QtCore -I/opt/qt4-maemo5/include/QtDBus -I/opt/qt4-maemo5/include/QtXml   -i abstract-interface.h -o _gen/abstract-interface.moc.hpp
make  all-recursive
make[3]: Entering directory `/home/malcolm/source/telepathy-qt4/TelepathyQt4'
Making all in .
make[4]: Entering directory `/home/malcolm/source/telepathy-qt4/TelepathyQt4'
if /bin/sh ../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. -I. -I..  -DBUILDING_TELEPATHY_QT4 -I.. -I.. -DQT_SHARED -I/opt/qt4-maemo5/include -I/opt/qt4-maemo5/include/QtCore   -DQT_SHARED -I/opt/qt4-maemo5/include -I/opt/qt4-maemo5/include/QtDBus -I/opt/qt4-maemo5/include/QtCore -I/opt/qt4-maemo5/include/QtXml   -DQT_SHARED -I/opt/qt4-maemo5/include -I/opt/qt4-maemo5/include/QtNetwork -I/opt/qt4-maemo5/include/QtCore -I/opt/qt4-maemo5/include/QtDBus -I/opt/qt4-maemo5/include/QtXml    -Wall -Wextra -Wsign-compare -Wpointer-arith -Wformat-security -Winit-self -Wno-missing-field-initializers -Wno-unused-parameter -g -O2 -MT abstract-client.lo -MD -MP -MF ".deps/abstract-client.Tpo" -c -o abstract-client.lo abstract-client.cpp; \
	then mv -f ".deps/abstract-client.Tpo" ".deps/abstract-client.Plo"; else rm -f ".deps/abstract-client.Tpo"; exit 1; fi
 g++ -DHAVE_CONFIG_H -I. -I. -I.. -DBUILDING_TELEPATHY_QT4 -I.. -I.. -DQT_SHARED -I/opt/qt4-maemo5/include -I/opt/qt4-maemo5/include/QtCore -DQT_SHARED -I/opt/qt4-maemo5/include -I/opt/qt4-maemo5/include/QtDBus -I/opt/qt4-maemo5/include/QtCore -I/opt/qt4-maemo5/include/QtXml -DQT_SHARED -I/opt/qt4-maemo5/include -I/opt/qt4-maemo5/include/QtNetwork -I/opt/qt4-maemo5/include/QtCore -I/opt/qt4-maemo5/include/QtDBus -I/opt/qt4-maemo5/include/QtXml -Wall -Wextra -Wsign-compare -Wpointer-arith -Wformat-security -Winit-self -Wno-missing-field-initializers -Wno-unused-parameter -g -O2 -MT abstract-client.lo -MD -MP -MF .deps/abstract-client.Tpo -c abstract-client.cpp  -fPIC -DPIC -o .libs/abstract-client.o
In file included from ../TelepathyQt4/Types:8,
                 from ../TelepathyQt4/abstract-client.h:30,
                 from ../TelepathyQt4/AbstractClient:8,
                 from abstract-client.cpp:22:
../TelepathyQt4/types.h: In function 'bool operator==(const QDBusVariant&, const QDBusVariant&)':
../TelepathyQt4/types.h:102: error: redefinition of 'bool operator==(const QDBusVariant&, const QDBusVariant&)'
/opt/qt4-maemo5/include/QtDBus/qdbusextratypes.h:177: error: 'bool operator==(const QDBusVariant&, const QDBusVariant&)' previously defined here
Comment 1 Dariusz Mikulski 2010-01-12 04:57:10 UTC
Created attachment 32587 [details] [review]
Patch
Comment 2 Simon McVittie 2010-01-12 05:20:03 UTC
Please use 0.2.1, where this was already fixed. Maemo 5 does have automake 1.9, you just have to use it explicitly (automake-1.9 and aclocal-1.9); see the Maemo 5 packaging for telepathy-glib for how to run it (if you need to run autogen.sh at all).

This patch is wrong, config.h doesn't get installed (and shouldn't be), so that would break inclusion of types.h; the fix in 0.2.1 is different.

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.