control: tags -1 help

On Thu, Aug 06, 2015 at 10:48:12PM +0200, Martin Quinson wrote:
> On Thu, Aug 06, 2015 at 12:38:41PM +0200, Tobias Frost wrote:
> > 
> > Hi Martin,
> > 
> > Thanks for the reply!
> > can you check if the workaround would solve this; Maybe a quick fix would
> > help to get the libconfig transition forward faster, as a new upstream
> > version takes lots more time...
> > 
> 
> I will need to wait for tomorrow night as I have no good connexion
> here. I'm not even sure of when this mail will get out of my box :(

Ok, I'm back to the civilization, and I now have a decent connexion. I
did as you adviced, trying to first fix the FTBFS and then package the
next version, but I didn't manage to do so.

I tried to abuse the include system as described in
 https://bugs.debian.org/653796
ie, with 
 QT4_WRAP_CPP(sources ${moc-sources} OPTIONS 
-DBOOST_TT_HAS_OPERATOR_HPP_INCLUDED)
but it didn't work for me.

I tried to include boost headers only if MOC is not in use, as with
attached patch1, but it did not work.

I tried to define BOOST_TT_HAS_OPERATOR_HPP_INCLUDED if MOC is in use,
as with attached patch2, but it did not work either.
http://anonscm.debian.org/cgit/pkg-kde/kde-extras/qt-gstreamer.git/commit/?id=4116865bd6f36870b6cab16119a5c52c8d1ee796

I must be stupid since these fixes did work in other projects so I
must do something wrong, but I fail to see what. I'm now clueless, and
any help (or even better, patch) would be welcome :-(

Taging the bug as such.

Sorry, Mt.

-- 
A few hours at the desk can very easily be replaced by a few months in
the lab.    -- old engineers saying
Fix a FTBFS due to the bad interaction of Qt4 and boost 1.48 and higher.

The MOC source parser have only a partial support of the C++ standard,
and boost is using the full potential of that standard, so don't load
the boost headers when MOC is parsing the source.

See https://bugreports.qt.io/browse/QTBUG-22829 for more details on
this crude hack.

---
 src/utils/QPajeTypeFilter.cc  |    3 +++
 src/vv_treemap/PajeTreemap.cc |    2 ++
 3 files changed, 11 insertions(+), 3 deletions(-)

Index: b/src/utils/QPajeTypeFilter.cc
===================================================================
--- a/src/utils/QPajeTypeFilter.cc
+++ b/src/utils/QPajeTypeFilter.cc
@@ -17,7 +17,10 @@
 #include "QPajeTypeFilter.h"
 #include <QtGui>
 #include <QPushButton>
+
+#ifndef Q_MOC_RUN /* MOC can choke on some boost headers */
 #include <boost/foreach.hpp>
+#endif
 
 QPajeTypeFilter::QPajeTypeFilter (QWidget *parent)
 {
Index: b/src/vv_treemap/PajeTreemap.cc
===================================================================
--- a/src/vv_treemap/PajeTreemap.cc
+++ b/src/vv_treemap/PajeTreemap.cc
@@ -15,7 +15,9 @@
     along with PajeNG. If not, see <http://www.gnu.org/licenses/>.
 */
 #include "PajeTreemap.h"
+#ifndef Q_MOC_RUN /* MOC can choke on some boost headers */
 #include <boost/foreach.hpp>
+#endif
 #include <float.h>
 
 PajeTreemap::PajeTreemap (PajeTreemap *parent, PajeComponent *filter, 
PajeContainer *container)
Fix a FTBFS due to the bad interaction of Qt4 and boost 1.48 and higher.

The MOC source parser have only a partial support of the C++ standard,
and boost is using the full potential of that standard, so don't load
the boost headers when MOC is parsing the source.

See https://bugreports.qt.io/browse/QTBUG-22829 for more details on
this crude hack.

---
 src/utils/QPajeTypeFilter.cc  |    4 ++++
 src/vv_treemap/PajeTreemap.cc |    4 ++++
 2 files changed, 8 insertions(+)

Index: b/src/utils/QPajeTypeFilter.cc
===================================================================
--- a/src/utils/QPajeTypeFilter.cc
+++ b/src/utils/QPajeTypeFilter.cc
@@ -14,6 +14,10 @@
     You should have received a copy of the GNU Public License
     along with Viva. If not, see <http://www.gnu.org/licenses/>.
 */
+#ifndef Q_MOC_RUN /* MOC can choke on some boost headers */
+#define BOOST_TT_HAS_OPERATOR_HPP_INCLUDED /* So abuse header inclusion 
protection to prevent Moc from including Boost internals */
+#endif
+
 #include "QPajeTypeFilter.h"
 #include <QtGui>
 #include <QPushButton>
Index: b/src/vv_treemap/PajeTreemap.cc
===================================================================
--- a/src/vv_treemap/PajeTreemap.cc
+++ b/src/vv_treemap/PajeTreemap.cc
@@ -14,6 +14,10 @@
     You should have received a copy of the GNU Public License
     along with PajeNG. If not, see <http://www.gnu.org/licenses/>.
 */
+#ifndef Q_MOC_RUN /* MOC can choke on some boost headers */
+#define BOOST_TT_HAS_OPERATOR_HPP_INCLUDED /* So abuse header inclusion 
protection to prevent Moc from including Boost internals */
+#endif
+
 #include "PajeTreemap.h"
 #include <boost/foreach.hpp>
 #include <float.h>

Attachment: signature.asc
Description: Digital signature

Reply via email to