Bug 304111 - Kleopatra fails to build
Summary: Kleopatra fails to build
Status: RESOLVED FIXED
Alias: None
Product: kleopatra
Classification: Applications
Component: general (show other bugs)
Version: git master
Platform: Compiled Sources Linux
: NOR major
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-07-26 20:55 UTC by Andrea Scarpino
Modified: 2013-04-24 12:44 UTC (History)
10 users (show)

See Also:
Latest Commit:
Version Fixed In: 4.10.1


Attachments
proposed patch (531 bytes, patch)
2012-07-30 08:13 UTC, Andrea Scarpino
Details
Fix build with boost 1.52 (425 bytes, patch)
2013-01-31 09:44 UTC, Andrea Scarpino
Details
Fix build with boost >= 1.53 (786 bytes, patch)
2013-04-03 14:32 UTC, Heiko Becker
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andrea Scarpino 2012-07-26 20:55:03 UTC
Building the whole kdepim from git, I get:

Generating keylistmodel.moc
usr/include/boost/type_traits/detail/has_binary_operator.hp:50: Parse error at "BOOST_JOIN"
automoc4: process for /build/src/build/kleopatra/keylistmodel.moc failed: Unknown error
pid to wait for: 0

Reproducible: Always

Steps to Reproduce:
1. Try to build kleopatra code from git

Actual Results:  
the build fails

Expected Results:  
it builds

Every KDE component from git
boost 1.50.0
Comment 1 Andrea Scarpino 2012-07-30 08:13:35 UTC
Created attachment 72821 [details]
proposed patch

This fixes the build.

The failure should happen only with BOOST 1.48 or 1.50 (see https://bugreports.qt-project.org/browse/QTBUG-22829 ). So, if you want to push this, it needs some check about the boost version.
Comment 2 Alex Merry 2012-07-30 22:50:19 UTC
Unfortunately, that define won't only apply to moc, so it's not really a fix.  There doesn't appear to be a way to specify definitions for automoc, but not for anything else.

See also: https://bugreports.qt-project.org/browse/QTBUG-22829
Comment 3 Alex Merry 2012-07-30 23:04:56 UTC
Incidentally, a workaround for all KDE software that uses boost is to alter the definitions entries of $PREFIX/lib/automoc4/automoc4.files.in to read:

MOC_COMPILE_DEFINITIONS:
@_moc_cdefs@;BOOST_TT_HAS_OPERATOR_HPP_INCLUDED
MOC_DEFINITIONS:
@_moc_defs@ -DBOOST_TT_HAS_OPERATOR_HPP_INCLUDED
Comment 4 Ragnar Thomsen 2012-09-12 17:47:34 UTC
I get the same error when compiling kdepim 4.9.1 with boost 1.51.0.

Using the workaround in comment 3 fixes the problem.
Comment 5 Myriam Schweingruber 2012-09-12 20:11:22 UTC
Setting status to confirmed.
Comment 6 mparchet 2012-10-16 17:11:37 UTC
Hello,

There is a problem with the kdepim macport package.

Please see this macport ticket :

https://trac.macports.org/ticket/35210#comment:10

Can you help the macport developer  community for the kde development on mac os 10 ?

Best regards

mparchet
Comment 7 Sergio Martins 2012-11-25 15:53:25 UTC
Git commit e463ffacbaa4d722fe3b62039f2ad3560659f99a by Sergio Martins.
Committed on 25/11/2012 at 16:45.
Pushed by smartins into branch 'KDE/4.9'.

Fix build with boost >= 1.48

For Qt 4.8.4 we might have a fix upstream.

QTBUG-22829

M  +3    -0    kleopatra/models/keylistmodel.cpp

http://commits.kde.org/kdepim/e463ffacbaa4d722fe3b62039f2ad3560659f99a
Comment 8 Sergio Martins 2012-11-25 16:03:39 UTC
Git commit d2dd42477527fc3f3e375b882ae4f388ff574ff0 by Sergio Martins.
Committed on 25/11/2012 at 16:45.
Pushed by smartins into branch 'master'.

Fix build with boost >= 1.48

For Qt 4.8.4 we might have a fix upstream.

QTBUG-22829

M  +3    -0    kleopatra/models/keylistmodel.cpp

http://commits.kde.org/kdepim/d2dd42477527fc3f3e375b882ae4f388ff574ff0
Comment 9 Sergio Martins 2012-11-26 00:13:37 UTC
Fixed for Qt 4.8.4 too: https://codereview.qt-project.org/#change,40593
Comment 10 Alexey Chernov 2013-01-24 22:02:26 UTC
The problem appeared again for me, in KDE 4.9.5, Qt 4.8.4.

Moving two more Boost headers (boost/bind.hpp and boost/graph/adjacency_list.hpp) inside #ifndef fixes the problem. Fix it, please.
Comment 11 Andrea Scarpino 2013-01-31 09:38:06 UTC
This is back with boost 1.52.

I fixed it by moving line 63 into the ifndef located below.
Comment 12 Andrea Scarpino 2013-01-31 09:44:30 UTC
Created attachment 76835 [details]
Fix build with boost 1.52
Comment 13 Alexey Chernov 2013-01-31 09:50:11 UTC
Thanks, Andrea. Will it be contained in 4.10?
Comment 14 Laurent Montel 2013-01-31 10:00:07 UTC
Git commit 942c9bd5213862a89c5afacc28c39a2d4f6da5fd by Montel Laurent.
Committed on 31/01/2013 at 10:58.
Pushed by mlaurent into branch 'KDE/4.10'.

Fix Bug 304111 - Kleopatra fails to build

Apply patch from Andrea Scarpino
It compiles on boost 1.49 too.

FIXED-IN: 4.10.1

M  +1    -1    kleopatra/models/keylistmodel.cpp

http://commits.kde.org/kdepim/942c9bd5213862a89c5afacc28c39a2d4f6da5fd
Comment 15 Laurent Montel 2013-01-31 10:00:24 UTC
in 4.10.1 not in 4.10
Comment 16 Ragnar Thomsen 2013-02-14 14:41:19 UTC
This error still appears when building KDE 4.10.0 with boost 1.52 and Qt 4.8.4. The patch does NOT fix it, but the workaround in comment 3 does. I also tried the suggestion in comment 10, with no success.
Comment 17 Heiko Becker 2013-04-03 14:32:41 UTC
Created attachment 78610 [details]
Fix build with boost >= 1.53

The attached patch allows me to build against boost-1.53.
Comment 18 Andrea Scarpino 2013-04-03 14:36:13 UTC
(In reply to comment #17)
> The attached patch allows me to build against boost-1.53.

That has already been fixed, see BUG#316256