Bug 912503

Summary: Does not build against new boost / GCC 4.8 (FTBFS)
Product: [Fedora] Fedora Reporter: Adam Williamson <awilliam>
Component: evolution-data-serverAssignee: Matthew Barnes <mbarnes>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: urgent Docs Contact:
Priority: unspecified    
Version: rawhideCC: eugen.dedu, mbarnes, mcrha, pbrobinson, pmachata
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: evolution-data-server-3.7.90-3 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-02-21 09:57:59 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Fix for this issue none

Description Adam Williamson 2013-02-18 20:25:34 UTC
Trying to rebuild Ekiga in current Rawhide is failing, even after letting most of the rest of the mass-rebuild process shake out. There's a gigantic pile of errors, but they're all something to do with a clash in function definition between boost and the GCC 4.8 headers, I think. There's lots of "error: template with C linkage" in files in /usr/include/c++/4.8.0 .

See http://kojipkgs.fedoraproject.org//work/tasks/6639/5026639/build.log , my scratch build attempt. Sample errors:

In file included from /usr/include/c++/4.8.0/utility:69:0,
                 from /usr/include/boost/config/no_tr1/utility.hpp:21,
                 from /usr/include/boost/config/select_stdlib_config.hpp:37,
                 from /usr/include/boost/config.hpp:40,
                 from /usr/include/boost/smart_ptr.hpp:17,
                 from ../../lib/engine/framework/services.h:43,
                 from ../../lib/engine/addressbook/contact-core.h:39,
                 from ../../plugins/evolution/evolution-contact.h:49,
                 from ../../plugins/evolution/evolution-contact.cpp:40:
/usr/include/c++/4.8.0/bits/stl_relops.h:85:5: error: template with C linkage
     template <class _Tp>
     ^
/usr/include/c++/4.8.0/bits/stl_relops.h:98:5: error: template with C linkage
     template <class _Tp>
     ^
/usr/include/c++/4.8.0/bits/stl_relops.h:111:5: error: template with C linkage
     template <class _Tp>
     ^
/usr/include/c++/4.8.0/bits/stl_relops.h:124:5: error: template with C linkage
     template <class _Tp>
     ^
In file included from /usr/include/boost/config/platform/linux.hpp:15:0,
                 from /usr/include/boost/config.hpp:53,
                 from /usr/include/boost/smart_ptr.hpp:17,
                 from ../../lib/engine/framework/services.h:43,
                 from ../../lib/engine/addressbook/contact-core.h:39,
                 from ../../plugins/evolution/evolution-contact.h:49,
                 from ../../plugins/evolution/evolution-contact.cpp:40:
/usr/include/c++/4.8.0/cstdlib: In function 'long long int std::abs(long long int)':
/usr/include/c++/4.8.0/cstdlib:174:20: error: declaration of C function 'long long int std::abs(long long int)' conflicts with
   abs(long long __x) { return __builtin_llabs (__x); }
                    ^
/usr/include/c++/4.8.0/cstdlib:166:3: error: previous declaration 'long int std::abs(long int)' here
   abs(long __i) { return __builtin_labs(__i); }
   ^

etc etc etc.

Comment 1 Eugen Dedu 2013-02-19 20:12:24 UTC
Does this appear with other programs using boost?  The error appears in boost...

Comment 2 Adam Williamson 2013-02-19 20:50:44 UTC
Nothing else I have installed, all my other packages passed the boost bump rebuild okay. But there may be others that I don't have installed, possibly. We could CC boost maintainers.

Comment 3 Eugen Dedu 2013-02-19 21:14:06 UTC
Please CC boost maintainers, because I do not know what to do with this bug.

Comment 4 Adam Williamson 2013-02-19 21:40:47 UTC
OK! Petr, can you shed any light on this? Thanks!

Comment 5 Petr Machata 2013-02-20 16:44:44 UTC
This doesn't seem to be boost-related.  The following is a minimal reproducer:

#include <libebook/libebook.h>
template <class C> class X {};
}}

With this, I get:
../../plugins/evolution/evolution-contact.cpp:2:1: error: template with C linkage
 template <class C> class X {};

Note the two dangling braces.  It seems as if something either in libebook, or transitively included by it, forgets a closing brace in their extern "C".

Comment 6 Petr Machata 2013-02-20 16:51:24 UTC
Yet more minimal test case (but we lost one dangling brace, so chances are there are more instances):

#include <camel/camel.h>
template <class C> class X {};
}

Comment 7 Petr Machata 2013-02-20 17:02:20 UTC
Created attachment 700137 [details]
Fix for this issue

This appears to fix the problem.  There were indeed two instances of the same issue.

Comment 8 Petr Machata 2013-02-20 17:05:25 UTC
FWIW, the following only returns the two cases that the patch addresses, so this type of issue should really be taken care of now.  I checked that there are no instances of the inverse issue (END without BEGIN).

$ find /usr/include/evolution-data-server/ -type f -exec grep -q G_BEGIN_DECLS {} \; \( -exec grep -q G_END_DECLS {} \; -o -print \)

Comment 9 Milan Crha 2013-02-21 09:35:00 UTC
Thanks for a bug report. Part of this had been fixed two days ago within:
http://git.gnome.org/browse/evolution-data-server/commit/?id=02acf9dc708c3bb2d96db78dae56272ab65ef13c
http://git.gnome.org/browse/evolution-data-server/commit/?id=08ddf26463b24bd6da5561256762440502e50af1

and the other part is also dealt upstream, within
https://bugzilla.gnome.org/show_bug.cgi?id=694152

I'll backport the upstream changes and build eds with it shortly.

Comment 10 Milan Crha 2013-02-21 09:57:59 UTC
I'm currently building evolution-data-server-3.7.90-3:
http://koji.fedoraproject.org/koji/taskinfo?taskID=5039181

I also added patch for IMAPx summary vanish there:
https://bugzilla.gnome.org/show_bug.cgi?id=693101

Please reopen in case the build will not work for you. Thanks.

Comment 11 Peter Robinson 2013-02-21 15:48:30 UTC
ekiga 4.0.1 now built in rawhide, adam would love feedback on the release

Comment 12 Adam Williamson 2013-02-22 02:28:50 UTC
peter: I don't really use it, I only have it installed as part of the GNOME group I think. No-one I know uses anything Ekiga supports any more :/ all video chat seems to be Google Hangouts these days, and the future is WebRTC...