Source: qt4-x11
Version: Add workarounds in moc, to prevent crashing at boost1.53 (jessie)
Severity: wishlist
Tags: patch
User: pkg-boost-de...@lists.alioth.debian.org
Usertags: boost1.53

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

boost1.53 transition is being planned (See bug #704032)

When doing a test rebuild I noticed that:
avogadro
fatrat
gofigure2
kdepim
ovito
pokerth
qsapecng
yade

Have moc fail in the following manner:

yade_0.90.3-1~exp1_amd64-20130326-0141.build-[ 24%] Generating 
qt4/moc_GLViewer.cxx
yade_0.90.3-1~exp1_amd64-20130326-0141.build-cd /«PKGBUILDDIR»/debian/build/gui 
&& /usr/lib/x86_64-linux-gnu/qt4/bin/moc -I/usr/include -I/usr/include/eigen3 
-I/usr/include/vtk-5.8 -I/usr/include -I/usr/include/glib-2.0 
-I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/glib-2.0 
-I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/qt4/QtDesigner 
-I/usr/include/qt4/QtDeclarative -I/usr/include/qt4/QtScriptTools 
-I/usr/include/qt4/QtDBus -I/usr/include/qt4/QtDesigner 
-I/usr/include/qt4/QtXml -I/usr/include/qt4/QtSql -I/usr/include/qt4/QtOpenGL 
-I/usr/include/qt4/QtNetwork -I/usr/include/qt4/QtXmlPatterns 
-I/usr/include/qt4/QtHelp -I/usr/include/qt4/QtUiTools 
-I/usr/include/qt4/QtTest -I/usr/include/qt4/QtScript -I/usr/include/qt4/QtSvg 
-I/usr/include/qt4/Qt3Support -I/usr/include/qt4/QtGui 
-I/usr/include/qt4/QtCore -I/usr/share/qt4/mkspecs/default -I/usr/include/qt4 
-I/usr/include/qt4/QtCore -I/usr/include -I/usr/include/python2.7 
-I/usr/include/x86_64-linux-g
 nu/python2.7 -I/«PKGBUILDDIR»/extra/floating_point_utilities_v3 
-I/«PKGBUILDDIR»/debian/build -I/usr/include/qt4 -I/usr/include/qt4/QtOpenGL 
-I/usr/include/qt4/QtGui -I/usr/include/qt4/QtCore -I/usr/include 
-DQT_OPENGL_LIB -DQT_GUI_LIB -DQT_CORE_LIB -o 
/«PKGBUILDDIR»/debian/build/gui/qt4/moc_GLViewer.cxx 
/«PKGBUILDDIR»/gui/qt4/GLViewer.hpp
yade_0.90.3-1~exp1_amd64-20130326-0141.build:usr/include/boost/type_traits/detail/has_binary_operator.hp:50:
 Parse error at "BOOST_JOIN"

Previously workarounds were applied in the packages directly to guard
with QT_NO_MOC. This time around, I'm asking to apply a patch in Qt.
Because IMHO it's a bug in moc which has been fixed in Qt5 to support
macro substitutions. And even if, we fix the 8 affected packages
moc4.x will still fail for other developers who happen to include that
boost header. Another alternative is to fix this in boost and add
Q_MOC_RUN guards, but imho that's ugly as well.

Please consider applying the attached patch.

Regards,

Dmitrijs.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)

iQIcBAEBCAAGBQJRUsJ4AAoJEIh7YGGLPBauLlsP/1vWUUDWUgeSlomt5bCi/JZq
JFYjWby4vcKU6XcNOgAxtmWezLyTJmvp1wAFXewIm8c8ZlZQ2Upn+AoKPH/vlc1c
3OgLc7mkaK63jpi0AYAumVlq2KvtkjSIT2NI65XSgKRhUJY2fqw9MiClqFAatndX
6DZEtm8q9tLLJquiFx5L+RYKHLY+xUZ8vctmol9P5opGVECQl3h0bdPYyREmOaJq
XriAnk5d4J/1r57bEp6nNEpuwQM10N1yEBDTr0/C9hKuM7NnN603UPybqQFHkZfy
AvOyB6gPy0gvcphIoiaffXmNBMrr2xxKcQMu14e0CVn/eQJu2QTz78oLgkJsvWC2
MsHiFe1qb8trlG+rrtP6eI4NNplchKHdqXBezOZOylFJhP3LgE3krxenFEuekjOI
4C7noH8nu7jW7t/B/+cN4pBuAuoeCfYuuKFsXS2anqTm1MvgxXMOwzUqPVtDVfM3
WTSo8LHyeJ5e1Kba4EkCBNZeqiqaG3BPbVp8r/S692GCK6g2YJtr9sVRV37H8iDj
xJBGkrK56p7/m5FAa9DzCtvRmcbJ+7QtnVWb5LaOXS9uT2oVPJZnyNl0h5axsVoO
1zGAe+J4bWgtEImQFGum8FB7x1DOnL9oslNEqKKwm+3OzgTqfPw4/MzeBJ5HJ88c
IpQS6lRcCTEFI4FEbtcg
=apMk
-----END PGP SIGNATURE-----
Description: fix moc in 4.x tripping over BOOST
Origin: http://pkgs.fedoraproject.org/cgit/qt.git/plain/qt-everywhere-opensource-src-4.8.0-rc1-moc-boost148.patch?id=060db3c767b670dc1e168252644c937abc9fe607
Bug: https://bugreports.qt-project.org/browse/QTBUG-22829
Bug-RedHat: https://bugzilla.redhat.com/756395
Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/qt4-x11/+bug/1119656
Applied-Upstream: Qt5 has proper parsing support.

diff -ur qt-everywhere-opensource-src-4.8.0/src/tools/moc/main.cpp qt-everywhere-opensource-src-4.8.0-moc-boost148/src/tools/moc/main.cpp
--- qt-everywhere-opensource-src-4.8.0/src/tools/moc/main.cpp	2011-10-04 05:44:32.000000000 +0200
+++ qt-everywhere-opensource-src-4.8.0-moc-boost148/src/tools/moc/main.cpp	2011-12-04 00:11:25.000000000 +0100
@@ -187,6 +187,8 @@
     Moc moc;
     pp.macros["Q_MOC_RUN"];
     pp.macros["__cplusplus"];
+    pp.macros["BOOST_TT_HAS_OPERATOR_HPP_INCLUDED"]; // rh#756395
+    pp.macros["BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION"];
     QByteArray filename;
     QByteArray output;
     FILE *in = 0;

Reply via email to